Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26302] iOS: Crash during cleanup of Ti.Media.VideoPlayer

GitHub Issuen/a
TypeBug
PriorityHigh
StatusResolved
ResolutionDuplicate
Resolution Date2018-08-16T09:26:43.000+0000
Affected Version/sRelease 7.4.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterChristopher Williams
AssigneeHans Knöchel
Created2018-08-14T15:17:09.000+0000
Updated2018-08-16T09:26:43.000+0000

Description

Process:               mocha [41373]
Path:                  /Users/*/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E206107B-E272-4DE2-922F-0C10E7E9984A/mocha.app/mocha
Identifier:            mocha
Version:               1.0 (1.0)
Code Type:             X86-64 (Native)
Parent Process:        launchd_sim [41097]
Responsible:           mocha [41373]
User ID:               500

Date/Time:             2018-08-13 16:11:40.013 -0700
OS Version:            Mac OS X 10.13.5 (17F77)
Report Version:        12
Anonymous UUID:        EF6D0BE3-DF74-457D-1081-DCCAC848D60F


Time Awake Since Boot: 4000000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

Application Specific Information:
CoreSimulator 570 - Device: iPhone 7 Plus - Runtime: iOS 12.0 (16A5327d) - DeviceType: iPhone 7 Plus

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib               	0x00000001126e8f74 object_isClass + 18
1   com.apple.Foundation          	0x000000010f3d3815 KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED + 58
2   com.apple.Foundation          	0x000000010f3cfbce NSKeyValueWillChangeWithPerThreadPendingNotifications + 282
3   com.apple.avfoundation        	0x00000001121a4388 __avplayeritem_fpItemNotificationCallback_block_invoke + 7489
4   libdispatch.dylib             	0x00000001142cf025 _dispatch_call_block_and_release + 12
5   libdispatch.dylib             	0x00000001142d00dd _dispatch_client_callout + 8
6   libdispatch.dylib             	0x00000001142dc070 _dispatch_main_queue_callback_4CF + 1290
7   com.apple.CoreFoundation      	0x0000000113737529 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
8   com.apple.CoreFoundation      	0x0000000113731ba6 __CFRunLoopRun + 2342
9   com.apple.CoreFoundation      	0x0000000113730f41 CFRunLoopRunSpecific + 625
10  com.apple.GraphicsServices    	0x0000000118b7a1b5 GSEventRunModal + 62
11  com.apple.UIKitCore           	0x000000011e98fdf4 UIApplicationMain + 140
12  com.appcelerator.testApp.testing	0x000000010ca8d656 main + 102 (main.m:30)
13  libdyld.dylib                 	0x000000011433f9ed start + 1

Attachments

FileDateSize
mocha_2018-08-13-145817_ginsu-macos07.crash2018-08-14T15:21:54.000+0000164470
mocha_2018-08-13-161358_morimoto-macos.crash2018-08-14T15:21:54.000+0000162490

Comments

  1. Christopher Williams 2018-08-14

    Saw this on a CI build of master: https://jenkins.appcelerator.org/job/titanium-sdk/job/titanium_mobile/job/master/1274 The crash happened during the Ti.Network.HTTPClient tests, but I assume it was just a timing artifact. The Ti.Media.VideoPlayer tests did show failures:
       08:01:06 [iOS unit tests] [INFO] :   !TEST_START: Close window containing a video player (TIMOB-25574)
       08:01:06 [iOS unit tests] [INFO] :   !TEST_END: {"state":"failed","duration":0,"suite":"Titanium.Media.VideoPlayer","title":"Close window containing a video player (TIMOB-25574)","error":{"line":123,"column":15,"sourceURL":"file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti.media.videoplayer.test.js"},"message":"file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A","stack":"  C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti.media.videoplayer.test.js:123:15\n  run@file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4355:18\n  runTest@file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4759:13\n  file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4836:18\n  next@file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4684:15\n  file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4694:10\n  next@file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4632:26\n  file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4661:9\n  timeslice@file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:5760:26"}
       08:01:06 [iOS unit tests] [INFO] :   !TEST_START: Release video player and close window (TIMOB-26033)
       08:01:06 [iOS unit tests] [INFO] :   !TEST_END: {"state":"failed","duration":92,"suite":"Titanium.Media.VideoPlayer","title":"Release video player and close window (TIMOB-26033)","error":{"line":188,"column":15,"sourceURL":"file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti.media.videoplayer.test.js"},"message":"file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A","stack":"  C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti.media.videoplayer.test.js:188:15\n  run@file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4355:18\n  runTest@file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4759:13\n  file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4836:18\n  next@file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4684:15\n  file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4694:10\n  next@file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4632:26\n  file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:4661:9\n  timeslice@file:///Users/build/Library/Developer/CoreSimulator/Devices/3DD60DC9-6139-4EE1-8A1C-4558D4FF3C94/data/Containers/Bundle/Application/E224686A-0866-49D1-B271-BF533A9F9E0F/mocha.app/ti-mocha.js:5760:26"}
       08:01:06 [iOS unit tests] [INFO] :   !TEST_START: NETWORK_LAN
       08:01:06 [iOS unit tests] [INFO] :   !TEST_END: {"state":"passed","duration":29,"suite":"Titanium.Network","title":"NETWORK_LAN","message":""}
       
  2. Christopher Williams 2018-08-14

    It's possible that maybe this *isn't* VideoPlayer causing the underlying issue but exhibiting issues due to AudioPlayer misbehaving? I just merged over updated unit tests, and perhaps those are the root cause? https://github.com/appcelerator/titanium-mobile-mocha-suite/commit/5c5319dd8dc9a9517b5197d6ebbe8a710888dec7#diff-16dc62f5cc1bf8fcc5df9a0110fe236f Basically the AudioPlayer tests now play an mp3 file and set the var to null after each test. I know we recently moved to AVPlayer for Ti.Media.AudioPlayer too: https://github.com/appcelerator/titanium_mobile/commit/e05931ff409acec6739f9606324ade6f10e02706
  3. Hans Knöchel 2018-08-14

    You may be right. On iOS, we recently moved the observer-cleanup of the video-player from _destroy to viewDidDetach, which is the saver way to do it. For the audio-player it is still in the old place, which could cause it. I will write some tests for this tomorrow.
  4. Hans Knöchel 2018-08-16

    As TIMOB-26299 was recently discovered to be AudioPlayer related as well, I will resolve this one as a duplicate of the other one and work with [~vijaysingh] to identify more possible issues.

JSON Source