Sudden crash in [NSApplication sendEvent:]

  • Hi folks!

    I hope that this question is not really stupid but I honestly can't find a solution for a looong time.
    The application I've been writing crashes on [NSApplication sendEvent:] (see the crash log below). It happens quite often but with no connection to user actions as it seems. It may crash after 5 or 10 minutes of work.. or few hours. Once it crashed during startup...

    Is there anyone who can suggest some way to catch the error????

    PID:    1063
    Thread: 0

    Exception:  EXC_BAD_ACCESS (0x0001)
    Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000020

    Thread 0 Crashed:
    0  libobjc.A.dylib           0x90a554c0 objc_msgSend + 16
    1  com.apple.AppKit         0x9334d350 -[NSApplication sendEvent:] + 5023
    2  com.apple.AppKit         0x93277dfe -[NSApplication run] + 547
    3  com.apple.AppKit         0x9326bd2f NSApplicationMain + 573
    4  com.likemac.DiskOrder     0x000029ca _start + 216
    5  com.likemac.DiskOrder     0x000028f1 start + 41

    Thread 1:
    0  libSystem.B.dylib         0x900268bc kevent + 12
    1  com.apple.Foundation     0x925f736c forkThreadForFunction + 123
    2  libSystem.B.dylib         0x90023d87 _pthread_body + 84

    Thread 2:
    0  libSystem.B.dylib         0x90024427 semaphore_wait_signal_trap + 7
    1  com.apple.Foundation     0x9264d2f8 -[NSConditionLock lockWhenCondition:] + 39
    2  com.apple.AppKit         0x93355270 -[NSUIHeartBeat _heartBeatThread:] + 377
    3  com.apple.Foundation     0x925f736c forkThreadForFunction + 123
    4  libSystem.B.dylib         0x90023d87 _pthread_body + 84

    Thread 0 crashed with X86 Thread State (32-bit):
      eax: 0x00000000    ebx: 0x93359f21 ecx: 0x90ab4afc edx: 0x00493550
      edi: 0x0046d804    esi: 0x00000008 ebp: 0xbffffa98 esp: 0xbffff978
      ss: 0x0000001f    efl: 0x00010206 eip: 0x90a554c0  cs: 0x00000017
      ds: 0x0000001f    es: 0x0000001f  fs: 0x00000000  gs: 0x00000037
  • On 6 sep 2007, at 13.15, Виктор Борщак wrote:

    > I hope that this question is not really stupid but I honestly can't
    > find a solution for a looong time.
    > The application I've been writing crashes on [NSApplication
    > sendEvent:] (see the crash log below). It happens quite often but
    > with no connection to user actions as it seems. It may crash after
    > 5 or 10 minutes of work.. or few hours. Once it crashed during
    > startup...

    To me it looks like a message sent to a deallocated object. The
    normal thing to do to track down such a problem would be to leverage
    NSZombieEnabled.

    <http://www.google.com/search?q=site:developer.apple.com
    +NSZombieEnabled
    >

    Crashing during launching of your application doesn't sound typical
    to a standard zombie though. Do you have a clean (no haxies or input
    managers) and known good system? Have this problem been reported on
    any other machines besides yours? Could it be a random memory smasher
    (typically from you writing some "unsafe" C-code)? Random memory
    smashers are best caught using GuardMalloc:

    <http://www.google.com/search?q=site:developer.apple.com+GuardMalloc>

    j o a r
previous month september 2007 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
Go to today