Ticket #1161 (assigned defect)

Opened 1 month ago

Last modified 20 hours ago

wxAssertFailure when starting ClassDesigner

Reported by: sargis Assigned to: ed (accepted)
Priority: major Milestone: 0.8.3
Component: ui Version: 0.8.2
Keywords: Cc:

Description

I'm getting the following Traceback while running Dabo-0.8.4 on Linux (RHEL 4) with wxPython-2.8.8:

Traceback (most recent call last):
  File "ClassDesigner.py", line 4109, in <module>
    clsDes = ClassDesigner(f)
  File "ClassDesigner.py", line 184, in __init__
    frm = frmClass(UseSizers=True)
  File "ClassDesigner.py", line 405, in __init__
    base.__init__(self, parent=parent, *args, **kwargs)
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dForm.py", line 972, in __init__
    BaseForm.__init__(self, preClass, parent, properties, attProperties, *args, **kwargs)
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dForm.py", line 108, in __init__
    fm.dFormMixin.__init__(self, preClass, parent, properties, attProperties, *args, **kwargs)
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dFormMixin.py", line 71, in __init__
    attProperties, *args, **kwargs)
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dPemMixin.py", line 183, in __init__
    self._afterInit()
  File "ClassDesigner.py", line 414, in _afterInit
    super(DesForm, self)._afterInit()
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dForm.py", line 134, in _afterInit
    super(BaseForm, self)._afterInit()
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dFormMixin.py", line 88, in _afterInit
    self.MenuBar = mbc()
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dMenuBar.py", line 20, in __init__
    pm.dPemMixin.__init__(self, preClass, None, properties, *args, **kwargs)
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dPemMixin.py", line 183, in __init__
    self._afterInit()
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dBaseMenuBar.py", line 153, in _afterInit
    self.appendMenu(FileMenu(self))
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dBaseMenuBar.py", line 26, in __init__
    self.super(*args, **kwargs)
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/lib/autosuper/autosuper.py", line 176, in __call__
    return method(*p, **kw)
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dMenu.py", line 39, in __init__
    pm.dPemMixin.__init__(self, preClass, parent, properties, attProperties, *args, **kwargs)
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dPemMixin.py", line 183, in __init__
    self._afterInit()
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dBaseMenuBar.py", line 37, in _afterInit
    help=_("Open up a command window for debugging") )
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dMenu.py", line 231, in append
    self.appendItem(item)
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dMenu.py", line 153, in appendItem
    wxItem = self._getWxItem(self.AppendItem, item)
  File "/usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/ui/uiwx/dMenu.py", line 123, in _getWxItem
    wxItem = wxFunc(dMenuItemInstance)
  File "/usr/local/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 10990, in AppendItem
    return _core_.Menu_AppendItem(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed at ../src/common/stockitem.cpp(166) in wxGetStockLabel(): invalid stock item ID

It works fine on Windows with wxPython-2.8.8.0 or Ubuntu 8.04 with wxPython-2.8.7.1

Change History

07/20/08 16:47:29 changed by ed

  • owner changed from somebody to ed.
  • status changed from new to assigned.

The traceback indicates that the problem is with the icon for the command window menu item. Can you look at your installation, and let me know if the following file exists:

[path_to_dabo]/icons/themes/tango/16x16/apps/utilities-terminal.png

If not, that would explain the problem. If it's there, then there is some pathing issues we need to investigate.

(follow-up: ↓ 3 ) 08/01/08 12:53:31 changed by sargis

Thank you for the message. I found utilities-terminal.png in /usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/icons/themes/tango/16x16/apps.

This problem seems to be similar to http://article.gmane.org/gmane.comp.python.wxpython.devel/2406 It only shows up with Linux version of wxPython-2.8.8.0. FIY, I tried the new version of wxPython 2.8.8.1 and the problem was still there.

(in reply to: ↑ 2 ; follow-up: ↓ 4 ) 08/01/08 13:23:28 changed by paul

Replying to sargis:

Thank you for the message. I found utilities-terminal.png in /usr/local/lib/python2.5/site-packages/Dabo-0.8.4-py2.5.egg/dabo/icons/themes/tango/16x16/apps. This problem seems to be similar to http://article.gmane.org/gmane.comp.python.wxpython.devel/2406 It only shows up with Linux version of wxPython-2.8.8.0. FIY, I tried the new version of wxPython 2.8.8.1 and the problem was still there.

I'm running Ubuntu with wxPython 2.8.8.1 and I can't reproduce. I issue:

cd dabo/ide
python ClassDesigner.py

and the Class Designer starts up normally.

(in reply to: ↑ 3 ) 08/20/08 15:01:42 changed by sargis

Replying to paul:

I'm running Ubuntu with wxPython 2.8.8.1 and I can't reproduce.

I'm not sure why it works for Ubuntu but fails for RHEL4, however, I fixed this on my machine by adding dMenuItemInstance.SetText(" ") before wxItem = wxFunc(dMenuItemInstance) on line 124 in dabo/ui/uiwx/dMenu.py. dMenuItemInstance.GetText() returns u'' before calling appendItem, which might be causing this problem.