Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2040] visible popover causes app crash during orientation chnage

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:57:53.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsiOS
Labelsdefect, ios, ipad, orientations, popover, rplist
Reporterctredway
AssigneeBlain Hamon
Created2011-04-15T03:08:49.000+0000
Updated2011-04-17T01:57:53.000+0000

Description

On the ipad, running 3.2,4.1 using 1.4.2 and 1.5 if a popover is visible during and orientation change, the app crashes.

From the console:
2010-10-11 08:10:58.455 iPadTestApp[16045:207] Terminating app due to uncaught exception 'NSGenericException', reason: '-[UIPopoverController dealloc] reached while popover is still visible.'
Call stack at first throw: ( 0 CoreFoundation 0x03815b99 exceptionPreprocess + 185
1 libobjc.A.dylib 0x0396540e objc_exception_throw + 47
2 CoreFoundation 0x037ce238 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x037ce1aa +[NSException raise:format:] + 58
4 UIKit 0x00bc38d4 -[UIPopoverController dealloc] + 86
5 Foundation 0x005d630d
delayedPerformCleanup + 74
6 CoreFoundation 0x0378e61e CFRunLoopTimerInvalidate + 446
7 CoreFoundation 0x037f877a CFRunLoopDoTimer + 1818
8 CoreFoundation 0x03754dd9
CFRunLoopRun + 1817
9 CoreFoundation 0x03754350 CFRunLoopRunSpecific + 208
10 CoreFoundation 0x03754271 CFRunLoopRunInMode + 97
11 GraphicsServices 0x053fc00c GSEventRunModal + 217
12 GraphicsServices 0x053fc0d1 GSEventRun + 115
13 UIKit 0x00866af2 UIApplicationMain + 1160
14 iPadTestApp 0x00003a59 main + 362
15 iPadTestApp 0x00002841 start + 53
16 ??? 0x00000001 0x0 + 1
) terminate called after throwing an instance of 'NSException'

Comments

  1. Stephen Tramer 2011-04-15

    Unable to replicate in KS-iPad->Main Tests->Popovers (on device). Going to try and create some other sample code but it appears that this bug may have been fixed.

  2. Stephen Tramer 2011-04-15

    Unable to replicate with this JS, either:

       var win = Ti.UI.createWindow({backgroundColor:'white'});
       
       var button = Ti.UI.createButton({
           title:'Show popover',
           width:250,
           height:40
       });
       button.addEventListener('click', function() {
           var popover = Ti.UI.iPad.createPopover({ 
                   width:200, 
                   height:350,
                   title:'Pop!',
                   barColor:'#111'
           }); 
           popover.show({view:button, animated:false});
       });
       win.add(button);
       
       win.open();
       

    Reassigning to Thom so he may confirm that this is fixed, and marking fixed-in-qa.

  3. Thomas Huelbert 2011-04-15

    I'm not able to to repro this crash in 1.4.x either? Clint to re-open if he has steps. closing on iPad 3.2.2 mobile sdk build 1.5.0.62c1cae

  4. Martin Prebio 2011-04-15

    I also receive this Exception, when I often close and reopen the popover, which has a hide EventListener that takes some moments to complete.

    Developer Version 1.2.2

    [INFO] Titanium SDK version: 1.5.1 [INFO] iPhone Device family: ipad [INFO] iPhone SDK version: 4.2 ... [INFO] bg_oop11/1.0 (1.5.1.16bbb92) [ERROR] The application has crashed with an unhandled exception. Stack trace: 0 CoreFoundation 0x02237bcc exceptionPreprocess + 156
    1 libobjc.A.dylib 0x0238c5c2 objc_exception_throw + 47
    2 CoreFoundation 0x021f0628 +[NSException raise:format:arguments:] + 136
    3 CoreFoundation 0x021f059a +[NSException raise:format:] + 58
    4 UIKit 0x00bc3f9b -[UIPopoverController dealloc] + 86
    5 Foundation 0x005ff8e9
    delayedPerformCleanup + 74
    6 CoreFoundation 0x021b0bde CFRunLoopTimerInvalidate + 446
    7 CoreFoundation 0x0221a7d7 CFRunLoopDoTimer + 1799
    8 CoreFoundation 0x02176cc9
    CFRunLoopRun + 1817
    9 CoreFoundation 0x02176240 CFRunLoopRunSpecific + 208
    10 CoreFoundation 0x02176161 CFRunLoopRunInMode + 97
    11 GraphicsServices 0x04009268 GSEventRunModal + 217
    12 GraphicsServices 0x0400932d GSEventRun + 115
    13 UIKit 0x0089042e UIApplicationMain + 1160
    14 bg_oop11 0x0000367c main + 362
    15 bg_oop11 0x000024a1 start + 53
    2011-01-19 20:15:06.484 bg_oop11[42760:207] *** Terminating app due to uncaught exception 'NSGenericException', reason: '-[UIPopoverController dealloc] reached while popover is still visible.'

JSON Source