googlevr / gvr-ios-sdk

Google VR SDK for iOS
http://developers.google.com/vr/ios/
Other
645 stars 191 forks source link

Output will be downmixed to mono: Error Domain=NSOSStatusErrorDomain Code=-50 "The operation couldn’t be completed. (OSStatus error -50.)" #317

Open ruansf opened 6 years ago

ruansf commented 6 years ago

I run the TheasureHunt demo. It crash when i pull out the headphones or put on headphones with the below error:

2018-03-31 15:46:51.704 TreasureHunt[2696:351508] Output will be downmixed to mono: Error Domain=NSOSStatusErrorDomain Code=-50 "The operation couldn’t be completed. (OSStatus error -50.)" 2018-03-31 15:46:51.933 TreasureHunt[2696:351508] Output will be downmixed to mono: Error Domain=NSOSStatusErrorDomain Code=-50 "The operation couldn’t be completed. (OSStatus error -50.)" 2018-03-31 15:46:52.160 TreasureHunt[2696:351508] Output will be downmixed to mono: Error Domain=NSOSStatusErrorDomain Code=-50 "The operation couldn’t be completed. (OSStatus error -50.)"

(lldb) bt
* thread #103, name = 'AVAudioSession Notify Thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x17bd3beb8)
  * frame #0: 0x0000000194743bd0 libobjc.A.dylib`objc_msgSend + 16
    frame #1: 0x0000000183f78ae4 CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
    frame #2: 0x0000000183eb7220 CoreFoundation`_CFXNotificationPost + 2060
Performador commented 6 years ago

This seems like an internal GVR bug. Will be fixed in the next release.

ruansf commented 6 years ago

It seems crash happens in route change. I want to know what AudioEngine & RouteChangeNotifier will do when the AVAudioSessionRouteChangeNotification happens? Can i just remove the observer AudioEngine & RouteChangeNotifier of the AVAudioSessionRouteChangeNotification? I will add another observer to clean engine when route change happens

ruansf commented 6 years ago

My meaning of 'clean engine' is to set property gvrEngine to empty