Gdk-CRITICAL messages in 2.5.2.8 running on SuSE9.0 and 9.1

I have just updated to this new version.

When running the demo, and ask the threads demo, the terminal receive lots of
this message in high spreed:

(demo.py:4654): Gdk-CRITICAL **: file gdkwindow.c: line 2252
(gdk_window_invalidate_rect): assertion `window != NULL' failed

Actually this seems to happen with almost any program in demo. They work,
though, besides this weird output.

Ivan

This has always happened (or at least for a long time). I *think* the
warnings are a result of the window (and hence, its DC) not being of a
size greater than (0, 0). Apparently this doesn't cause any problems.
IIRC, you can usually avoid the warnings in your own code by checking in
your OnSize handler whether the size is (0, 0) and just returning if it
is (rather than repainting the window).

Also, I don't see these warnings under FC2. Did you update your demo
code at the same time you updated wxPython?

Regards,
Cliff

···

On Tue, 2004-08-31 at 11:05, Ivan Nazarenko wrote:

I have just updated to this new version.

When running the demo, and ask the threads demo, the terminal receive lots of
this message in high spreed:

(demo.py:4654): Gdk-CRITICAL **: file gdkwindow.c: line 2252
(gdk_window_invalidate_rect): assertion `window != NULL' failed

Actually this seems to happen with almost any program in demo. They work,
though, besides this weird output.

--
Cliff Wells <clifford.wells@comcast.net>

...and now I noticed: the option to see the source code disappeared!

The problem does not seems to be in wxPython itself, but in the demo code.
Running the old demo (2.5.2.7) with the new wxPython 2.5.2.8 do not generate
those messagens and still have the source tab.

Ivan

···

On Tuesday 31 August 2004 15:05, Ivan Nazarenko wrote:

When running the demo, and ask the threads demo, the terminal receive lots
of this message in high spreed:

(demo.py:4654): Gdk-CRITICAL **: file gdkwindow.c: line 2252
(gdk_window_invalidate_rect): assertion `window != NULL' failed

Actually this seems to happen with almost any program in demo. They work,
though, besides this weird output.

This has always happened (or at least for a long time).

I have not noticed yet, and have been using wxPython for a year now.

I *think* the
warnings are a result of the window (and hence, its DC) not being of a
size greater than (0, 0). Apparently this doesn't cause any problems.
IIRC, you can usually avoid the warnings in your own code by checking in
your OnSize handler whether the size is (0, 0) and just returning if it
is (rather than repainting the window).

I can't see the reason rigth now (I have deadlines for tomorrow), but the
absence of the source tab (see my other post) migth be kind of a show-stopper
for a newcomer.

Also, I don't see these warnings under FC2. Did you update your demo
code at the same time you updated wxPython?

Yes. But the new wxPython works well with the 2.5.2.7 demo.

Ivan

···

On Tuesday 31 August 2004 15:53, Cliff Wells wrote:

Ivan Nazarenko wrote:

···

On Tuesday 31 August 2004 15:05, Ivan Nazarenko wrote:

When running the demo, and ask the threads demo, the terminal receive lots
of this message in high spreed:

(demo.py:4654): Gdk-CRITICAL **: file gdkwindow.c: line 2252
(gdk_window_invalidate_rect): assertion `window != NULL' failed

Actually this seems to happen with almost any program in demo. They work,
though, besides this weird output.

...and now I noticed: the option to see the source code disappeared!

Eek!!!

It looks like a small optimization I did to reduce flicker on wxMSW had unintended side-effects on wxGTK. This patch will fix it:

Index: wxPython/demo/Main.py

RCS file: /pack/cvsroots/wxwidgets/wxWidgets/wxPython/demo/Main.py,v
retrieving revision 1.134
diff -u -4 -r1.134 Main.py
--- wxPython/demo/Main.py 2004/08/25 23:56:42 1.134
+++ wxPython/demo/Main.py 2004/08/31 19:50:25
@@ -482,9 +482,10 @@
  class DemoCodePanel(wx.Panel):
      """Panel for the 'Demo Code' tab"""
      def __init__(self, parent, mainFrame):
          wx.Panel.__init__(self, parent, size=(1,1))
- self.Hide()
+ if 'wxMSW' in wx.PlatformInfo:
+ self.Hide()
          self.mainFrame = mainFrame
          self.editor = DemoCodeEditor(self)
          self.editor.RegisterModifiedEvent(self.OnCodeModified)

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

It depends a lot on what you are doing. I probably see it because I do
a lot of drawing directly to a wxDC (from EVT_SIZE and EVT_PAINT
events). You might not have seen it before if you don't do that sort of
stuff. I'm fairly certain I've seen it certain parts of the demo before
as well.

Regards,
Cliff

···

On Tue, 2004-08-31 at 12:16, Ivan Nazarenko wrote:

On Tuesday 31 August 2004 15:53, Cliff Wells wrote:

> This has always happened (or at least for a long time).

I have not noticed yet, and have been using wxPython for a year now.

--
Cliff Wells <clifford.wells@comcast.net>

I see from the release notes that Robin made some changes to the demo

   * Some tweaks in the demo and samples to correct layout, some
     flicker problems, and namespace use.

Probably fixing the "flicker" problems introduced the warnings <shrug>.
Without diffing the code it's hard to say.

Either way, I wouldn't worry about the warnings too much. As you've
noticed, they don't seem to break anything.

Missing the "view source" tab is another issue altogether... I'm still
using a pre-2.5.2.8 demo, so I didn't see that.

Regards,
Cliff

···

On Tue, 2004-08-31 at 12:06, Ivan Nazarenko wrote:

On Tuesday 31 August 2004 15:05, Ivan Nazarenko wrote:

> When running the demo, and ask the threads demo, the terminal receive lots
> of this message in high spreed:
>
> (demo.py:4654): Gdk-CRITICAL **: file gdkwindow.c: line 2252
> (gdk_window_invalidate_rect): assertion `window != NULL' failed
>
> Actually this seems to happen with almost any program in demo. They work,
> though, besides this weird output.

...and now I noticed: the option to see the source code disappeared!

The problem does not seems to be in wxPython itself, but in the demo code.
Running the old demo (2.5.2.7) with the new wxPython 2.5.2.8 do not generate
those messagens and still have the source tab.

--
Cliff Wells <clifford.wells@comcast.net>

Sorry all, another dumb question - now that I've succeeded in getting 2.5.2.8
running I too get these errors, but are clueless as how to apply the patch.
I'm sure its a no-brainer - one liner - could someone just type me the line?

Thanks

richard

···

On Wed, 1 Sep 2004 05:51 am, Robin Dunn wrote:

Ivan Nazarenko wrote:
> On Tuesday 31 August 2004 15:05, Ivan Nazarenko wrote:
>>When running the demo, and ask the threads demo, the terminal receive
>> lots of this message in high spreed:
>>
>>(demo.py:4654): Gdk-CRITICAL **: file gdkwindow.c: line 2252
>>(gdk_window_invalidate_rect): assertion `window != NULL' failed
>>
>>Actually this seems to happen with almost any program in demo. They work,
>>though, besides this weird output.
>
> ...and now I noticed: the option to see the source code disappeared!

Eek!!!

It looks like a small optimization I did to reduce flicker on wxMSW had
unintended side-effects on wxGTK. This patch will fix it:

Index: wxPython/demo/Main.py

RCS file: /pack/cvsroots/wxwidgets/wxWidgets/wxPython/demo/Main.py,v
retrieving revision 1.134
diff -u -4 -r1.134 Main.py
--- wxPython/demo/Main.py 2004/08/25 23:56:42 1.134
+++ wxPython/demo/Main.py 2004/08/31 19:50:25
@@ -482,9 +482,10 @@
  class DemoCodePanel(wx.Panel):
      """Panel for the 'Demo Code' tab"""
      def __init__(self, parent, mainFrame):
          wx.Panel.__init__(self, parent, size=(1,1))
- self.Hide()
+ if 'wxMSW' in wx.PlatformInfo:
+ self.Hide()
          self.mainFrame = mainFrame
          self.editor = DemoCodeEditor(self)
          self.editor.RegisterModifiedEvent(self.OnCodeModified)

Richard Terry wrote:

Sorry all, another dumb question - now that I've succeeded in getting 2.5.2.8 running I too get these errors, but are clueless as how to apply the patch. I'm sure its a no-brainer - one liner - could someone just type me the line?

Be in the root of the source tree and do this:

  patch -p0 < patchfile

Or this one is simple enough that it could be edited by had almost as easily. The line starting with '-' should be removed and the lines starting with '+' are to be added.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!