Application crash on IKImageBrowserView clicking after running some time.

Discussion in 'Mac Programming' started by mkristain, Nov 23, 2011.

  1. mkristain macrumors regular

    Joined:
    Aug 18, 2011
    #1
    Hi all,

    i really dont understand what is happening ,application running perfectly fine,

    but after some time of running application when i click on item of IKImageBrowserView,application crashed.

    Exception Type: EXC_BAD_ACCESS (SIGBUS)
    Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000020
    Crashed Thread: 0 Dispatch queue: com.apple.main-thread

    0x92365917 objc_msgSend + 23
    0x95fb8c92 -[NSToolTipManager mouseEntered:]
    0x95ed33ee -[NSApplication sendEvent:] + 6016
    0x95e66ec5 -[NSApplication run] + 917
    0x95e5ef01 NSApplicationMain + 574
    0x00002b5c main + 30
    0x00002b35 start + 53

    i really dont understand where is the error occur,please help me to find out this and solved this.
     
  2. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #2
    It sounds like your have a dangling pointer to an deallocated object.

    Sometimes sending an message to deallocated (aka zombie) object won't crash the application immediately because the bits of the object are still intact in memory. However after time that memory gets reused by another object, then when you send a message to the deallocated object your application will crash.
     
  3. mkristain thread starter macrumors regular

    Joined:
    Aug 18, 2011
    #3
    so where i can found this,on imageBrowserSelectionDidChange: or any where else.
     
  4. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #4
    Assuming your using XCode 4.2, go into the Product menu and choose Profile.

    This will launch Instruments. Choose the Zombies profile and click Profile.

    Your application should launch. Test is out. If you send a message to a zombie object, Instruments will popup a balloon titled Zombie Messaged. Click the white arrow on the grey circle in that balloon. The table at the bottom of Instruments will give you a history of the object including when it was allocated and released.
     
  5. mkristain thread starter macrumors regular

    Joined:
    Aug 18, 2011
    #5
    my Xcode Version is 3.2.2 ,here is no Product menu to choose Profile.
     

Share This Page