iOS SDK - Player Crash

taek

New Member
When playing and stopping after Player Sample Project is executed, crash occurs when stopping.
Please confirm.

Code:
Incident Identifier: 4D316BF4-8880-4940-AF1E-C1F352673251
CrashReporter Key:   0ffa1a3c3b25ff66d8be6e037f1a304e91f2b40a
Hardware Model:      iPhone8,2
Process:             Player [802]
Path:                /private/var/containers/Bundle/Application/7CAF0262-5BDA-40E0-838B-58F764953D12/Player.app/Player
Identifier:          com.flashphoner.ios.Player
Version:             1 (1.0)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.flashphoner.ios.Player [833]


Date/Time:           2019-09-17 09:43:42.5206 +0900
Launch Time:         2019-09-17 09:39:48.7021 +0900
OS Version:          iPhone OS 11.2.6 (15D100)
Baseband Version:    4.30.02
Report Version:      104

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Termination Description: SPRINGBOARD, scene-update watchdog transgression: com.flashphoner.ios.Player exhausted real (wall clock) time allowance of 10.00 seconds |  | ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: scene-update | WatchdogVisibility: Foreground | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 0.970 (user 0.970, system 0.000), 22% CPU", | "Elapsed application CPU time (seconds): 0.085, 2% CPU" | )
Triggered by Thread:  0

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib            0x00000001858f00f0 __psynch_cvwait + 8
1   libsystem_pthread.dylib           0x0000000185a06ce4 _pthread_cond_wait$VARIANT$mp + 640
2   Player                            0x0000000100990e98 rtc::Event::Wait+ 396952 (int) + 236
3   Player                            0x0000000100a22a7c webrtc::PeerConnectionProxyWithInternal<webrtc::PeerConnectionInterface>::Close+ 993916 () + 172
4   Player                            0x0000000100d30378 -[FPWCSApi2MediaConnection close] + 4195192 (FPWCSApi2WebRTCMediaProvider.m:242)
5   Player                            0x0000000100d2c87c -[FPWCSApi2Stream updateState:] + 4180092 (FPWCSApi2Stream.m:81)
6   Player                            0x0000000100d32ed0 -[FPWCSApi2Session dispatchSessionStatus] + 4206288 (FPWCSApi2Session.m:162)
7   Player                            0x0000000100d32920 -[FPWCSApi2Session disconnect] + 4204832 (FPWCSApi2Session.m:90)
8   Player                            0x0000000100938e18 -[ViewController startButton:] + 36376 (ViewController.m:166)
9   UIKit                             0x000000018f3ca5cc -[UIApplication sendAction:to:from:forEvent:] + 96
10  UIKit                             0x000000018f3ca54c -[UIControl sendAction:to:forEvent:] + 80
11  UIKit                             0x000000018f3b50f4 -[UIControl _sendActionsForEvents:withEvent:] + 440
12  UIKit                             0x000000018f3c9e40 -[UIControl touchesEnded:withEvent:] + 576
13  UIKit                             0x000000018fa255e4 _UIGestureEnvironmentSortAndSendDelayedTouches + 4280
14  UIKit                             0x000000018fa20b94 _UIGestureEnvironmentUpdate + 1224
15  UIKit                             0x000000018fa20678 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 404
16  UIKit                             0x000000018fa1f7d4 -[UIGestureEnvironment _updateGesturesForEvent:window:] + 276
17  UIKit                             0x000000018f3c4e5c -[UIWindow sendEvent:] + 3180
18  UIKit                             0x000000018f395e7c -[UIApplication sendEvent:] + 340
19  UIKit                             0x000000018fceb30c __dispatchPreprocessedEventFromEventQueue + 2364
20  UIKit                             0x000000018fced898 __handleEventQueueInternal + 4760
21  UIKit                             0x000000018fce67b0 __handleHIDEventFetcherDrain + 152
22  CoreFoundation                    0x0000000185d8377c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
23  CoreFoundation                    0x0000000185d836fc __CFRunLoopDoSource0 + 88
24  CoreFoundation                    0x0000000185d82f84 __CFRunLoopDoSources0 + 204
25  CoreFoundation                    0x0000000185d80b5c __CFRunLoopRun + 1048
26  CoreFoundation                    0x0000000185ca0c58 CFRunLoopRunSpecific + 436
27  GraphicsServices                  0x0000000187b4cf84 GSEventRunModal + 100
28  UIKit                             0x000000018f3f95c4 UIApplicationMain + 236
29  Player                            0x000000010093a294 main + 41620 (main.m:14)
30  libdyld.dylib                     0x00000001857c056c start + 4

Thread 1 name:  com.apple.uikit.eventfetch-thread
Thread 1:
0   libsystem_kernel.dylib            0x00000001858cf568 mach_msg_trap + 8
1   libsystem_kernel.dylib            0x00000001858cf3e0 mach_msg + 72
2   CoreFoundation                    0x0000000185d83108 __CFRunLoopServiceMachPort + 196
3   CoreFoundation                    0x0000000185d80cd4 __CFRunLoopRun + 1424
4   CoreFoundation                    0x0000000185ca0c58 CFRunLoopRunSpecific + 436
5   Foundation                        0x00000001866d5594 -[NSRunLoop+ 50580 (NSRunLoop) runMode:beforeDate:] + 304
6   Foundation                        0x00000001866f49ac -[NSRunLoop+ 178604 (NSRunLoop) runUntilDate:] + 96
7   UIKit                             0x000000018ff637a8 -[UIEventFetcher threadMain] + 136
8   Foundation                        0x00000001867d70f4 __NSThread__start__ + 996
9   libsystem_pthread.dylib           0x0000000185a042b4 _pthread_body + 308
10  libsystem_pthread.dylib           0x0000000185a04180 _pthread_body + 0
11  libsystem_pthread.dylib           0x0000000185a02b74 thread_start + 4

Thread 2 name:  Thread 0x0x131d24830
Thread 2:
0   libsystem_kernel.dylib            0x00000001858f0534 __select + 8
1   Player                            0x0000000100982a90 rtc::PhysicalSocketServer::Wait+ 338576 (int, bool) + 536
2   Player                            0x0000000100974aac rtc::MessageQueue::Get+ 281260 (rtc::Message*, int, bool) + 1080
3   Player                            0x000000010098b0a4 rtc::Thread::ProcessMessages+ 372900 (int) + 148
4   Player                            0x000000010098aedc rtc::Thread::PreRun+ 372444 (void*) + 112
5   libsystem_pthread.dylib           0x0000000185a042b4 _pthread_body + 308
6   libsystem_pthread.dylib           0x0000000185a04180 _pthread_body + 0
7   libsystem_pthread.dylib           0x0000000185a02b74 thread_start + 4
 

Max

Administrator
Staff member
Good day.
Please make sure you've build examples according to this manual in Xcode 10 and higher. Also please check if Player example crashes in iOS 12. If you have modified Player example code please check if Player example build from source "out of the box" also crashes.
 

taek

New Member
Please make sure you've build examples according to this manual in Xcode 10 and higher.
==> Yes (Xcode 10.3)
Also please check if Player example crashes in iOS 12.
==> Yes (crashes in iOS 12.4 / iPhone 8)
If you have modified Player example code please check if Player example build from source "out of the box" also crashes.
==> Both will crash. (modified Player example code build / Player example build)
 

Max

Administrator
Staff member
We try to reproduce the issue (ticket WCS-2278) and let you know results.
 

Max

Administrator
Staff member
Good day.
We can not reproduce the issue. When we build Player application from GitHub with latest SDK according this manual in Xcode 10.3 in MacOS Mojave 10.14.6, it does not crash neither on iPhone 6 (real device with iOS 12.4) nor on iPhone 8 (Xcode simulator with iOS 12.4). We've used clean Xcode 10.3 install in this test.
Please try to repeat build process step by step starting from clean Xcode 10.3 installation. Also please note that Xcode itself has some issues like this.
 

taek

New Member
The crash occurs regardless of the xcode build settings.
Occurs when repeating stream start and stop.

[FPWCSApi2MediaConnection close]
webrtc::peerConnectionProxyWithInternal<webrtc::peerConnectionInterface>
rtc::Event::Wait+
_pthread_cond_wait$VARIANT$mp
 
Top