{ "id": "62643", "key": "TIMOB-2011", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11255", "name": "Sprint 2011-20", "archived": true, "released": true, "releaseDate": "2011-05-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-05-25T17:50:05.000+0000", "created": "2011-04-15T03:08:01.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "crash", "ios", "javascript", "modal", "release-1.7.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-05-25T17:50:05.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

If opening a new modal window via a new javascript file, and\nthis javascript file has errors, the iPhone emulator would crash.\nThe reason why is that the red alert window is animating on top of\nthe modal animation at the same time, thus would run into animation\nexception and crash the emulator.

\n

For example,

\n

\nvar editWin = Ti.UI.createWindow( { url: 'edit.js', title:\n\"Edit\", backgroundColor: 'white' } );\n\n\neditWin.open({ modal: true, modalStyle:\nTi.UI.iPhone.MODAL_PRESENTATION_PAGESHEET, navBarHidden: true });\n

\n

If the \"edit.js\" has an error, like a null reference exception,\nthe app would crash. The stacktrace would be something like this\n...

\n

ERROR] Script Error = Can't find variable: contactByIds at\nedit.js (line 68).
\n2010-10-05 17:01:21.458 Marrily[8996:207] Assertion\nfailure in -[UIWindowController\ntransition:fromViewController:toViewController:target:didEndSelector:],\n/SourceCache/UIKit_Sim/UIKit-1262.60.3/UIWindowController.m:182
\n[ERROR] The application has crashed with an\nunhandled exception. Stack trace: 0 CoreFoundation 0x03807b7c\nexceptionPreprocess + 156
\n1 libobjc.A.dylib 0x0395740e objc_exception_throw + 47
\n2 CoreFoundation 0x037c0238 +[NSException raise:format:arguments:]\n+ 136
\n3 Foundation 0x0062ae37 -[NSAssertionHandler\nhandleFailureInMethod:object:file:lineNumber:description:] +\n116
\n4 UIKit 0x00ac944f -[UIWindowController\ntransition:fromViewController:toViewController:target:didEndSelector:]\n+ 212
\n5 UIKit 0x008de10d -[UIViewController\npresentModalViewController:withTransition:] + 2937
\n6 Marrily 0x00137079 -[TiApp attachModal:toController:animated:] +\n290
\n7 Marrily 0x001370a8 -[TiApp attachModal:toController:animated:] +\n337
\n8 Marrily 0x00135b13 -[TiApp showModalController:animated:] +\n231
\n9 Marrily 0x0005386c -[TiWindowProxy open:] + 2436
\n10 Foundation 0x005af3ca
NSThreadPerformPerform + 251
\n11 CoreFoundation 0x037e8faf\nCFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION\n+ 15
\n12 CoreFoundation 0x0374739b CFRunLoopDoSources0 + 571
\n13 CoreFoundation 0x03746896
CFRunLoopRun + 470
\n14 CoreFoundation 0x03746350 CFRunLoopRunSpecific + 208
\n15 CoreFoundation 0x03746271 CFRunLoopRunInMode + 97
\n16 GraphicsServices 0x053ee00c GSEventRunModal + 217
\n17 GraphicsServices 0x053ee0d1 GSEventRun + 115
\n18 UIKit 0x0083eaf2 UIApplicationMain + 1160
\n19 Marrily 0x00003b49 main + 362
\n20 Marrily 0x00002931 start + 53
\n21 ??? 0x00000001 0x0 + 1
\n2010-10-05 17:01:21.461 Marrily[8996:207]
Terminating\napp due to uncaught exception 'NSInternalInconsistencyException',\nreason: 'Attempting to begin a modal transition from\n<TiErrorController: 0x7ee6590> to <UINavigationController:\n0x7ef0df0> while a transition is already in progress. Wait for\nviewDidAppear/viewDidDisappear to know the current transition has\ncompleted'
\n*** Call stack at first throw: ( 0 CoreFoundation 0x03807b99\nexceptionPreprocess + 185
\n1 libobjc.A.dylib 0x0395740e objc_exception_throw + 47
\n2 CoreFoundation 0x037c0238 +[NSException raise:format:arguments:]\n+ 136
\n3 Foundation 0x0062ae37 -[NSAssertionHandler\nhandleFailureInMethod:object:file:lineNumber:description:] +\n116
\n4 UIKit 0x00ac944f -[UIWindowController\ntransition:fromViewController:toViewController:target:didEndSelector:]\n+ 212
\n5 UIKit 0x008de10d -[UIViewController\npresentModalViewController:withTransition:] + 2937
\n6 Marrily 0x00137079 -[TiApp attachModal:toController:animated:] +\n290
\n7 Marrily 0x001370a8 -[TiApp attachModal:toController:animated:] +\n337
\n8 Marrily 0x00135b13 -[TiApp showModalController:animated:] +\n231
\n9 Marrily 0x0005386c -[TiWindowProxy open:] + 2436
\n10 Foundation 0x005af3ca
NSThreadPerformPerform + 251
\n11 CoreFoundation 0x037e8faf\nCFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION\n+ 15
\n12 CoreFoundation 0x0374739b CFRunLoopDoSources0 + 571
\n13 CoreFoundation 0x03746896
CFRunLoopRun + 470
\n14 CoreFoundation 0x03746350 CFRunLoopRunSpecific + 208
\n15 CoreFoundation 0x03746271 CFRunLoopRunInMode + 97
\n16 GraphicsServices 0x053ee00c GSEventRunModal + 217
\n17 GraphicsServices 0x053ee0d1 GSEventRun + 115
\n18 UIKit 0x0083eaf2 UIApplicationMain + 1160
\n19 Marrily 0x00003b49 main + 362
\n20 Marrily 0x00002931 start + 53
\n21 ??? 0x00000001 0x0 + 1
\n) terminate called after throwing an instance of 'NSException'

{html}", "attachment": [], "flagged": false, "summary": "Opening new modal window with JS error will crash the app", "creator": { "name": "alexle", "key": "alexle", "displayName": "Alex Le", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "alexle", "key": "alexle", "displayName": "Alex Le", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "127248", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Still valid. Test checked into bugtests.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:08:02.000+0000", "updated": "2011-04-15T03:08:02.000+0000" }, { "id": "127249", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Forgot, this is a high priority as it's a BAD crasher.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:08:02.000+0000", "updated": "2011-04-15T03:08:02.000+0000" }, { "id": "132587", "author": { "name": "jacobrelkin", "key": "jacobrelkin", "displayName": "Jacob Relkin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a bug that runs quite deep. What to do when JSLint throws errors is yet to be determined. Putting on hold and assigning to Reggie.", "updateAuthor": { "name": "jacobrelkin", "key": "jacobrelkin", "displayName": "Jacob Relkin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-21T15:58:40.000+0000", "updated": "2011-04-21T15:58:40.000+0000" }, { "id": "133457", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Per the last comment, this is on hold and not fixed yet. Setting to Unresolved.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-11T16:21:59.000+0000", "updated": "2011-05-11T16:21:59.000+0000" }, { "id": "134304", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "ipad1 4.3 Titanium SDK version: 1.7.0 (05/24/11 22:37 294b6aa...)", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-25T17:50:05.000+0000", "updated": "2011-05-25T17:50:05.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }