{ "id": "80308", "key": "TIMOB-5285", "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": "12077", "description": "", "name": "Sprint 2011-37", "archived": true, "released": true, "releaseDate": "2011-09-19" }, { "id": "11971", "description": "iOS5 and select Android fixes", "name": "Release 1.7.3", "archived": true, "released": true, "releaseDate": "2011-10-18" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-11-22T11:27:43.000+0000", "created": "2011-09-14T09:32:19.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "branch-5062", "module_popover", "qe-testadded" ], "versions": [ { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [ { "id": "12783", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "63841", "key": "TIMOB-3209", "fields": { "summary": "iOS: Rapid Popover show/hide causes crash", "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" } }, "priority": { "name": "Trivial", "id": "5" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:46:30.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": "h1. Problem\r\nShowing and hiding a popover repeatedly can cause the app to crash.\r\n\r\nh2. Sample Code\r\nDrop the following in an app.js. Launch, and watch the fireworks. It crashes for me after only a couple iterations, but it may take longer depending on how the planets align.\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\nvar launchPopover = Ti.UI.createButton({\r\n title: 'Show Popover',\r\n top: 5, right: 5, left: 5,\r\n height: 30\r\n});\r\nvar popover = Ti.UI.iPad.createPopover({\r\n width: 250, height: 100,\r\n title: 'Test Popover Crash'\r\n});\r\nwin.addEventListener('open', function() {\r\n while (true) {\r\n delay(100);\r\n popover.show({ view: launchPopover });\r\n delay(100);\r\n popover.hide();\r\n }\r\n});\r\nwin.add(launchPopover);\r\nwin.open();\r\n\r\nfunction delay(time) {\r\n var end = new Date().getTime() + time;\r\n while (end > new Date().getTime()) {\r\n }\r\n}\r\n{code}\r\n\r\nh2. Exception\r\n{code}\r\n[DEBUG] application booted in 33.083022 ms\r\n\r\n[ERROR] The application has crashed with an unhandled exception. Stack trace:\r\n\r\n\r\n\r\n0 CoreFoundation 0x025ba58c __exceptionPreprocess + 156\r\n\r\n1 libobjc.A.dylib 0x0270e313 objc_exception_throw + 44\r\n\r\n2 CoreFoundation 0x02572ef8 +[NSException raise:format:arguments:] + 136\r\n\r\n3 CoreFoundation 0x02572e6a +[NSException raise:format:] + 58\r\n\r\n4 UIKit 0x00c5bbcc -[UIPopoverController dealloc] + 86\r\n\r\n5 Foundation 0x0068d891 __delayedPerformCleanup + 74\r\n\r\n6 CoreFoundation 0x025331de CFRunLoopTimerInvalidate + 446\r\n\r\n7 CoreFoundation 0x0259d0b7 __CFRunLoopDoTimer + 1799\r\n\r\n8 CoreFoundation 0x024f92c9 __CFRunLoopRun + 1817\r\n\r\n9 CoreFoundation 0x024f8840 CFRunLoopRunSpecific + 208\r\n\r\n10 CoreFoundation 0x024f8761 CFRunLoopRunInMode + 97\r\n\r\n11 GraphicsServices 0x041901c4 GSEventRunModal + 217\r\n\r\n12 GraphicsServices 0x04190289 GSEventRun + 115\r\n\r\n13 UIKit 0x0091dc93 UIApplicationMain + 1160\r\n\r\n14 play 0x00003f9a main + 410\r\n\r\n15 play 0x00002865 start + 53\r\n\r\n\r\n\r\n\r\n\r\n2011-09-14 18:27:30.549 play[55559:207] *** Terminating app due to uncaught exception 'NSGenericException', reason: '-[UIPopoverController dealloc] reached while popover is still visible.'\r\n\r\n*** Call stack at first throw:\r\n\r\n(\r\n\r\n\t0 CoreFoundation 0x025ba5a9 __exceptionPreprocess + 185\r\n\r\n\t1 libobjc.A.dylib 0x0270e313 objc_exception_throw + 44\r\n\r\n\t2 CoreFoundation 0x02572ef8 +[NSException raise:format:arguments:] + 136\r\n\r\n\t3 CoreFoundation 0x02572e6a +[NSException raise:format:] + 58\r\n\r\n\t4 UIKit 0x00c5bbcc -[UIPopoverController dealloc] + 86\r\n\r\n\t5 Foundation 0x0068d891 __delayedPerformCleanup + 74\r\n\r\n\t6 CoreFoundation 0x025331de CFRunLoopTimerInvalidate + 446\r\n\r\n\t7 CoreFoundation 0x0259d0b7 __CFRunLoopDoTimer + 1799\r\n\r\n\t8 CoreFoundation 0x024f92c9 __CFRunLoopRun + 1817\r\n\r\n\t9 CoreFoundation 0x024f8840 CFRunLoopRunSpecific + 208\r\n\r\n\t10 CoreFoundation 0x024f8761 CFRunLoopRunInMode + 97\r\n\r\n\t11 GraphicsServices 0x041901c4 GSEventRunModal + 217\r\n\r\n\t12 GraphicsServices 0x04190289 GSEventRun + 115\r\n\r\n\t13 UIKit 0x0091dc93 UIApplicationMain + 1160\r\n\r\n\t14 play 0x00003f9a main + 410\r\n\r\n\t15 play 0x00002865 start + 53\r\n\r\n)\r\n\r\nterminate called after throwing an instance of 'NSException'\r\n\r\n[DEBUG] App Spec: specified by path /Code/play/build/iphone/build/Debug-iphonesimulator/play.app\r\n[DEBUG] SDK Root: path=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk version=4.3 name=Simulator - iOS 4.3\r\n[DEBUG] using device family ipad\r\n[DEBUG] Session started\r\n[DEBUG] Session did end with error (null)\r\n[INFO] Application has exited from Simulator\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Showing and Hiding Popover Causing App Crash", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": "iPad Simulator 4.3", "comment": { "comments": [ { "id": "168180", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue still exists.\n\nTested with 1.8.0.v20111006001414 with iPad 2 4.3.5.\n\nLet it sit and eventually it will crash. Or you can rotate the device and it will crash faster.\n", "updateAuthor": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-06T15:48:38.000+0000", "updated": "2011-10-06T15:48:38.000+0000" }, { "id": "171267", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "Alan: I'm not seeing a crash. I ran the example code on my iPad 2 running 4.3.5 with 1.8.0, rotating it quite vigorously, for 5 or so minutes before I gave up. Were you running it for longer? If you are still seeing this crash, would you reopen the ticket and provide a crash log?\r\n\r\nversion=1.8.0\r\ntimestamp=10/28/11 15:46\r\ngithash=79c174b...", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-11-02T14:54:05.000+0000", "updated": "2011-11-02T14:54:05.000+0000" }, { "id": "173566", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with Ti Studio 1.0.7.201111182325 on OSX Lion\r\nTi Mob SDK 1.8.0.1.v20111121090256\r\niPhone 4S OS 5.0, iPad 2 OS 4.3.5\r\n\r\nPopover not causing crash when rotating or in one orientation", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-21T14:31:45.000+0000", "updated": "2011-11-21T14:31:45.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }