[TIMOB-11747] iOS 6: Titanium.UI.iPad.DocumentViewer crashes when tapping done button
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-03-26T21:16:16.000+0000 |
Affected Version/s | Release 2.1.3, Release 3.0.0 |
Fix Version/s | Release 3.1.0, 2013 Sprint 07 Core, 2013 Sprint 07 |
Components | iOS |
Labels | triage |
Reporter | Tony Lewis |
Assignee | Max Stepanov |
Created | 2012-10-29T15:26:29.000+0000 |
Updated | 2013-04-06T10:05:59.000+0000 |
Description
*Problem description*
After creating and showing Titanium.UI.iPad.DocumentViewer, tapping done button between 2-4 times crashes the app.
*Note*
- Tested and confirmed on iOS 6, TiSDK 2.1.3 GA and latest 3.0.0.
- Does not crash on iOS 5.1, TiSDK 2.1.3 GA
*Log generated by 3.0.0*
[INFO] DocumentViewer/1.0 (3.0.0.v20121112140159.b7beec5)
[WARN] Titanium.UI.iPad.createDocumentViewer DEPRECATED in 2.1.1: REMOVED in Ti.Ui.iOS.createDocumentViewer()
[WARN] Titanium.UI.iPad.createDocumentViewer DEPRECATED in 2.1.1: REMOVED in Ti.Ui.iOS.createDocumentViewer()
[WARN] Titanium.UI.iPad.createDocumentViewer DEPRECATED in 2.1.1: REMOVED in Ti.Ui.iOS.createDocumentViewer()
[WARN] Titanium.UI.iPad.createDocumentViewer DEPRECATED in 2.1.1: REMOVED in Ti.Ui.iOS.createDocumentViewer()
2012-11-12 15:14:16.382 DocumentViewer[22493:1b203] -[__NSMallocBlock__ documentInteractionControllerDidEndPreview:]: unrecognized selector sent to instance 0xb26cbe0
[ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'.
Reason:
-[__NSMallocBlock__ documentInteractionControllerDidEndPreview:]: unrecognized selector sent to instance 0xb26cbe0
Stack trace:
0 CoreFoundation 0x03552012 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x02fa4e7e objc_exception_throw + 44
2 CoreFoundation 0x035dd4bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 253
3 CoreFoundation 0x03541bbc ___forwarding___ + 588
4 CoreFoundation 0x0354194e _CF_forwarding_prep_0 + 14
5 UIKit 0x00f523f7 -[UIDocumentInteractionController(QLPreviewController) previewControllerDidDismiss:] + 97
6 QuickLook 0x096c365d -[QLPreviewController viewDidDisappear:] + 397
7 UIKit 0x00c81753 -[UIViewController _setViewAppearState:isAnimating:] + 146
8 UIKit 0x00c81c62 -[UIViewController __viewDidDisappear:] + 157
9 UIKit 0x00c81d54 -[UIViewController _endAppearanceTransition:] + 235
10 UIKit 0x00c8f5c9 -[UIViewController(UIContainerViewControllerProtectedMethods) endAppearanceTransition] + 41
11 UIKit 0x00e8c882 -[UIWindowController transitionViewDidComplete:fromView:toView:removeFromView:] + 1940
12 UIKit 0x00c5e594 -[UITransitionView notifyDidCompleteTransition:] + 520
13 UIKit 0x00c5e21c -[UITransitionView _didCompleteTransition:] + 1297
14 UIKit 0x00c60563 -[UITransitionView _transitionDidStop:finished:] + 107
15 UIKit 0x00bdc3b6 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 237
16 UIKit 0x00bdc554 -[UIViewAnimationState animationDidStop:finished:] + 68
17 QuartzCore 0x021527d8 _ZN2CA5Layer23run_animation_callbacksEPv + 284
18 libdispatch.dylib 0x03874014 _dispatch_client_callout + 14
19 libdispatch.dylib 0x038647d5 _dispatch_main_queue_callback_4CF + 296
20 CoreFoundation 0x034f8af5 __CFRunLoopRun + 1925
21 CoreFoundation 0x034f7f44 CFRunLoopRunSpecific + 276
22 CoreFoundation 0x034f7e1b CFRunLoopRunInMode + 123
23 GraphicsServices 0x0326a7e3 GSEventRunModal + 88
24 GraphicsServices 0x0326a668 GSEventRun + 104
25 UIKit 0x00b9e65c UIApplicationMain + 1211
26 DocumentViewer 0x00006518 main + 456
27 DocumentViewer 0x00002e05 start + 53
2012-11-12 15:14:16.559 DocumentViewer[22493:1b203] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSMallocBlock__ documentInteractionControllerDidEndPreview:]: unrecognized selector sent to instance 0xb26cbe0'
*** First throw call stack:
(0x3552012 0x2fa4e7e 0x35dd4bd 0x3541bbc 0x354194e 0xf523f7 0x96c365d 0xc81753 0xc81c62 0xc81d54 0xc8f5c9 0xe8c882 0xc5e594 0xc5e21c 0xc60563 0xbdc3b6 0xbdc554 0x21527d8 0x3874014 0x38647d5 0x34f8af5 0x34f7f44 0x34f7e1b 0x326a7e3 0x326a668 0xb9e65c 0x6518 0x2e05)
[INFO] Application has exited from Simulator
Attachments
File | Date | Size |
---|---|---|
DocumentViewer.zip | 2012-11-12T16:41:25.000+0000 | 4247421 |
Can you provide a reproducible test case in the form of an app.js? Thanks.
Sample app has been uploaded.
Thanks Tony. So I confirmed this with iOS 6, TiSDK 2.1.3 GA and latest 3.0.0 on both device (iPad 3) and simulator. It crashes when tapping 'Done' between 2-4 times. I tested it on iOS 5.1, TiSDK 2.1.3 GA and it does not crash. When running it with 3.0.0 I got an extensive log about what the error actually is. I will add it to the description. I will now move this to TiMob for engineering to take a look.
+1 Same issue with studio and sdk @ latest release on iOS 6
+1 I have an app that uses DocumentViewer and it keeps crashing.
Simplified test instructions: 1. Launch the attached app on 6.0 iPad Simulator 2. Press "View Document" 3. Simulate memory warning 4. Press "Done" button or wait 5 seconds to get it closed with timeout set.
Test case:
PR https://github.com/appcelerator/titanium_mobile/pull/4030
Tapping done button, Titanium.UI.iPad.DocumentViewer doesn't crashes. Verified on: Device : iPad mini, iOS version: 6+ SDK: 3.1.0.v20130405170202 CLI version : 3.1.0-beta OS : MAC OSX 10.7.5 Appcelerator Studio, build: 3.1.0.201304011603 XCode : 4.5.1