Martin v. Löwis schrieb: >> Do you know if it is possible to configure windows so that debug assertions >> do NOT >> display a message box (it is very convenient for interactive testing, but >> not so >> for automatic tests)? > > You can use _set_error_mode(_OUT_TO_STDERR) to make assert() go to > stderr rather than to a message box. You can use > _CrtSetReportMode(_CRT_ASSERT /* or _CRT_WARN or CRT_ERROR */, > _CRTDBG_MODE_FILE) to make _ASSERT() go to a file; you need to > call _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR ) in > addition to make the file stderr. > > Not sure what window precisely you got, so I can't comment which > of these (if any) would have made the message go away.
Currently, the debug build of py3k fails in test_os.py with an assertion in the C library inside the execv call. This displays a dialogbox from the MSVC Debug Library: Debug Assertion Failed! Program: c:\svn\py3k\PCBuild\python_d.exe File: execv.c Line: 44 Expression: *argvector != NULL For information .... (Press Retry to debug the application) Abbrechen Wiederholen Ignorieren The last line is the labels on three buttons that are displayed. If I insert these statements into Modules\posixmodule.c: _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); _set_error_mode(_OUT_TO_STDERR); and recompile and test then the dialog box looks like this: Die Anweisung in "0x10..." verweist auf Speicher in "0x00000000". Der Vorgang "read" konnte nicht im Speciher durchgeführt werden. Klicken Sie auf "OK", um das programm zu beenden. Klicken Sie auf "Abbrechen", um das programm zu debuggen. OK Abbrechen These messageboxes of course hang the tests on the windows build servers, so probably it would be good if they could be disabled completely. Thomas _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com