Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3298] Closing a SplitWindow while the master view popover is visible causes a crash

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-07-11T15:35:14.000+0000
Affected Version/sRelease 1.7.1
Fix Version/sSprint 2011-28, Release 1.7.2
ComponentsiOS
Labelsipad, popover, splitview
ReporterCraig Marvelley
AssigneeStephen Tramer
Created2011-04-15T03:41:39.000+0000
Updated2011-07-11T15:35:14.000+0000

Description

I mentioned this in #944 but thought it better to add a ticket in its own right. If a SplitWindow is closed while the master view is being displayed in a popover the app crashes with the following error:

2011-03-06 13:18:52.817 S4CiPad[91506:207] *** Terminating app due to uncaught exception 'NSGenericException', reason: '-[UIPopoverController dealloc] reached while popover is still visible.'

I've seen tickets that suggest that functionality has either been added, or is destined to be added, that lets us control the popover's visibility programmatically but I think Appcelerator needs to be more robust and if necesary close the popover automatically when the SplitWindow is closed.

I've attached a test case for the issue. I've also got a patch for this that you may find acceptable, I'll update this issue once I've forked the project and committed it.

Attachments

FileDateSize
app.js2011-04-15T03:41:40.000+0000810
TIMOB-3298 crash log.txt2011-07-07T11:43:18.000+000025254

Comments

  1. Craig Marvelley 2011-04-15

    Pull request is here: https://github.com/appcelerator/titanium_mobile/pull/77">https://github.com/appcelerator/titanium_mobile/pull/77

  2. Stephen Tramer 2011-06-16

    Managed by pull request #77
  3. Thomas Huelbert 2011-07-05

    crashing using 1.7.2.v20110630161836 + ipad 1 (3.2), assigned TO you as per email conversation
  4. Stephen Tramer 2011-07-05

    CP'd to 1.7.2; crashing bug, fixed.
  5. Alan Vaghti 2011-07-07

    version=1.7.2 timestamp=06/28/11 13:38 githash=a8dd437... On all supported iPads (v1, v2) and all supported iOS's (3.2-4.3.3). Steps to reproduce: 1)Start in landscape orientation 2)launch application 3)tap close Results: Application has crashed (see log below and crash log attached) Jul 7 11:35:50 unknown 3298[888] : *** Terminating app due to uncaught exception 'NSGenericException', reason: '-[UIPopoverController dealloc] reached while popover is still visible.' *** Call stack at first throw: ( 0 CoreFoundation 0x31e0164f __exceptionPreprocess + 114 1 libobjc.A.dylib 0x36afac5d objc_exception_throw + 24 2 CoreFoundation 0x31e01491 +[NSException raise:format:arguments:] + 68 3 CoreFoundation 0x31e014cb +[NSException raise:format:] + 34 4 UIKit 0x3374272d -[UIPopoverController dealloc] + 56 5 CoreFoundation 0x31d65c43 -[NSObject(NSObject) release] + 30 6 3298 0x000cd25d 3298 + 836189 7 CoreFoundation 0x31d65c43 -[NSObject(NSObject) release] + 30 8 3298 0x000aa8f9 3298 + 694521 9 CoreFoundation 0x31d65c43 -[NSObject(NSObject) release] + 30 10 CoreFoundation 0x31d661a1 CFRelease + 68 11 CoreFoundation 0x31d68ebb _CFAutoreleasePoolPop + 146 12 Foundation 0x30e40bb5 NSPopAutoreleasePool + 8 13 Foundation 0x30ecf90f __NSThreadPerformPerform + 626 14 CoreFoundation 0x31dd8a79 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12 15 CoreFoundation 0x31dda75f __CFRunLoopDoSources0 + 382 16 CoreFoundation 0x31ddb4eb __CFRunLoopRun + 230 17 CoreFoundation 0x31d6bec3 CFRunLoopRunSpecific + 230 18 CoreFoundation 0x31d6bdcb CFRunLoopRunInMode + 58 19 GraphicsServices 0x32f5441f GSEventRunModal + 114 20 GraphicsServices 0x32f544cb GSEventRun + 62 21 UIKit 0x334d4d69 -[UIApplication _run] + 404 22 UIKit 0x334d2807 UIApplicationMain + 670 23 3298 0x00004095 3298 + 12437 24 3298 0x00003934 3298 + 10548 ) Jul 7 11:35:50 unknown UIKitApplication:com.appcelerator.3298[0xe98e][888] : terminate called after throwing an instance of 'NSException' Jul 7 11:35:50 unknown ReportCrash[889] : Formulating crash report for process 3298[888]
  6. Alan Vaghti 2011-07-07

    The same error is reproducible on the iPad simulator running iOS 5.0. The application crashes upon launching on the iPad simulator running iOS 4.3.2.
  7. Stephen Tramer 2011-07-07

    Tested with a bad githash - the commit to 1_7_X is githash 12539fa, which post-dates a8dd437 (fix-version). Latest githash for 1_7_X is 8b7fa97. Please test this bug again with that, and reopen if necessary.
  8. Alan Vaghti 2011-07-11

    Retested in build 1.7.2.v20110711104645 version=1.7.2 timestamp=07/11/11 10:46 githash=5b3e15a... Crash is reproducible on all supported iPads (v1, v2) and all supported iOS's (3.2-4.3.3). Crash is reproducible in both portrait and landscape view when tapping close.
  9. Alan Vaghti 2011-07-11

    Retested in build 1.7.2.v20110711104645 version=1.7.2 timestamp=07/11/11 10:46 githash=5b3e15a... Passed on all supported iPads (v1, v2) and all supported iOS's (3.2-4.3.3).

JSON Source