[TIMOB-5855] iOS: emailDialog crashes if opened with animated:false
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-06-21T07:58:52.000+0000 |
Affected Version/s | Release 1.8.0, Release 2.1.0 |
Fix Version/s | Release 3.0.0, Sprint 2012-20 API, 2012 Sprint 20 |
Components | iOS |
Labels | core, module_emaildialog, qe, qe-testadded |
Reporter | Jon Alter |
Assignee | Hieu Pham |
Created | 2011-10-24T15:07:27.000+0000 |
Updated | 2013-12-03T10:45:33.000+0000 |
Description
If you try to open the emailDialog with animated true it crashes the app.
Step 1: run the code below
Step 2: click on the screen
Step 3: see the app crash
Step 4: remove '{animated:true}' from the open
Step 5: run again
Step 6: see the dialog open as it should
var win = Ti.UI.createWindow({
backgroundColor:'blue'
});
win.addEventListener('click',function(e){
// works fine with modal windows
// var newWin = Ti.UI.createWindow({modal:true});
// newWin.open({animated:false});
var email = Ti.UI.createEmailDialog();
email.open({animated:true});
});
win.open();
[DEBUG] application booted in 89.347005 ms
[ERROR] Invalid type passed to function. expected: __NSArrayM or nil, was: NSDictionary in -[TiUIEmailDialogProxy open:] (TiUIEmailDialogProxy.m:61)
[ERROR] The application has crashed with an unhandled exception. Stack trace:
0 CoreFoundation 0x0268d58c __exceptionPreprocess + 156
1 libobjc.A.dylib 0x027e1313 objc_exception_throw + 44
2 Test7 0x00114e57 TiExceptionThrowWithNameAndReason + 167
3 Test7 0x000e3af4 -[TiProxy throwException:subreason:location:] + 260
4 Test7 0x000d5753 -[TiUIEmailDialogProxy open:] + 627
5 CoreFoundation 0x025fdc7d __invoking___ + 29
6 CoreFoundation 0x025fdb51 -[NSInvocation invoke] + 145
7 Test7 0x00059949 -[KrollMethod call:] + 3081
8 Test7 0x00058379 KrollCallAsFunction + 665
9 Test7 0x002a80a4 _ZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE + 346
10 Test7 0x002849e0 _ZN2TI11Interpreter14privateExecuteENS0_13ExecutionFlagEPNS_12RegisterFileEPNS_10TiExcStateEPNS_7TiValueE + 44554
11 Test7 0x00288037 _ZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE + 825
12 Test7 0x00297265 _ZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE + 129
13 Test7 0x002569a3 _ZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 91
14 Test7 0x002a6696 TiObjectCallAsFunction + 373
15 Test7 0x000624ed -[KrollObject triggerEvent:withObject:thisObject:] + 701
16 Test7 0x00054461 -[KrollEvent invoke:] + 145
17 Test7 0x000531bf -[KrollContext invoke:] + 223
18 Test7 0x00051d87 -[KrollContext main] + 4743
19 Foundation 0x0074ccf4 -[NSThread main] + 81
20 Foundation 0x0074cc80 __NSThread__main__ + 1387
21 libSystem.B.dylib 0x9493b259 _pthread_start + 345
22 libSystem.B.dylib 0x9493b0de thread_start + 34
2011-10-24 16:00:09.951 Test7[32352:5d03] *** Terminating app due to uncaught exception 'org.test7.TiUIEmailDialogProxy', reason: 'Invalid type passed to function. expected: __NSArrayM or nil, was: NSDictionary in -[TiUIEmailDialogProxy open:] (TiUIEmailDialogProxy.m:61)'
*** Call stack at first throw:
(
0 CoreFoundation 0x0268d5a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x027e1313 objc_exception_throw + 44
2 Test7 0x00114e57 TiExceptionThrowWithNameAndReason + 167
3 Test7 0x000e3af4 -[TiProxy throwException:subreason:location:] + 260
4 Test7 0x000d5753 -[TiUIEmailDialogProxy open:] + 627
5 CoreFoundation 0x025fdc7d __invoking___ + 29
6 CoreFoundation 0x025fdb51 -[NSInvocation invoke] + 145
7 Test7 0x00059949 -[KrollMethod call:] + 3081
8 Test7 0x00058379 KrollCallAsFunction + 665
9 Test7 0x002a80a4 _ZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE + 346
10 Test7 0x002849e0 _ZN2TI11Interpreter14privateExecuteENS0_13ExecutionFlagEPNS_12RegisterFileEPNS_10TiExcStateEPNS_7TiValueE + 44554
11 Test7 0x00288037 _ZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE + 825
12 Test7 0x00297265 _ZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE + 129
13 Test7 0x002569a3 _ZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 91
14 Test7 0x002a6696 TiObjectCallAsFunction + 373
15 Test7 0x000624ed -[KrollObject triggerEvent:withObject:thisObject:] + 701
16 Test7 0x00054461 -[KrollEvent invoke:] + 145
17 Test7 0x000531bf -[KrollContext invoke:] + 223
18 Test7 0x00051d87 -[KrollContext main] + 4743
19 Foundation 0x0074ccf4 -[NSThread main] + 81
20 Foundation 0x0074cc80 __NSThread__main__ + 1387
21 libSystem.B.dylib 0x9493b259 _pthread_start + 345
22 libSystem.B.dylib 0x9493b0de thread_start + 34
)
terminate called after throwing an instance of 'NSException'
[DEBUG] App Spec: <DTiPhoneSimulatorApplicationSpecifier 0x100303e40> specified by path /Users/jalter/Documents/Titanium Studio Workspace2/Test7/build/iphone/build/Debug-iphonesimulator/Test7.app
[DEBUG] SDK Root: <DTiPhoneSimulatorSystemRoot 0x100302300> path=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk version=4.3 name=Simulator - iOS 4.3
[DEBUG] using device family iphone
[DEBUG] Session started
[DEBUG] Session did end with error (null)
[INFO] Application has exited from Simulator
Tested with 2.1GA on the iOS simulator, issue still reproducible.
Fixed on master by https://github.com/appcelerator/titanium_mobile/pull/3060
Tested with 3.0.0.v20121130200208 with iPhone 4 5.1.1
Reopening to update labels
Tested with: SDK:3.1.2.v20130619101604 Appcelerator Studio: 3.1.1.201306131423 OS: OSX 10.7.5 Device:iPad mini(v 6.0), Google nexus(v 4.0) Xcode: 4.6
anvil test case added. PR link: https://github.com/appcelerator/titanium_mobile/pull/5053