Sorry for the late response! I built from CVS just fine, but the problem
persists. I think it may be an issue with the wxWindows shared library
though - not Python. I can start up two copies of the Python interactive
terminal just fine. It is only when I try to run a wxPython script in two
terminals that I get the bus error. I haven't done extensive testing, but
this is what I have found so far. Is there any way to track down what "Bus
error" means exactly? =)
Then this may be another example of the bug I ran into, but then again it may
be something completely different. I'll explain my findings, this may help you
along.
As of 10.1 Mac OS X is a lot more critical about using Carbon in non-.app
programs. Apparently this was already officially illegal in 10.0, but only
since 10.1 are there real problems. One thing you cannot do is include
window-related portions of Carbon.framework (such as WindowMgr or DialogMgr
calls) if no window manager is available (ssh connection as another user than
the person logged in on the desktop, OS X Server, >console style login). You
will immedeately get
kCGErrorIllegalArgument : CGSNewConnection cannot get connection port
kCGErrorIllegalArgument : CGSNewConnection cannot get connection port
kCGErrorInvalidConnection : CGSGetEventPort: Invalid connection
and then a crash.
Even if you do have a window manager it seems calling using Carbon from a
non-.app program is dangerous. If you call the program once from a terminal
window everything seems fine. Except of course that a non-.app program can
open windows, but it can't interact with them, show up in the toolbar, etc
(you were aware of this, by the way, that you must be a .app style bundle to
interact with the user?).
But: if you call that same program a second time from a different window you
will probably get a coredump. Trying to debug this is difficult (when either
copy is run under gdb everything works fine!), but by tracing library loading
it seems that the crash is in the initialization of the HIToolbox portion of
Carbon.
The conclusion of all this is that it seems unsafe to link anything that could
be run from the commandline against Carbon. If this appears to be the problem
with wxWindows too the solution is simple: use a .app. If you're hosting this
in Python already (I think you are, right?) then build the Python.app
according to the instructions in Mac/OSX/README in the python disitrbuiton.
···
--
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm