Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27799] ios: App crashes when setting video player url to null

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2020-04-15T10:54:44.000+0000
Affected Version/sRelease 8.2.0, Release 9.0.0
Fix Version/sRelease 9.0.1
ComponentsiOS
Labelsregression
ReporterSatyam Sekhri
AssigneeVijay Singh
Created2020-03-10T19:50:04.000+0000
Updated2020-06-18T11:36:56.000+0000

Description

When we try to set the URL of an existing video player to null the app crashes on iOS. No crash seen on Android. The issue occurs since Ti SDK 8.2.0.GA. Steps To Reproduce: 1. Create a classic app. Use the app.js attached 2. Install on iOS. When the app launches the video player starts playing 3. Click on the "Close Video" button on the bottom right Actual Result: The app crashes with following error
ERROR] :  Script Error {
[ERROR] :      column = 14;
[ERROR] :      line = 22;
[ERROR] :      message = "-[NSNull CGSizeValue]: unrecognized selector sent to instance 0x1149b4ea8";
[ERROR] :      nativeStack = "3   CoreFoundation  0x000000011474c443 ___forwarding___ + 1443\n4   CoreFoundation  0x000000011474e238 _CF_forwarding_prep_0 + 120\n5   testClassic1    0x000000010e0457d2 -[TiMediaVideoPlayerProxy observeValueForKeyPath:ofObject:change:context:] + 322\n6   Foundation 0x000000011005821d -[NSKeyValueObservance observeValueForKeyPath:ofObject:change:context:] + 399\n7   Foundation 0x000000011005e3b8 NSKeyValueNotifyObserver + 332\n8   Foundation 0x00000001100619dc NSKeyValueDidChange + 489\n9   Foundation 0x000000011005d9c9 NSKeyValueDidChangeWithPerThreadPendingNotifications + 143\n10  AVFoundation    0x00000001131af44a -[AVPlayer _runOnIvarAccessQueueOperationThatMayChangeCurrentItemWithPreflightBlock:modificationBlock:] + 711\n11  AVFoundation    0x00000001131b3cd8 -[AVPlayer replaceCurrentItemWithPlayerItem:] + 254\n12  testClassic1    0x000000010e040459 -[TiMediaVideoPlayerProxy setUrl:] + 473\n13  Foundation 0x0000000110061245 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 694\n14  Foundation 0x0000000110061bf3 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 68\n15  Foundation 0x000000011005be19 _NSSetObjectValueAndNotify + 255\n16  TitaniumKit0x0000000111b5728f -[KrollObject setValue:forKey:] + 410\n17  TitaniumKit0x0000000111b553b7 KrollSetProperty + 360\n18  JavaScriptCore  0x000000010e637665 _ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE3putEPNS_6JSCellEPNS_9ExecStateENS_12PropertyNameENS_7JSValueERNS_15PutPropertySlotE + 277\n19  JavaScriptCore  0x000000010ead5d01 llint_slow_path_put_by_id + 2769\n20  JavaScriptCore  0x000000010e6010bf llint_entry + 26156\n21  JavaScriptCore  0x000000010e5fa8d9 vmEntryToJavaScript + 200\n22  JavaScriptCore  0x000000010e9e0730 _ZN3JSC11Interpreter11executeCallEPNS_9ExecStateEPNS_8JSObjectENS_8CallTypeERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 464";
[ERROR] :      sourceURL = "file:///Users/satyamsekhri/Library/Developer/CoreSimulator/Devices/77E3E961-FDCF-43CA-A06A-BB17654668CF/data/Containers/Bundle/Application/A0DBC98B-8EB6-4D4B-8E8E-EFA786709201/testClassic1.app/app.js";
[ERROR] :      stack = "    at (/app.js:22:14)";
[ERROR] :      toJSON = "<KrollCallback: 0x6000014eb240>";
[ERROR] :  }
[ERROR] :  -[__NSCFString count]: unrecognized selector sent to instance 0x7f8577029800
[ERROR] :  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString count]: unrecognized selector sent to instance 0x7f8577029800'
[ERROR] :  *** First throw call stack:
[ERROR] :  (
[ERROR] :  	0   CoreFoundation                      0x00000001147476fb __exceptionPreprocess + 331
[ERROR] :  	1   libobjc.A.dylib                     0x000000011356bac5 objc_exception_throw + 48
[ERROR] :  	2   CoreFoundation                      0x0000000114765ab4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
[ERROR] :  	3   CoreFoundation                      0x000000011474c443 ___forwarding___ + 1443
[ERROR] :  	4   CoreFoundation                      0x000000011474e238 _CF_forwarding_prep_0 + 120
[ERROR] :  	5   TitaniumKit                         0x0000000111b8487c -[TiExceptionHandler showScriptError:] + 300
[ERROR] :  	6   TitaniumKit                         0x0000000111b71cdf TiBindingEventProcess + 760
[ERROR] :  	7   TitaniumKit                         0x0000000111b92120 -[KrollContext invoke:] + 109
[ERROR] :  	8   TitaniumKit                         0x0000000111b92193 -[KrollContext enqueue:] + 93
[ERROR] :  	9   TitaniumKit                         0x0000000111b9977a TiBindingRunLoopEnqueue + 77
[ERROR] :  	10  TitaniumKit                         0x0000000111b97fd0 -[TiProxy fireEvent:withObject:propagate:reportSuccess:errorCode:message:] + 164
[ERROR] :  	11  TitaniumKit                         0x0000000111b79a0c -[TiViewProxy fireEvent:withObject:propagate:reportSuccess:errorCode:message:] + 224
[ERROR] :  	12  testClassic1                        0x000000010e036133 -[TiUIButtonProxy fireEvent:withObject:propagate:reportSuccess:errorCode:message:] + 275
[ERROR] :  	13  TitaniumKit                         0x0000000111b97cfb -[TiProxy fireEvent:withObject:] + 72
[ERROR] :  	14  testClassic1                        0x000000010e038d11 -[TiUIButton controlAction:forEvent:] + 721
[ERROR] :  	15  UIKitCore                           0x00000001204d9204 -[UIApplication sendAction:to:from:forEvent:] + 83
[ERROR] :  	16  UIKitCore                           0x000000011ff2ec19 -[UIControl sendAction:to:forEvent:] + 67
[ERROR] :  	17  UIKitCore                           0x000000011ff2ef36 -[UIControl _sendActionsForEvents:withEvent:] + 450
[ERROR] :  	18  UIKitCore                           0x000000011ff2deec -[UIControl touchesEnded:withEvent:] + 583
[ERROR] :  	19  UIKitCore                           0x0000000120511eee -[UIWindow _sendTouchesForEvent:] + 2547
[ERROR] :  	20  UIKitCore                           0x00000001205135d2 -[UIWindow sendEvent:] + 4079
[ERROR] :  	21  UIKitCore                           0x00000001204f1d16 -[UIApplication sendEvent:] + 356
[ERROR] :  	22  testClassic1                        0x000000010e02267c -[TiUIApplication sendEvent:] + 572
[ERROR] :  	23  UIKitCore                           0x00000001205c2293 __dispatchPreprocessedEventFromEventQueue + 3232
[ERROR] :  	24  UIKitCore                           0x00000001205c4bb9 __handleEventQueueInternal + 5911
[ERROR] :  	25  CoreFoundation                      0x00000001146aebe1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
[ERROR] :  	26  CoreFoundation                      0x00000001146ae463 __CFRunLoopDoSources0 + 243
[ERROR] :  	27  CoreFoundation                      0x00000001146a8b1f __CFRunLoopRun + 1231
[ERROR] :  	28  CoreFoundation                      0x00000001146a8302 CFRunLoopRunSpecific + 626
[ERROR] :  	29  GraphicsServices                    0x0000000118c732fe GSEventRunModal + 65
[ERROR] :  	30  UIKitCore                           0x00000001204d7ba2 UIApplicationMain + 140
[ERROR] :  	31  testClassic1                        0x000000010df99e9f main + 1215
[ERROR] :  	32  libdyld.dylib                       0x0000000116bcc541 start + 1
[ERROR] :  	33  ???                                 0x0000000000000001 0x0 + 1
[ERROR] :  )
[ERROR] :  libc++abi.dylib: terminating with uncaught exception of type NSException

Attachments

FileDateSize
app.js2020-03-10T19:48:52.000+0000545

Comments

  1. Vijay Singh 2020-03-10

    This is regression from TIMOB-27234. Looking in this.
  2. Vijay Singh 2020-03-11

    PR - https://github.com/appcelerator/titanium_mobile/pull/11537
  3. Vijay Singh 2020-03-25

    PR (9_0_x) - https://github.com/appcelerator/titanium_mobile/pull/11570
  4. Saumya Rai 2020-04-03

    Verified FR on 9_0_X branch and added my observation in PR.
  5. Christopher Williams 2020-04-13

    merged to 9_0_X and master
  6. Samir Mohammed 2020-04-15

    *Closing ticket.* Fix verified in SDK version 9.1.0.v20200413112428. and 9.0.1.v20200413181237 Test and other information can be found at: PR - https://github.com/appcelerator/titanium_mobile/pull/11537 PR (9_0_x) - https://github.com/appcelerator/titanium_mobile/pull/11570

JSON Source