Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Hard crash in wish on OSX when no windowserver

Closed / Invalid3002320fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2010-05-16 09:36:18
When I start wish on OSX from a session that does not have access to the window server (for instance using an SSH connection as a user that is not logged on on the console) I get a hard crash due to an uncaught ObjC exception:

Sun May 16 11:30:39 Rivendell.local Wish[37073] <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-16 11:30:39.691 Wish[37073:903] setCanCycle: is deprecated.  Please use setCollectionBehavior instead
2010-05-16 11:30:39.704 Wish[37073:903] An uncaught exception was raised
2010-05-16 11:30:39.704 Wish[37073:903] Error (1002) creating CGSWindow
2010-05-16 11:30:39.705 Wish[37073:903] *** 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                                  0x00000001000c435a XMapWindow + 139
9   Tk                                  0x0000000100032d3c Tk_MapWindow + 84
10  Tk                                  0x000000010003db5f TkCreateFrame + 1869
11  Tcl                                 0x00000001001eec9c TclServiceIdle + 76
12  Tcl                                 0x00000001001d531d Tcl_DoOneEvent + 340
13  Tk                                  0x000000010001af93 Tk_MainLoop + 29
14  Tk                                  0x0000000100027257 Tk_MainEx + 1589
15  Wish                                0x00000001000044fe 0x0 + 4294984958
16  Wish                                0x00000001000044ac 0x0 + 4294984876
)
terminate called after throwing an instance of 'NSException'
Abort trap


I'd expect to get a Tcl error instead of a hard abort.

This also affects embedders of Tcl/Tk, the reason I post this issue is the following issue in the Python tracker: <http://bugs.python.org/issue8716>. I'm looking for a workaround for that issue (because we'll have to work with system versions of Tk) but it would be nice if this were fixed upstreams as well.
dkfplain2010-05-17 02:29:20
This is really a bug in Tk; please submit to https://sourceforge.net/tracker/?func=add&group_id=12997&atid=112997
sf-robotplain2010-05-31 09:20:10
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
sf-robotplain2010-05-31 09:20:11
allow_comments - 1
Log in (anonymous is fine) to add a comment.