NSRunLoop running with no mode/PrefPane crashing
NSRunLoop running with no mode/PrefPane crashing
- Subject: NSRunLoop running with no mode/PrefPane crashing
- From: Stuart Yarrow <email@hidden>
- Date: Thu, 16 Sep 2004 00:21:47 +0100
Hi
As I have mentioned before on this list, I have a preference pane that
communicates with a kext via the IORegistry and with a MIDI driver via
a CFMessagePort. When the pane is opened from System Preferences as
normal, everything works fine. If the pane is opened by
double-clicking the bundle directly in the Finder, System Preferences
starts, gets some of the way through initialising the pane, and then
quits or crashes silently (no crash log) without ever displaying a
window. Some checking revealed that the pane's classes were going
through the same initialisation steps in each case.
After further investigation, it appears that the problem may involve
the PrefPane's run loop. I added debugging code to log a summary of my
NSRunLoop immediately before the point where the program crashes.
When started normally from System Preferences, I get this:
2004-09-10 13:28:53.871 System Preferences[1502] FingaMIDI: run loop
info: <CFRunLoop 0x1139a0 [0xa01900e0]>{locked = false, wait port =
0xf03, stopped = true,
current mode = kCFRunLoopDefaultMode,
common modes = <CFSet 0x1139d0 [0xa01900e0]>{count = 3, capacity = 4,
values = (
1 : <CFString 0xa0195b40 [0xa01900e0]>{contents =
"kCFRunLoopDefaultMode"}
2 : <CFString 0xa2dc46a0 [0xa01900e0]>{contents =
"NSEventTrackingRunLoopMode"}
4 : <CFString 0xa2dc4690 [0xa01900e0]>{contents =
"NSModalPanelRunLoopMode"}
)},
<-- snip -->
When starting by double clicking the pane bundle from the Finder, I get:
2004-09-10 13:30:13.408 System Preferences[1506] FingaMIDI: run loop
info: <CFRunLoop 0x1139a0 [0xa01900e0]>{locked = false, wait port =
0xf03, stopped = false,
current mode = (none),
common modes = <CFSet 0x1139d0 [0xa01900e0]>{count = 3, capacity = 4,
values = (
1 : <CFString 0xa0195b40 [0xa01900e0]>{contents =
"kCFRunLoopDefaultMode"}
2 : <CFString 0xa2dc46a0 [0xa01900e0]>{contents =
"NSEventTrackingRunLoopMode"}
4 : <CFString 0xa2dc4690 [0xa01900e0]>{contents =
"NSModalPanelRunLoopMode"}
)},
<-- snip -->
i.e. in the case where it fails, the run loop appears to be running but
to have no mode! If I call [[NSRunLoop currentRunLoop] run] then
System Prefs crashes at that point, again without generating a crash
log. Am I reading these summaries correctly? Anyone have any idea
what might be going on?
Also, is it still possible to search the list archives? I couldn't work
out how to do this with the new system...and Google doesn't seem to
have indexed them.
Any help or advice much appreciated...
cheers,
-Stuart
Stuart Yarrow
-------------------------------------------------------------
Subcity Radio - http://www.subcity.org/
http://fingamidi.sourceforge.net/
http://www.outpost.org.uk/
http://www.SSPaberdeensouth.org.uk/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden