Ezio Melotti added the comment:
I just noticed that regrtest also has a --nowindows flag that uses SetErrorMode
(see Lib/test/regrtest.py:490).
The implementation is a bit different:
1) it uses msvcrt instead of going through ctypes.windll.kernel32;
2) it specifies SEM_FAILCRITICALERRORS,
Roundup Robot added the comment:
New changeset 6ccefddc13fd by Ezio Melotti in branch '3.3':
#11732: make suppress_crash_popup() work on Windows XP and Windows Server 2003.
http://hg.python.org/cpython/rev/6ccefddc13fd
New changeset 831035bda9b7 by Ezio Melotti in branch 'default':
#11732:
Roundup Robot added the comment:
New changeset c0c440dcb8dd by Ezio Melotti in branch '3.2':
#11732: add a new suppress_crash_popup() context manager to test.support that
disables crash popups on Windows and use it in test_ctypes.
http://hg.python.org/cpython/rev/c0c440dcb8dd
New changeset
Ezio Melotti added the comment:
GetErrorMode wasn't available on XP/2k3, so I changed the patch to use only
SetErrorMode. I also backported it to 3.2, since ctypes has the same crashing
test of 3.3/default.
If I got everything right there shouldn't be anymore crash popups while running
the
Roundup Robot added the comment:
New changeset 834a451f1cdb by Ezio Melotti in branch '3.3':
#11732: add a new suppress_crash_popup() context manager to test.support.
http://hg.python.org/cpython/rev/834a451f1cdb
New changeset b87123015fb0 by Ezio Melotti in branch 'default':
#11732: merge with
Ezio Melotti added the comment:
I applied this only on 3.3/3.x because I didn't manage to test on 2.7/3.2.
If test_ctypes and/or other tests are failing there I can backport it, but the
patch needs to be tweaked there because it doesn't apply cleanly (and there's
no test_faulthandler there).
Ezio Melotti added the comment:
Attached an untested patch against 3.2.
On 2.7 and 3.2 there's no test_faulthandler, and the crashing test in
test_ctypes seems to be in 3.x only.
Unless I'm missing something:
1) no crash popups should appear while running the 2.7 test suite;
2) only
Ezio Melotti added the comment:
Attached an updated patch:
- renamed the context manager from no_crash_popups to suppress_crash_popup, as
suggested by Brian (I also made it singular, because there shouldn't be more
than one crash/popup per call);
- used the context manager on all the crashing
Ezio Melotti added the comment:
Here is a proof of concept patch that defines a context manager that disables
the crash popups using SetErrorMode [0]. I tested it only on Windows 7 (and
Linux, where it's a no-op). As an example, the patch fixes the crash popup
caused by test_capi.
[0]:
Changes by Ezio Melotti ezio.melo...@gmail.com:
Added file: http://bugs.python.org/file29129/nopopup.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11732
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
Removed file: http://bugs.python.org/file29129/nopopup.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11732
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
Added file: http://bugs.python.org/file29130/nopopup.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11732
___
Changes by Sébastien Sablé sa...@users.sourceforge.net:
--
nosy: +sable
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11732
___
___
Changes by Catalin Iacob iacobcata...@gmail.com:
--
nosy: +catalin.iacob
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11732
___
___
Catalin Iacob iacobcata...@gmail.com added the comment:
To avoid messing with system registry settings it sounds like
WerRegisterRuntimeExceptionModule could also work, at least on Windows7
http://msdn.microsoft.com/en-us/library/windows/desktop1/dd408167%28v=VS.85%29.aspx
There could be a
Brian Curtin br...@python.org added the comment:
That would certainly be preferable when available on Windows 7. I'll look into
how we can incorporate that.
Thanks for the idea!
--
___
Python tracker rep...@bugs.python.org
STINNER Victor victor.stin...@haypocalc.com added the comment:
Issue #12481 has been marked as duplicate: I'm getting the dreaded
python_d.exe has stopped working popups in test_faulthandler on Windows 7 +
VisualStudioPro + Debug|x64.
--
nosy: +skrah
STINNER Victor victor.stin...@haypocalc.com added the comment:
Most (all?) Windows machines have error reporting enabled unless you mess with
the registry manually
It is disabled on all Windows buildbots. test_capi does also test a crash (I
don't know/remember which test exactly).
--
Stefan Krah stefan-use...@bytereef.org added the comment:
For test_capi the patch in #9116 works. For test_faulthandler it
doesn't, unfortunately.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11732
Stefan Krah stefan-use...@bytereef.org added the comment:
Instead of skipping the test, I prefer to disable temporary the popup by
setting the right registry key (and then restore the previous value or delete
the key).
Do you mean that the user should change/restore the key or that the
Python
STINNER Victor victor.stin...@haypocalc.com added the comment:
Do you mean that the user should change/restore the key
or that the Python tests should do that?
Python can change temporary the registry value for the duration of the test.
--
___
Brian Curtin br...@python.org added the comment:
Disabling and re-enabling is another possibility, and it's probably more likely
to help in the long run. Most (all?) Windows machines have error reporting
enabled unless you mess with the registry manually, so the only place tests
would be run
New submission from Brian Curtin br...@python.org:
Attached is a patch which adds skip_unless_unattended, which ideally would be
used with at least test_faulthandler when running on Windows.
Running the tests on a Windows desktop results in the user having to click
through Windows Error
Brian Curtin br...@python.org added the comment:
Attached is an example of how this might be used with
Lib/test/test_faulthandler.py
--
nosy: +haypo, loewis
Added file: http://bugs.python.org/file21494/faulthandler_example.diff
___
Python tracker
STINNER Victor victor.stin...@haypocalc.com added the comment:
Ah yes, I have also issues with the Windows fault handler (the popup). I
disabled this popup manually in my Windows XP box.
Instead of skipping the test, I prefer to disable temporary the popup by
setting the right registry key
STINNER Victor victor.stin...@haypocalc.com added the comment:
Ubuntu has also a fault handler: Apport.
https://wiki.ubuntu.com/Apport
Fedora has abrt.
https://fedorahosted.org/abrt/wiki
http://fedoraproject.org/wiki/Features/ABRT
If we should to disable the Windows fault handler, we may also
26 matches
Mail list logo