On 13 May, 2010, at 20:41, Martin v. Löwis wrote: > Bill Janssen wrote: >> Martin v. Löwis <[email protected]> wrote: >> >>> Bill Janssen wrote: >>>> I've got parc-tiger-1 up and running again. It's failing on test_tk, >>>> which makes sense, because it's running as a background twisted process, >>>> and thus can't access the window server. >>> It doesn't really make sense. It should skip the test, instead of >>> failing it. I.e. aborting the Python process is definitely not a good >>> response. >> >> Yes, you're right. It's a bug in the test. > > No, I'd say it's even deeper, in the Tcl integration. > > There shouldn't be a way to cause an interpreter abort, except by > calling os.abort().
This is a bug in Tk:
>>> root = Tkinter.Tk()
Thu May 13 20:45:13 Rivendell.local python[84887] <Error>: kCGErrorFailure: Set
a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
_RegisterApplication(), FAILED TO establish the default connection to the
WindowServer, _CGSDefaultConnection() is NULL.
>>> 2010-05-13 20:45:16.751 Python[84887:d07] An uncaught exception was raised
2010-05-13 20:45:16.762 Python[84887:d07] Error (1002) creating CGSWindow
2010-05-13 20:45:16.955 Python[84887:d07] *** Terminating app due to uncaught
exception 'NSInternalInconsistencyException', reason: 'Error (1002) creating
CGSWindow'
*** Call stack at first throw:
(
0 CoreFoundation 0x00007fff85e31d24
__exceptionPreprocess + 180
1 libobjc.A.dylib 0x00007fff860000f3
objc_exception_throw + 45
2 CoreFoundation 0x00007fff85e31b47
+[NSException raise:format:arguments:] + 103
3 CoreFoundation 0x00007fff85e31ad4
+[NSException raise:format:] + 148
4 AppKit 0x00007fff84614aba
_NSCreateWindowWithOpaqueShape2 + 473
5 AppKit 0x00007fff845a9055 -[NSWindow
_commonAwake] + 1214
6 AppKit 0x00007fff845c6d3d -[NSWindow
_makeKeyRegardlessOfVisibility] + 96
7 AppKit 0x00007fff845c6cb2 -[NSWindow
makeKeyAndOrderFront:] + 24
8 Tk 0x000000010075b86c XMapWindow +
155
9 Tk 0x00000001006ca6d0 Tk_MapWindow
+ 89
10 Tk 0x00000001006d35e6
TkToplevelWindowForCommand + 2658
11 Tcl 0x00000001006300d3
TclServiceIdle + 76
12 Tcl 0x00000001006162ce
Tcl_DoOneEvent + 329
13 _tkinter.so 0x0000000100595683
Tkapp_CallDeallocArgs + 277
14 readline.so 0x00000001001f1f9a initreadline
+ 1280
15 Python 0x00000001000076a1
PyOS_Readline + 239
16 Python 0x0000000100008a57
PyTokenizer_FromString + 1322
17 Python 0x00000001000090a0
PyTokenizer_Get + 154
18 Python 0x0000000100005698
PyParser_AddToken + 1018
19 Python 0x00000001000a2320
PyParser_ASTFromFile + 146
20 Python 0x00000001000a443f
PyRun_InteractiveOneFlags + 345
21 Python 0x00000001000a4615
PyRun_InteractiveLoopFlags + 206
22 Python 0x00000001000a4685
PyRun_AnyFileExFlags + 76
23 Python 0x00000001000b0286 Py_Main +
2718
24 Python 0x0000000100000e6c start + 52
25 ??? 0x0000000000000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
Abort trap
This is running /usr/bin/python in a session as a user that doesn't have access
to the GUI. The text above says that there is an uncaught ObjC exception,
caused by the lack of a connection to the window server. Tk should have
converted that to its own style of errors but didn't.
Bill: could you please file an issue for this in the python tracker, it should
be possible to add a workaround for this to the Tkinter extension.
Ronald
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
