Closed grzegorzkrukowski closed 6 years ago
A bit more info from crashlytics:
Crashed: com.apple.main-thread
0 MindJourney 0x9e7fde ion::portgfx::Visual::GetShareGroupId() const
1 MindJourney 0x84b1a9 gvr::CardboardApiImpl::InitializeGl()
2 MindJourney 0xb8427d -[GVRRenderer initializeGl]
3 MindJourney 0xb881e1 -[GVRSceneRenderer initializeGl]
4 MindJourney 0xb8595f -[GVRRendererView layoutSubviews]
5 UIKit 0x26c1ea73 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 714
6 QuartzCore 0x24cb6bcd -[CALayer layoutSublayers] + 128
7 QuartzCore 0x24cb2375 CA::Layer::layout_if_needed(CA::Transaction*) + 348
8 QuartzCore 0x24cb2209 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 16
9 QuartzCore 0x24cb16d1 CA::Context::commit_transaction(CA::Transaction*) + 368
10 QuartzCore 0x24cb13a5 CA::Transaction::commit() + 520
11 QuartzCore 0x24caab2b CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 138
12 CoreFoundation 0x226696c9 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
13 CoreFoundation 0x226679cd __CFRunLoopDoObservers + 280
14 CoreFoundation 0x22667dff __CFRunLoopRun + 958
15 CoreFoundation 0x225b7229 CFRunLoopRunSpecific + 520
16 CoreFoundation 0x225b7015 CFRunLoopRunInMode + 108
17 GraphicsServices 0x23ba7ac9 GSEventRunModal + 160
18 UIKit 0x26c8b189 UIApplicationMain + 144
19 MindJourney 0x2eeadc main (AppDelegate.swift:17)
20 libdispatch.dylib 0x2225f873 (Missing)
Thanks for the report. Looking into it.
Are these happening for the sample apps too? Can you try Panorama, VideoWidgetDemo or TreasureHunt sample apps and report back?
iPod5_iOS9.3.5, iPad2_iOS9.3.5, iPad3_iOS9.3.5, iPhone5c_iOS10.1.1
Does it mean it works for other devices, newer iPhones (6+) ?
@sanjayc77 thanks for looking into that
We tried all demos and all behave exactly the same - crashing at startup for some devices. And working properly on all others - it's completely 100% reproducible on provided list of devices, so it's nothing with lack of memory or not random.
On newer devices it works without a problem.
Ah and of course - use the real devices only NOT SIMULATOR - when it comes to OpenGL it's the only way - as on simulator OpenGL cannot be trusted.
We also spend a lot of time, trying range are of devices to find out similarities between them, like CPU, RAM or OS version, so we can disable this feature on those devices. Definitely iOS version was not an issue, neither was hardware itself.
From our tests it was working on devices supporting opengles-3
and failing on all others.
That is only regularity we found.
We've been looking into this list: https://developer.apple.com/library/content/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html
We strongly believe that it doesn't work on opengles-2
and opengles-1
- probably those are missing some functionality used by GVRKit and subprojects.
We ended up with this check:
func supportsVRVideos() -> Bool {
if let _ = EAGLContext(api: .openGLES3) {
return true
}
return false
}
And so far no crashes were reported from our application (it's live in Appstore for few days already).
Hope it helps
GVRKit creates an EAGLContext with OpenGLES3 here. See if you can set it to 2 on those older devices. It should work.
Glad you found a workaround.
Well our workaround was to disable the content on those devices - which is far not satisfying.
I will try tomorrow with this:
self.content = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
if (self.context == nil) {
self.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
}
But maybe this should be just added to GVRKit by default ? Or at least maybe it's worth mentioning on project site that it doesn't support older OpenGL versions ?
I will come back to you tomorrow after I give this a try on real devices, now I only have simulator with me :)
It that works, I will add it to GVRKit. BTW, GVRKit is release as source code. You can just change it at your end rather than waiting on the next release.
Is there a way to get a link to repository that will allow me to build framework after forking it ? Sample files that are used in this repository won't compile properly if I just copy them.
Podspec is leading to some storage, where framework is already build: https://dl.google.com/dl/cpdc/2c551301eef05d98/GVRKit-1.100.0.tar.gz
If that's not public and you cannot share it - maybe you can add this small change to this repo and build framework with this change so I can test it and somehow connect it via CocoaPods to my project ?
Problem with building framework on my own is that I may have different configuration or settings which may lead to some unexpected problems.
Yeah, you will have to stop using GVRKit Cocoapod and instead just drop the source code of GVRKit in your project. But I understand that it may not fit within your build configurations.
We are getting GVRKit crashes rom multiple devices: iPod5_iOS9.3.5, iPad2_iOS9.3.5, iPad3_iOS9.3.5, iPhone5c_iOS10.1.1
100% reproducable - nothing shown on screen - crashing on initialisation
Here is a crash log from one of them: