Trouble tracking down a crash

  • Not entirely cocoa - but Mac programming and I'm happy to be referred
    to a better place to ask this.

    My app crashes on exit with a memory access violation in objc_msgsnd
    (however it is spelled) - it seems to think the number 4 is a pointer
    somewhere.  The debugger is of little help - it has no stack
    information to show me and provides no context information at all.

    Tips on how to catch this beastie would be much appreciated.  As a
    last resort, I'm fixing to just call exit() after the save changed
    document step in the exit sequence.
  • Am 18.09.2007 um 19:29 schrieb Todd Blanchard:

    > Not entirely cocoa - but Mac programming and I'm happy to be
    > referred to a better place to ask this.
    >
    > My app crashes on exit with a memory access violation in objc_msgsnd
    > (however it is spelled) - it seems to think the number 4 is a
    > pointer somewhere.  The debugger is of little help - it has no stack
    > information to show me and provides no context information at all.

    Potentially your stack is hosed. Use google for MALLOC_DEBUG,
    NSZombieEnabled and CFZombieLevel.
  • On Sep 18, 2007, at 10:41 AM, Thomas Engelmeier wrote:
    > Am 18.09.2007 um 19:29 schrieb Todd Blanchard:
    >> My app crashes on exit with a memory access violation in
    >> objc_msgsnd (however it is spelled) - it seems to think the number
    >> 4 is a pointer somewhere.  The debugger is of little help - it has
    >> no stack information to show me and provides no context information
    >> at all.
    >
    > Potentially your stack is hosed. Use google for MALLOC_DEBUG,
    > NSZombieEnabled and CFZombieLevel.

    Don't forget libgmalloc.  It can be very useful for debugging
    overwrites, underwrites, writes to freed blocks, etc.  The
    libgmalloc(3) man page <x-man-page://3/libgmalloc> will tell you all
    about it and what options you can use with it.  There's also a hook in
    Xcode (in the Executable inspector) where you can tell it to run an
    executable using libgmalloc.

      -- Chris
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