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
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:
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
You may be right. On iOS, we recently moved the observer-cleanup of the video-player from
_destroy
toviewDidDetach
, 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.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.