Strange Behavior: Xcode throws exception but will continue

Discussion in 'iOS Programming' started by waterskier2007, Nov 12, 2014.

  1. waterskier2007 macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #1
    So I am doing some PDF rendering and in a spot where I draw some text in a rect (NSString's drawInRect:withAttributes), I get an exception breakpoint triggered, but if I hit continue it moves on and everything works fine. I can't figure out why this is happening.

    The exception seems like it hits multiple times (I have to hit continue three times) but it is only executing that line once (it's not in a loop). How can I figure out what is causing this?
    Thanks!
     
  2. Ubuntu macrumors 68000

    Ubuntu

    Joined:
    Jul 3, 2005
    Location:
    UK/US
    #2
    The instruction pointer (the green bar) should show the exception on the right hand side - does it provide any hints?
     
  3. waterskier2007 thread starter macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #3
    Unfortunately no, not really. I have included a screenshot of the exception when it is hit (sorry for the odd dimensions)

    [​IMG]

    There no information when I hover over it or anything like that
     
  4. waterskier2007 thread starter macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #4
    So after doing some reading online I ran in the simulator and issued

    Code:
    po *(id *)($esp + 4)
    to the debugger after the 'exception' was thrown, to get back more information about the exception, and I got back

    Code:
    error: Couldn't apply expression side effects : Couldn't dematerialize a result variable: couldn't read its memory
    after googling that, I got nowhere but it seems like it is something on a deeper level than I will have access to
     

Share This Page