python crash on windows but not on linux

hjebbers hjebbers at gmail.com
Sat Feb 13 05:29:48 EST 2010


On Feb 12, 11:46 pm, Rob Williscroft <r... at rtw.me.uk> wrote:
> hjebbers wrote in news:2864756a-292b-4138-abfd-
> 3348b72b7... at u9g2000yqb.googlegroups.com in comp.lang.python:
>
> > the information about the error is a windows dump.
>
> This may help:
>
> #http://msdn.microsoft.com/en-us/library/ms680621(VS.85).aspx
>
> SEM_FAILCRITICALERRORS = 1
> SEM_NOALIGNMENTFAULTEXCEPT = 4
> SEM_NOGPFAULTERRORBOX = 4
> SEM_NOOPENFILEERRORBOX = 8
>
> import ctypes
> from ctypes.wintypes import UINT
>
> SetErrorMode = ctypes.windll.kernel32.SetErrorMode
> SetErrorMode.restype = UINT
> SetErrorMode.argtypes = ( UINT,)
>
> Then putting:
>
> SetErrorMode( SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX )
>
> at the start of you programme, should stop the "Critical Error" dialog
> box you are seeing and you may get a chance to see a traceback.
>
> Rob.

Hi Rob,

thanks.
I tried this, but did not work for me.

henk-jan



More information about the Python-list mailing list