[wxPython-dev] 20070511 test build uploaded

Waldemar Osuch waldemar.osuch at gmail.com
Tue May 15 10:42:54 PDT 2007


Hi,

> A new test build of wxPython has been uploaded.
>
>    Version: 2.8.4.0.20070511
>    URL:     http://wxPython.wxcommunity.com/preview/20070511
>    Changes: http://wxPython.wxcommunity.com/preview/20070511/CHANGES.html
>

Following will crash hard on WindowsXP with Python 2.5.1 when closing the app.
>>> win32
>>> 2.5
>>> 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
>>> 2.8.4.0.20070511 (msw-unicode)

------------------------------------
import wx
import sys

print sys.platform
print sys.winver
print sys.version
print wx.version()

class MyFrame(wx.Frame):
    def __init__(self, parent, title='Test'):
        wx.Frame.__init__(self, parent, -1, title)
        dirctrl = self.dirctrl = wx.GenericDirCtrl(self, -1)
        dirctrl.Path = r'c:\temp'
        dirctrl.TreeCtrl.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnTreeChange)

    def OnTreeChange(self, evt):
        print self.dirctrl.Path
        pass


app = wx.App(False)
frame = MyFrame(None)
frame.Show()
app.MainLoop()
-------------------------------------------------------------------

It looks that it crashes when I try to access self.dirctrl.Path and
self.dirctrl is already gone.
Should the EVT_TREE_SEL_CHANGED be fired during closing?


Here is a trace from the real program that uses AUI manager.

Traceback (most recent call last):
  File "E:\work\pdfmeta\UI.py", line 328, in showPDF
    docpath = self.dirctrl.Path
  File "C:\python\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_controls.py",
line 5653, in GetPath
    return _controls_.GenericDirCtrl_GetPath(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "stringSrc.GetStringData()->IsValid()"
failed at ..\..\src\common\string.cpp(775) in wxStringBase::operator`='()
Traceback (most recent call last):
  File "E:\work\pdfmeta\UI.py", line 328, in showPDF
    docpath = self.dirctrl.Path
  File "C:\python\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", li
ne 14045, in __getattr__
    raise PyDeadObjectError(self.attrStr % self._name)
wx._core.PyDeadObjectError: The C++ part of the GenericDirCtrl object
has been deleted, attribute access no longer allowed.




More information about the wxpython-dev mailing list