[python-win32] PyGUI blobedit creashes with pywin32-214 but not 212 - traceback - related problems

Robert kxroberto at googlemail.com
Thu Oct 21 14:51:44 CEST 2010


Roger Upole wrote:
>
> "Robert"<kxroberto at googlemail.com>  wrote in message
> news:i9kmoi$clm$1 at dough.gmane.org...
>
>> B) a oneliner with just "import wx" crashes hard with F5 in Pythonwin IDE
>> build 214/py2.6 - but not in build 212   (ntdll.dll)
>>
>> AppName: pythonwin.exe AppVer: 2.6.214.0 ModName: ntdll.dll
>> ModVer: 5.1.2600.3520 Offset: 00044872
>> Code: 0xc015000f
>> Address: 0x7c954872
>> (wxpython 2.8.11.0 (msw-unicode))
>>
>> Only after this patch below (passing the SendMessage by a direct python
>> call) it works again.  (But with importing this oneliner file with Ctrl-I
>> the IDE still
>> crashes the same.)
>>
>> --- scintilla/bindings.py Sun Jan 04 15:01:18 2009
>> +++ scintilla/bindings.py Tue Oct 19 18:53:49 2010
>> @@ -33,7 +33,11 @@
>>   def __init__(self, cmd):
>>   self.cmd = cmd
>>   def __call__(self, *args):
>> - win32ui.GetMainFrame().SendMessage(win32con.WM_COMMAND, self.cmd)
>> + # F5-run on simple "import wx" (wx2.8.11.0 (msw-unicode)) crashed in
>> ntdll.dll:
>> + ##win32ui.GetMainFrame().SendMessage(win32con.WM_COMMAND, self.cmd)
>> + win32ui.GetMainFrame().OnCommand(self.cmd, 0)
>> + #note: Ctrl-I/import still crashes because of WM_COMMAND in the line
>> +
>
> Trying to run one GUI framework inside of another is a sure recipe for
> disaster.  Both will be trying to process messages, with race conditions
> and memory conflicts galore. The short answer is "don't do that".
>

I'm doing this since adam and eve with wx, win32ui and similar. When there was/is a little problem I first try flatten it. e.g. join the OnIdle or message 
translation. 2 or 3 things.
Have seen people which edit code, save, start the GUI app , bug, exit , edit, start/test again ..

With dynamic Python I edit code while it runs, objects/windows live; fumble, try, autocomplete on the living objects, sys.exepthook postmortem pywin debugger, set 
self=current_winthing_i_focus_on_for_a_while in the interactive , better autocompletion, Ctrl+Enter debug etc ... Even little reload code, exchange classes at runtime 
on big apps with big status ... reboot after 30x or so.

Pythonwin is good therefor because of the joint thread. Its a feature not ...

I think there is simply something not as good as it was in build 212. It may indicate/connect with deeper problems - like mentioned.
And the problem is just about "import wx" at F5/Ctrl-I time. reproducible. no GUI start at all so far. the crash is not when doing "import wx" first in interactive, 
and then use F5 on a wx script... something with command handler status, GIL/reenter or so.
Would be happy about any idea.


Best
Robert




More information about the python-win32 mailing list