Global menu and wx python : endless error

Bug #1179408 reported by gbonline
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-defaults (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi, i'm working with 2 distro of ubuntu : 12.04 lts and 13.04 with python (2.7.x) and wxpython on Unity, and both have the same error.
In my app the Wx Forms run well, but if the app have a menu when I close the app Form i get the error:

(python:25025): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that doesn't believe we're it's parent.

and looking for it on google i've found that if i remove the ubuntu global menu the error goes away.
Ok well done: sudo apt-get remove appmenu.....................
Restart the app and ....
one new error! when i use the app menu i get in terminal

python: undefined symbol: menu_proxy_module_load
(python:24841): Gtk-WARNING **: Failed to load type module: (null)

and googling for a solution : reinstall the ubuntu global menu !!!!

And now what can i do?

I've made a demo app that have this error, try it:

    # -*- coding: utf-8 -*-

    import wx
    import wx.xrc

    class MyFrame3 ( wx.Frame ):

       def __init__( self, parent ):
          wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Test menu", pos = wx.DefaultPosition, size = wx.Size( 500,300 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )

          self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )

          self.m_menubar3 = wx.MenuBar( 0 )
          self.m_menu4 = wx.Menu()
          self.m_menuItem9 = wx.MenuItem( self.m_menu4, wx.ID_ANY, u"Test voce", wx.EmptyString, wx.ITEM_NORMAL )
          self.m_menu4.AppendItem( self.m_menuItem9 )

          self.m_menubar3.Append( self.m_menu4, u"Test" )

          self.SetMenuBar( self.m_menubar3 )

          self.Centre( wx.BOTH )

       def __del__( self ):
          pass

    class MainFrame( MyFrame3 ):
       def __init__( self, parent ):
          MyFrame3.__init__( self, parent )

    class TestMenu(wx.App):
        def OnInit(self):
            self.m_frame = MainFrame(None)
            self.m_frame.Show()
            self.SetTopWindow(self.m_frame)
            return True

    app = TestMenu(0)
    app.MainLoop()

Tags: bot-comment
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1179408/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → python-defaults (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.