googlevr / gvr-ios-sdk

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

Consistent app crash with debugger disconnect #254

Closed drinkius closed 7 years ago

drinkius commented 7 years ago

Hello, 



We are currently working on FullDive app for iOS and are having issues with GVR SDK and GVRCardboardView in particular: the app crashes at what seems to be a random time after the launch but we can’t catch any debug information since the iPhone looses connection to the computer and Xcode (as well as AppCode) saying:

“Lost connection to “White” - Restore the connection to “White” and run “FullDiveVR” again, or if “FullDiveVR” is still running, you can attach to it by selecting Debug > Attach to Process > FullDiveVR.”

The problem gets worse over time and after several crashes the app stops working almost straight after we go to the VR mode in the app, although at first we could have run several videos streamed from the Internet. We’ve also noticed that other GVR-based iOS apps might stop working over time (say, if they’ve been installed more than a week ago) - and after the app launch we see the tutorial pointing users to rotate the phone to go to VR mode, but after the rotation - the app just crashes.

What’s interesting is that the app seems to crash more frequently on A8 processor based devices: iPhone 6 and 6 Plus; at first we thought that other devices like iPhone 5s and 7 Plus worked fine without the crashes, but after extensive testing on iPhone 7 Plus today we found out that the app also crashes with disconnect from the computer, after loading many videos and rendering them well. Still, iPhone 5s works better than iPhone 6 Plus which indicates that the issue is not memory-related, we’ve also run memory-overflow tests on all the devices and such test didn’t lead to phone disconnects from the computer so this might mean that memory issues have nothing to do with the issue.

During the testing we tried switching off all the video rendering functionality we had but still experienced the crash. Here is the link to the logs we could extract (it’s not much as for we can’t catch the crash as we’ve mentioned above, and after it happens - no post-mortem is available most of the times): https://goo.gl/frwfGT

Hope you could point us in the direction of the possible cause of the issue!

sanjayc77 commented 7 years ago

Does this reproduce with TreasureHunt sample app? It would be helpful if we had reproducible code.

drinkius commented 7 years ago

We've found out the cause of the issue - it was on our side, the crash happened because CADisplayLink wasn't deallocating when it was supposed to. Fixing that fixed the crash!