Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3561] iOS: Need to handle thrown exceptions in simulator

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-12-01T11:48:28.000+0000
Affected Version/sRelease 1.6.0
Fix Version/sSprint 2011-16, Sprint 2011-48, Release 1.8.0.1
ComponentsiOS
Labelsdefect, exceptions, ios, reported-1.7.0
ReporterStephen Tramer
AssigneeStephen Tramer
Created2011-04-15T03:46:41.000+0000
Updated2011-12-08T14:27:56.000+0000

Description

Bad news! iOS does not forward exceptions properly to the JSCore system, meaning that unhandled exceptions result in crashes. What we need to do is catch exceptions from Kroll invokes (and potentially on other threads via the uncaught exception handler...) and forward them to the JSCore system so that they can be caught on the user side (although if they're uncaught, we need to figure out what to do about that, and how JS responds.)

Could be handed off.

Comments

  1. Stephen Tramer 2011-04-19

    Turns out that this is a well-known bug with iOS 4.0+ simulator: http://stackoverflow.com/questions/3922693/how-to-handle-iphone-simulator-nsinvocation-issue-for-ios4-0 This bug does NOT affect devices. What we need to do is: 1. File a bug with Apple (even if it's a dupe) 2. Mark this ticket as dependent upon this bugfix 3. Replace any portion of the code that SHOULD be throwing exceptions but is currently logging with the right logic (exceptions)
  2. Stephen Tramer 2011-04-19

    Filed radar bug with Apple. Bug # is 9306829.
  3. Stephen Tramer 2011-11-30

    Blain provided an internal fix for this at some point; No longer reproducible in 1.8.0.1.ab0c003. Ticket can be resolved once drillbit is performing exception checks again.
  4. Natalie Huynh 2011-12-08

    version=1.8.0.1 timestamp=12/08/11 13:51 githash=99d7091 on iOS Simulator 5.0 ran buffer test, see the failure of exceptions not being thrown

JSON Source