AUI crash on GTK

If I have a frame with it's own menu bar being managed by the AUI
system it crashes the application on GTK, but works fine on Window. I
included the PyAUI as my *nix system is still running wx2.6.3, but I
had someone test this with wx2.7.2 on *nix and they ran into the same
issue.

Gtk-ERROR **: file ../../gtk/gtkcontainer.c: line 2447
(gtk_container_propagate_expose): assertion failed: (child->parent ==
GTK_WIDGET (container))
aborting...
Aborted

gtkcrash.py (1.93 KB)

PyAUI.py (171 KB)

Dj Gilcrease wrote:

If I have a frame with it's own menu bar being managed by the AUI
system it crashes the application on GTK, but works fine on Window. I
included the PyAUI as my *nix system is still running wx2.6.3, but I
had someone test this with wx2.7.2 on *nix and they ran into the same
issue.

Gtk-ERROR **: file ../../gtk/gtkcontainer.c: line 2447
(gtk_container_propagate_expose): assertion failed: (child->parent ==
GTK_WIDGET (container))
aborting...
Aborted

I also see this:

  Gtk-WARNING **: Can't set a parent on a toplevel widget

Which is probably because you are trying to use a wx.Frame as an AUI pane. AUI only manages the content windows, and will create a top-level window for you when it needs to float a pane out of the managed window. Try making that a panel instead.

···

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

This only happens in the Frame I am trying to use has it's own menu bar.

I attached an edited example file that shows it works fine if I am
using a wx.Frame

Edit Line #17 to be AUIFrame_Crash to see the crash again. The only
diff between the two AUIFrames is one has a menu bar of it's own and
the other does not.

···

On 1/22/07, Robin Dunn <robin@alldunn.com> wrote:

I also see this:

        Gtk-WARNING **: Can't set a parent on a toplevel widget

Which is probably because you are trying to use a wx.Frame as an AUI
pane. AUI only manages the content windows, and will create a top-level
window for you when it needs to float a pane out of the managed window.
  Try making that a panel instead.

Opps forgot to attach the file

gtkcrash.py (2.06 KB)

···

On 1/22/07, Dj Gilcrease <digitalxero@gmail.com> wrote:

On 1/22/07, Robin Dunn <robin@alldunn.com> wrote:
> I also see this:
>
> Gtk-WARNING **: Can't set a parent on a toplevel widget
>
> Which is probably because you are trying to use a wx.Frame as an AUI
> pane. AUI only manages the content windows, and will create a top-level
> window for you when it needs to float a pane out of the managed window.
> Try making that a panel instead.

This only happens in the Frame I am trying to use has it's own menu bar.

I attached an edited example file that shows it works fine if I am
using a wx.Frame

Edit Line #17 to be AUIFrame_Crash to see the crash again. The only
diff between the two AUIFrames is one has a menu bar of it's own and
the other does not.

--
Dj Gilcrease
OpenRPG Developer
~~http://www.openrpg.com
OpenRPG+ Lead Developer
~~http://openrpg.digitalxero.net
XeroPortal Creator
~~http://www.digitalxero.net
Web Admin for Thewarcouncil.us
~~http://www.thewarcouncil.us

Dj Gilcrease wrote:

I also see this:

        Gtk-WARNING **: Can't set a parent on a toplevel widget

Which is probably because you are trying to use a wx.Frame as an AUI
pane. AUI only manages the content windows, and will create a top-level
window for you when it needs to float a pane out of the managed window.
  Try making that a panel instead.

This only happens in the Frame I am trying to use has it's own menu bar.

Nevertheless, the fact remains that AUI was not designed to be able to use a top-level window as a Pane.

I attached an edited example file that shows it works fine if I am
using a wx.Frame

Edit Line #17 to be AUIFrame_Crash to see the crash again. The only
diff between the two AUIFrames is one has a menu bar of it's own and
the other does not.

The NoCrash version still crashes for me, perhaps because of a different version of libgtk than you have.

···

On 1/22/07, Robin Dunn <robin@alldunn.com> wrote:

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