Crash in AppKit/CoreFoundation?

  • I recently released a universal binary to beta testers. My application
    does offline batch processing on audio files, using the Audio Units
    framework. In general, the process takes about 5 minutes per file, so I
    do this work in a separate thread. One of my users reported that the
    application crashed while about half way through the 15th file (of 24).
    He was able to resume his batch from that file, and complete it
    successfully.

    I have not been able to make heads or tails of this crash dump (below).
    I was hoping someone could point me in the right direction. It appears
    that none of it is really my code. What is the start/_start method? Some
    sort of auto-generated entry point? The application is in Objective-C++.
    My tester has a PPC mac, and I an Intel (so this crash happened on PPC).

    Thanks in advance!

    -Kevin

    Exception:  EXC_BREAKPOINT (0x0006)
    Code[0]:    0x00000001
    Code[1]:    0x907d2db8

    Thread 0 Crashed:
    0  com.apple.CoreFoundation    0x907d2db8 __CFDictionaryGrow + 704
    1  com.apple.CoreFoundation    0x907ee34c __CFBinaryPlistWriteToStream
    + 208
    2  com.apple.CoreFoundation    0x907f5b14
    __CFXNotificationSendToServer + 324
    3  com.apple.CoreFoundation    0x9081d284 _CFXNotificationSetSuspended
    + 248
    4  com.apple.AppKit            0x937dc914 -[NSApplication sendEvent:]
    + 1084
    5  com.apple.AppKit            0x939e1980 _NXFinishActivation + 244
    6  com.apple.AppKit            0x93833f90 -[NSWindow sendEvent:] + 3256
    7  com.apple.AppKit            0x937dd524 -[NSApplication sendEvent:]
    + 4172
    8  com.apple.AppKit            0x937d4960 -[NSApplication run] + 508
    9  com.apple.AppKit            0x938c5458 NSApplicationMain + 452
    10  com.YSPf.StretchFix          0x00002af8 _start + 760
    11  com.YSPf.StretchFix          0x000027fc start + 48

    Thread 1:
    0  libSystem.B.dylib            0x9002c3c8 semaphore_wait_signal_trap + 8
    1  libSystem.B.dylib            0x90030eac pthread_cond_wait + 480
    2  com.apple.Foundation        0x92bfc284 -[NSConditionLock
    lockWhenCondition:] + 68
    3  com.apple.AppKit            0x93875358 -[NSUIHeartBeat
    _heartBeatThread:] + 324
    4  com.apple.Foundation        0x92bf5118 forkThreadForFunction + 108
    5  libSystem.B.dylib            0x9002bd08 _pthread_body + 96
  • The __CFXNotificationSendToServer symbol in the call stack means that you have an NSNotification somewhere in your code that cause some plist serialization. This is were I would look for trashed objects.
    Some of your code function might not appear in a call stack for optimization reason.
    Also try using malloc debug and/or NSZombieEnabled to help you prevent this kind of problem.

    EG

    -----Original Message-----

    Thread 0 Crashed:
    0  com.apple.CoreFoundation    0x907d2db8 __CFDictionaryGrow + 704
    1  com.apple.CoreFoundation    0x907ee34c __CFBinaryPlistWriteToStream
    + 208
    2  com.apple.CoreFoundation    0x907f5b14
    __CFXNotificationSendToServer + 324
    3  com.apple.CoreFoundation    0x9081d284 _CFXNotificationSetSuspended
    + 248
    4  com.apple.AppKit            0x937dc914 -[NSApplication sendEvent:]
    + 1084
    5  com.apple.AppKit            0x939e1980 _NXFinishActivation + 244
    6  com.apple.AppKit            0x93833f90 -[NSWindow sendEvent:] + 3256
    7  com.apple.AppKit            0x937dd524 -[NSApplication sendEvent:]
    + 4172
    8  com.apple.AppKit            0x937d4960 -[NSApplication run] + 508
    9  com.apple.AppKit            0x938c5458 NSApplicationMain + 452
    10  com.YSPf.StretchFix          0x00002af8 _start + 760
    11  com.YSPf.StretchFix          0x000027fc start + 48

    ------------------------------------------------------------
    This message and any attachments (the "message") are confidential and intended solely for the addressee(s). Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither DxO Labs nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.
    Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. DxO Labs et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, modifie ou falsifie.
  • A crash in _CFDictionaryGrow suggests to me that your app has used up
    all the memory available to it. Does anything in your user's console
    log indicate this? If you're doing batch operations on a background
    thread, are you sure it's managing its memory properly?

    On 18 Nov 2008, at 03:30, Kevin Dixon wrote:

    > I recently released a universal binary to beta testers. My
    > application does offline batch processing on audio files, using the
    > Audio Units framework. In general, the process takes about 5 minutes
    > per file, so I do this work in a separate thread. One of my users
    > reported that the application crashed while about half way through
    > the 15th file (of 24). He was able to resume his batch from that
    > file, and complete it successfully.
    >
    > I have not been able to make heads or tails of this crash dump
    > (below). I was hoping someone could point me in the right direction.
    > It appears that none of it is really my code. What is the start/
    > _start method? Some sort of auto-generated entry point? The
    > application is in Objective-C++.
    > My tester has a PPC mac, and I an Intel (so this crash happened on
    > PPC).
    >
    > Thanks in advance!
    >
    > -Kevin
    >
    >
    > Exception:  EXC_BREAKPOINT (0x0006)
    > Code[0]:    0x00000001
    > Code[1]:    0x907d2db8
    >
    >
    > Thread 0 Crashed:
    > 0  com.apple.CoreFoundation    0x907d2db8 __CFDictionaryGrow + 704
    > 1  com.apple.CoreFoundation    0x907ee34c
    > __CFBinaryPlistWriteToStream + 208
    > 2  com.apple.CoreFoundation    0x907f5b14
    > __CFXNotificationSendToServer + 324
    > 3  com.apple.CoreFoundation    0x9081d284
    > _CFXNotificationSetSuspended + 248
    > 4  com.apple.AppKit            0x937dc914 -[NSApplication
    > sendEvent:] + 1084
    > 5  com.apple.AppKit            0x939e1980 _NXFinishActivation + 244
    > 6  com.apple.AppKit            0x93833f90 -[NSWindow sendEvent:] +
    > 3256
    > 7  com.apple.AppKit            0x937dd524 -[NSApplication
    > sendEvent:] + 4172
    > 8  com.apple.AppKit            0x937d4960 -[NSApplication run] + 508
    > 9  com.apple.AppKit            0x938c5458 NSApplicationMain + 452
    > 10  com.YSPf.StretchFix          0x00002af8 _start + 760
    > 11  com.YSPf.StretchFix          0x000027fc start + 48
    >
    > Thread 1:
    > 0  libSystem.B.dylib            0x9002c3c8
    > semaphore_wait_signal_trap + 8
    > 1  libSystem.B.dylib            0x90030eac pthread_cond_wait + 480
    > 2  com.apple.Foundation        0x92bfc284 -[NSConditionLock
    > lockWhenCondition:] + 68
    > 3  com.apple.AppKit            0x93875358 -[NSUIHeartBeat
    > _heartBeatThread:] + 324
    > 4  com.apple.Foundation        0x92bf5118 forkThreadForFunction +
    > 108
    > 5  libSystem.B.dylib            0x9002bd08 _pthread_body + 96