[ wxwindows-Bugs-1882040 ] gtk_widget_set_colormap assertion failure

SourceForge.net noreply at sourceforge.net
Fri Feb 1 12:15:46 PST 2008


Bugs item #1882040, was opened at 2008-01-29 12:16
Message generated for change (Comment added) made by pcor
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1882040&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxGTK specific
Group: Platform specific
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: crjjrc (crjjrc)
Assigned to: Nobody/Anonymous (nobody)
Summary: gtk_widget_set_colormap assertion failure

Initial Comment:
I've got a wxNotebook with two pages.  When I select the second tab, I dynamically add a wxGLCanvas to the notebook page.  Under 2.8.*, I received a GTK assertion about the colormap being added after the widget had already been realized.  I fixed that by hiding the containing panel before adding the canvas.  More details are here:

  http://groups.google.com/group/comp.soft-sys.wxwindows/msg/ae4fecf3a7dc7168?dmode=source

Under 2.9, the assertion failure is back, though I have not changed my code.  Has something changed in the Show()/Hide() setup that makes a newly created widget get realized too soon?

It looks like this bug report adds a few details:

  https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1597527&group_id=9863

I'm happy to try and fix this now that I know how to make patches.  I just don't know what's changed or what would be the best thing to do.

Thanks.

- Chris

----------------------------------------------------------------------

>Comment By: Paul Cornett (pcor)
Date: 2008-02-01 12:15

Message:
Logged In: YES 
user_id=1084745
Originator: NO

This should be fixed now in svn trunk.

----------------------------------------------------------------------

Comment By: crjjrc (crjjrc)
Date: 2008-01-29 12:29

Message:
Logged In: YES 
user_id=1960247
Originator: YES

A followup on this.  The last thing done in wxWindowGTK::PostCreation
(which is called by wxWindowGTK::Create, which is called before the
colormap is set for wxGLCanvas) is to show the window.  A comment explains
that this is not done if Hide() was called before Create().  But Create()
isn't public for wxGLCanvas, and it is impossible to call Hide() before
Create().  So, I assume this is causing the assertion error.  Does this
sound right?

- Chris

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1882040&group_id=9863




More information about the wx-dev mailing list