Opened 12 years ago

Last modified 12 years ago

#3665 closed defect

DocView application reports PyDeadObjectError during exit

Reported by: jroge Owned by: robind
Priority: normal Milestone:
Component: wxPython Version:
Keywords: Cc: jroge, robind
Blocked By: Blocking:
Patch: no

Description

i think this is only a problem since 2.7.:

when exiting a docview (MDI) application while having a document window opened wxPython reports a PyDeadObjectException, closes the first document and does not exit.

this can be easily reproduced by executing the DocViewDemo.

the problem is that wxPython tries to destroy the views more than once.

traceback follows.

Traceback (most recent call last):

File "C:\Python24\Lib\site-packages\wx-2.7.2-msw-unicode\wx\lib\docview.py", l

ine 2712, in OnCloseWindow

if self._docManager.Clear(not event.CanVeto()):

File "C:\Python24\Lib\site-packages\wx-2.7.2-msw-unicode\wx\lib\docview.py", l

ine 1399, in Clear

if not self.CloseDocuments(force):

File "C:\Python24\Lib\site-packages\wx-2.7.2-msw-unicode\wx\lib\docview.py", l

ine 1390, in CloseDocuments

document.DeleteAllViews() # Implicitly delete the document when the last vie

w is removed

File "C:\Python24\Lib\site-packages\wx-2.7.2-msw-unicode\wx\_core.py", line 13

716, in getattr

raise PyDeadObjectError(self.attrStr % self._name)

wx._core.PyDeadObjectError: The C++ part of the TextEditDocument object has been

deleted, attribute access no longer allowed.

Change History (1)

comment:1 Changed 12 years ago by robind

Thanks for the bug report

Note: See TracTickets for help on using tickets.