[python-win32] Python crash

Jim Vickroy Jim.Vickroy@noaa.gov
Thu, 26 Dec 2002 08:35:20 -0700


Hello Petr,

I ran your **exact** example (5 times) on a Win 2000 machine (with service pack 3 installed), and it did not crash.  I am puzzled as to why the position of the import statement should make a difference in this case.  During
these tests, I had 17 other processes active on the machine.


Petr Gladkikh wrote:

> Hello.
>
> It seems that it is rare problem. But to be more precise I'd like to point out that crash is happen excactly when executing this code. That is I have file a.py containing excactly following 7 lines (and only these lines):
> import win32com.client
> def a(): pass
> def b(): pass
> def c(): pass
> def d(): pass
> def A(): a = win32com.client.Dispatch("")
> def B(): a = win32com.client.Dispatch("")
>
> Then at DOS prompt I type
> python.exe a.py
>
> then python interpreter chrashes due to access violation.
> Had I removed any single line nothing strange happens. My guess is that there are either some binary incompatibilities either it is (again :) bug in the module (more precise, in module initialisation).
> I have installed Python-2.2.2 and win32all-150 on Win2000.
>
> Following script (thanks to advise of "Jim Vickroy" <Jim.Vickroy@noaa.gov>):
> def a(): pass
> def b(): pass
> def c(): pass
> def d(): pass
> import win32com.client
> def A(): a = win32com.client.Dispatch("")
> def B(): a = win32com.client.Dispatch("")
>
> Works fine on my machine too. But in the best of the worlds reason of this behaviour should be located. (I don't like workarounds :)
>
> Petr.
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32