Application crashes after running a wxPython application via MS ActiveScript

Klaus Nökel Klaus.Noekel at ptv.de
Thu Feb 7 04:39:58 PST 2008


Hi everybody,
 =

I am tracking a mysterious bug, trying to determine whether wxPython, pywin=
32, Windows or our own application is at fault. The set-up is as follows: =

 =

- Our own application uses the MS ActiveScript technology to let users auto=
mate their workflow with scripts.
- The favorite script language is Python, the favorite GUI library is wxPyt=
hon.
- In some circumstances, our own application will crash when the next dialo=
g opens after the user has executed a script containig wxPython GUI element=
s. The call stack displays flaky, but if I can believe it, the crash happen=
s somewhere in MS territory where event handling is set up for the new dial=
og.
 =

A long time ago we had something similar happening, when a third-party comp=
onent did not clean up thoroughly after itself. Our dialog would then latch=
 onto the half-destroyed window of that third-party component as its parent=
 window, and when events started being routed to that zombie window, our ap=
plication crashed. Could something similar occur here? =

 =

Some hypotheses:
- some remnants of wxPython window management live on, confusing Windows.
- the ActiveScript session has not really terminated, so Python is still ru=
nning, so wxPython has not been reclaimed by the GC, so it is actually stil=
l running its main-loop
- our application still holds on to COM references which cause the ActiveSc=
ript session to continue to exist.
 =

I can't see any evidence of the last explanation, and it is hard to check t=
he second, because everything happens in-process, so there are no tell-tale=
 zombie processes in the task manager. The first explanation is pure specul=
ation and I turn to you to see, if something similar has happened to one of=
 you before or stirs something at the back of one of the developers' minds.
 =

For completeness, I am using Python 2.5 with the latest production versions=
 of pywin32 and wxPython 2.8.
 =

Any advice?
 =

Thanks and best regards,
 =

Klaus N=F6kel
PTV
Planung Transport Verkehr AG
Stumpfstra=DFe 1
76131 Karlsruhe
Germany
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200802=
07/9412504b/attachment.htm


More information about the wxpython-users mailing list