Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4271716
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:28:47+00:00 2026-05-21T07:28:47+00:00

(Edit: is not just happening when screen is being touched. It seems to happen

  • 0

(Edit: is not just happening when screen is being touched. It seems to happen if the program has not recently started. Will keep investigating, but please respond with your ideas. May be related to this problem).

My iPhone project won’t do anything with NSExceptions when the screen is being touched when it’s been running for a few seconds.

When it has just started, it’s fine. If (for example) I cause an exception in my code here:

NSException *e = [NSException
        exceptionWithName:@"Testing"
        reason:@"Testing exception handling"
        userInfo:nil];
@throw e;
if (touched) {
}

…then the exception works as expected. If I’ve used NSSetUncaughtExceptionHandler then my &uncaughtExceptionHandler gets called; if I haven’t, I get SIGABRT and the program terminates. All good.

But if I replace that with the following code (where touched is true if there’s just been a touchesBegan):

if (touched) {
    NSException *e = [NSException
            exceptionWithName:@"Testing"
            reason:@"Testing exception handling"
            userInfo:nil];
    @throw e;
}

…then the my NSSetUncaughtExceptionHandler code isn’t called, and no SIGABRT signal is received. It seems to just stop performing that run loop & start the next one.

If you set a breakpoint there and do ‘step over’ or ‘step into’, then it just starts running as if you’d hit continue (but without running the remainder of that run loop).

The same thing happens in different classes. I have no try/catches that could be hijacking the NSException. It behaves the same way if I do something like…

[[NSArray array] objectAtIndex:1];

…to do the exception. It happens the same in both the simulator and the device.

Please help the exceptions get the recognition they deserve!


In response to bbum, here is the backtrace for the 1st case above, where the exception works as expected:

(gdb) BT
#0  -[Hud paintHudWithController:] (self=0x6475ee0, _cmd=0xbeb61, controller=0x686ac00) at /Users/mike/iPhone Dev/Parsec/Classes/Hud.m:2804
#1  0x00004f8e in -[ES1Renderer(Artist) paint] (self=0xa108a90, _cmd=0xc1b48) at /Users/mike/iPhone Dev/Parsec/Classes/ES1Renderer+Artist.m:92
#2  0x00003c22 in -[ES1Renderer render] (self=0xa108a90, _cmd=0x5f0dbb9) at /Users/mike/iPhone Dev/Parsec/Classes/ES1Renderer.m:81
#3  0x00003476 in -[EAGLView drawView:] (self=0xa103a70, _cmd=0xbe451, sender=0x64068a0) at /Users/mike/iPhone Dev/Parsec/Classes/EAGLView.m:79
#4  0x00c3c6a8 in CA::Display::DisplayLink::dispatch ()
#5  0x00c3c7ed in CA::Display::EmulatorDisplayLink::callback ()
#6  0x01494fe3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#7  0x01496594 in __CFRunLoopDoTimer ()
#8  0x013f2cc9 in __CFRunLoopRun ()
#9  0x013f2240 in CFRunLoopRunSpecific ()
#10 0x013f2161 in CFRunLoopRunInMode ()
#11 0x000089e7 in -[Ticker tick] (self=0x686ac00, _cmd=0xbeb83) at /Users/mike/iPhone Dev/Parsec/Ticker.m:87
#12 0x00004e99 in -[ES1Renderer(Artist) paint] (self=0xa108a90, _cmd=0xc1b48) at /Users/mike/iPhone Dev/Parsec/Classes/ES1Renderer+Artist.m:67
#13 0x00003c22 in -[ES1Renderer render] (self=0xa108a90, _cmd=0x5f0dbb9) at /Users/mike/iPhone Dev/Parsec/Classes/ES1Renderer.m:81
#14 0x00003476 in -[EAGLView drawView:] (self=0xa103a70, _cmd=0xbe451, sender=0x0) at /Users/mike/iPhone Dev/Parsec/Classes/EAGLView.m:79
#15 0x000034ec in -[EAGLView layoutSubviews] (self=0xa103a70, _cmd=0x81b3de) at /Users/mike/iPhone Dev/Parsec/Classes/EAGLView.m:85
#16 0x00b80451 in -[CALayer layoutSublayers] ()
#17 0x00b8017c in CALayerLayoutIfNeeded ()
#18 0x00b7937c in CA::Context::commit_transaction ()
#19 0x00b790d0 in CA::Transaction::commit ()
#20 0x00ba97d5 in CA::Transaction::observer_callback ()
#21 0x01494fbb in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ ()
#22 0x0142a0e7 in __CFRunLoopDoObservers ()
#23 0x013f2bd7 in __CFRunLoopRun ()
#24 0x013f2240 in CFRunLoopRunSpecific ()
#25 0x013f2161 in CFRunLoopRunInMode ()
#26 0x01de8268 in GSEventRunModal ()
#27 0x01de832d in GSEventRun ()
#28 0x0041e42e in UIApplicationMain ()
#29 0x000024a4 in main (argc=1, argv=0xbffff040) at /Users/mike/iPhone Dev/Parsec/main.m:13

and here is the backtrace for the 2nd case above, where the exception is apparently eaten:

(gdb) BT
#0  -[Hud paintHudWithController:] (self=0x6469710, _cmd=0xbeb61, controller=0x6855000) at /Users/mike/iPhone Dev/Parsec/Classes/Hud.m:2806
#1  0x00004a36 in -[ES1Renderer(Artist) paint] (self=0x7922720, _cmd=0xc1b48) at /Users/mike/iPhone Dev/Parsec/Classes/ES1Renderer+Artist.m:92
#2  0x000036ca in -[ES1Renderer render] (self=0x7922720, _cmd=0x5f0dbb9) at /Users/mike/iPhone Dev/Parsec/Classes/ES1Renderer.m:81
#3  0x00002f1e in -[EAGLView drawView:] (self=0x7907de0, _cmd=0xbe451, sender=0x7926cd0) at /Users/mike/iPhone Dev/Parsec/Classes/EAGLView.m:79
#4  0x00c3c6a8 in CA::Display::DisplayLink::dispatch ()
#5  0x00c3c7ed in CA::Display::EmulatorDisplayLink::callback ()
#6  0x01494fe3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#7  0x01496594 in __CFRunLoopDoTimer ()
#8  0x013f2cc9 in __CFRunLoopRun ()
#9  0x013f2240 in CFRunLoopRunSpecific ()
#10 0x013f2161 in CFRunLoopRunInMode ()
#11 0x01de8268 in GSEventRunModal ()
#12 0x01de832d in GSEventRun ()
#13 0x0041e42e in UIApplicationMain ()
#14 0x00001f4c in main (argc=1, argv=0xbffff040) at /Users/mike/iPhone Dev/Parsec/main.m:13
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T07:28:48+00:00Added an answer on May 21, 2026 at 7:28 am

    I encountered the same thing in an OpenGL project a few weeks ago. It’s because the display link installs a top-level exception handler. No way to get around this unfortunately, except to install your OWN mid-level exception handler in your display link handler and doing an abort () there if you catch an exception.

    Worked for me, at least.

    addendum: just discovered Core Animation also installs a top-level exception handler. Check for “CoreAnimation: ignoring exception” in your logs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This has something that's just started happening recently, although I'm not sure what I
Edit: It's not a bug as Martin pointed out. I'm just crossing the daylight
Edit (updated question) I have a simple C program: // it is not important
Edit: since I was appending via text the file was not being saved properly,
EDIT : I completely re-wrote the question since it seems like I was not
[edit] I am NOT using jquery in this app. Looking for a way to
[EDIT] I am NOT accepting any answer which involves BigInteger, or other similarly inefficient
edit: I'm not looking for you to debug this code. If you are familiar
LATER EDIT: Please mention not only game programming books, but also more scientific/simulation oriented
EDIT I isolated a real minimal example which does not work (it is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.