Curious AppKit Crash

  • Hey List,

    Rebuilt one of our projects using the latest Xcode tools and suddenly
    started seeing crashes in the AppKit window handling code (see stack
    trace below). Basically, I'm invoking a method using
    performSelectorOnMainThread, then displaying a window by passing
    makeKeyAndOrderFront to its IBOutlet. I'm never invoking the AppKit
    from anything but the main thread (hence the
    performSelectorOnMainThread) and all other threads are sound asleep
    at the time of the crash (which, by the way, always happens).

    Anyone seen anything like it before? Anything funny about
    performSelectorOnMainThread that I need to know about?

    Tried both gcc 3.3 / 10.3 SDK and gcc 4 / 10.4u SDK, with identical
    results.

    Thanks!

    Peace,
    Tobias Peciva

    Exception:  EXC_BAD_ACCESS (0x0001)
    Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x7fffdeb5

    Thread 0 Crashed:
    0  com.apple.Foundation         0x92960d18
    _NSAddExceptionHandlerForLock + 176
    1  com.apple.AppKit             0x9370b3d8 _NSAppKitLock + 64
    2  com.apple.AppKit             0x9373679c -[NSApplication _addWindow:]
    + 64
    3  com.apple.AppKit             0x93747084 -[NSWindow _commonAwake] + 2052
    4  com.apple.AppKit             0x9376d278 -[NSWindow
    makeKeyAndOrderFront:] + 104
    5  com.pharos.popup             0x0000e234 -[PUController
    startUserInteraction] + 744 (PUController.m:107)
    6  com.apple.Foundation         0x9296ea00 __NSFireMainThreadPerform + 276
    7  com.apple.CoreFoundation     0x9080da78 __CFRunLoopPerformPerform + 104
    8  com.apple.CoreFoundation     0x907dd4cc __CFRunLoopDoSources0 + 384
    9  com.apple.CoreFoundation     0x907dc9fc __CFRunLoopRun + 452
    10  com.apple.CoreFoundation     0x907dc47c CFRunLoopRunSpecific + 268
    11  com.apple.HIToolbox         0x93208740 RunCurrentEventLoopInMode + 264
    12  com.apple.HIToolbox         0x93207dd4 ReceiveNextEventCommon + 380
    13  com.apple.HIToolbox         0x93207c40
    BlockUntilNextEventMatchingListInMode + 96
    14  com.apple.AppKit             0x9370bae4 _DPSNextEvent + 384
    15  com.apple.AppKit             0x9370b7a8 -[NSApplication
    nextEventMatchingMask:untilDate:inMode:dequeue:] + 116
    16  com.apple.AppKit             0x93707cec -[NSApplication run] + 472
    17  com.apple.AppKit             0x937f887c NSApplicationMain + 452
    18  com.pharos.popup             0x0001fc44 main + 40 (main.m:5)
    19  com.pharos.popup             0x00008bfc _start + 348 (crt.c:272)
    20  com.pharos.popup             0x00008a9c start + 60
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today