[TIMOB-3561] iOS: Need to handle thrown exceptions in simulator
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-12-01T11:48:28.000+0000 |
Affected Version/s | Release 1.6.0 |
Fix Version/s | Sprint 2011-16, Sprint 2011-48, Release 1.8.0.1 |
Components | iOS |
Labels | defect, exceptions, ios, reported-1.7.0 |
Reporter | Stephen Tramer |
Assignee | Stephen Tramer |
Created | 2011-04-15T03:46:41.000+0000 |
Updated | 2011-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.)
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)
Filed radar bug with Apple. Bug # is 9306829.
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.
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