Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

crash in gvr::PlatformInfo::GetApplicationName() when instantiating GVRCardboardView #168

Closed
deeje opened this issue Nov 26, 2016 · 8 comments

Comments

@deeje
Copy link

deeje commented Nov 26, 2016

Hi,

I am able to get GVRSDK iOS sample code to run on device, but am hitting a roadblock in my project. After instantiating a GVRCardboardView, it crashes deep inside setVRModeEnabled…

self.cardboardView = [[GVRCardboardView alloc] initWithFrame:stageFrame];
self.cardboardView.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
self.cardboardView.delegate = self;
self.cardboardView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.cardboardView.vrModeEnabled = YES;

EXC_BAD_ACCESS (code=1, address=0x0)

Thread 1 Queue : com.apple.main-thread (serial)
#0 0x0000000180da504c in strlen ()
#1 0x00000001003f8154 in gvr::PlatformInfo::GetApplicationName() const ()
#2 0x00000001003bbb24 in gvr::ServerLogger::BuildLogEvent(wireless_android_play_playlog::VREvent_EventType const&, std::__1::shared_ptr<wireless_android_play_playlog::VREvent>) ()
#3 0x00000001003bc5e0 in gvr::ServerLogger::Log(wireless_android_play_playlog::VREvent_EventType const&, std::__1::shared_ptr<wireless_android_play_playlog::VREvent>) ()
#4 0x00000001003bc4e0 in gvr::ServerLogger::Log(wireless_android_play_playlog::VREvent_EventType const&) ()
#5 0x0000000100391808 in gvr::CardboardApiImpl::CardboardApiImpl(gvr::DisplayMetrics const&, std::__1::shared_ptrgvr::PoseTracker, std::__1::shared_ptr<gvr::SingleTypeEventProducergvr::PoseState >, gvr::CardboardApiImpl::Detectors) ()
#6 0x00000001003912f8 in gvr::CardboardApiImpl::Create() ()
#7 0x0000000100391298 in gvr::CardboardApi::Create() ()
#8 0x0000000100275734 in +[GVRDeviceParamsHelper viewerModelName] ()
#9 0x0000000100284f78 in -[GVRTransitionView loadView] ()
#10 0x00000001002847d4 in -[GVRTransitionView initWithFrame:delegate:] ()
#11 0x000000010027c170 in -[GVROverlayViewController init] ()
#12 0x0000000100272cfc in -[GVRCardboardView presentModal] ()
#13 0x00000001002718e4 in -[GVRCardboardView setVrModeEnabled:] ()
#14 0x000000010016cc44 in -[SCNStageViewController viewDidLoad] at /Users/deeje/Documents/tapprtv-ios/Classes/SCNStageViewController.m:82

Does this ring a bell for anyone?

@sanjayc77
Copy link

Is this in the iOS Simulator or iOS Device?

@deeje
Copy link
Author

deeje commented Nov 28, 2016 via email

@skycenter
Copy link

@deeje can you share your source code?

@deeje
Copy link
Author

deeje commented Dec 1, 2016

@skycenter :-|

contact me directly?

@deeje
Copy link
Author

deeje commented Dec 1, 2016

if I don't set vrModeEnabled = true, I still crash the first time thru calling Render

#0 0x0000000180da504c in strlen ()
#1 0x0000000100467624 in gvr::PlatformInfo::GetApplicationName() const ()
#2 0x000000010042aff4 in gvr::ServerLogger::BuildLogEvent(wireless_android_play_playlog::VREvent_EventType const&, std::__1::shared_ptr<wireless_android_play_playlog::VREvent>) ()
#3 0x000000010042bab0 in gvr::ServerLogger::Log(wireless_android_play_playlog::VREvent_EventType const&, std::__1::shared_ptr<wireless_android_play_playlog::VREvent>) ()
#4 0x000000010042b9b0 in gvr::ServerLogger::Log(wireless_android_play_playlog::VREvent_EventType const&) ()
#5 0x0000000100400cd8 in gvr::CardboardApiImpl::CardboardApiImpl(gvr::DisplayMetrics const&, std::__1::shared_ptrgvr::PoseTracker, std::__1::shared_ptr<gvr::SingleTypeEventProducergvr::PoseState >, gvr::CardboardApiImpl::Detectors) ()
#6 0x0000000100400884 in gvr::CardboardApiImpl::Create(gvr::DisplayMetrics const&) ()
#7 0x00000001002e1568 in -[GVRCardboardView initCardboardApi] ()
#8 0x00000001002e0fcc in -[GVRCardboardView render:] ()
#9 0x00000001013bcaa0 in -[DYDisplayLinkInterposer forwardDisplayLinkCallback:] ()
#10 0x0000000183e3422c in CA::Display::DisplayLinkItem::dispatch() ()
#11 0x0000000183e340e0 in CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) ()
#12 0x0000000181571e54 in IODispatchCalloutFromCFMessage ()
#13 0x0000000181299030 in __CFMachPortPerform ()
#14 0x00000001812b17d4 in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION ()
#15 0x00000001812b0f0c in __CFRunLoopDoSource1 ()
#16 0x00000001812aec64 in __CFRunLoopRun ()
#17 0x00000001811d8c50 in CFRunLoopRunSpecific ()
#18 0x00000001812263a4 in CFRunLoopRun ()
#19 0x00000001001e7394 in -[CardboardRenderLoop threadMain] at /Users/deeje/Documents/tapprtv-ios/Classes/CardboardRenderLoop.m:90

@skycenter
Copy link

@deeje just emailed you

@sanjayc77
Copy link

The gvr::PlatformInfo::GetApplicationName() is constructed from: [[[NSBundle mainBundle]
objectForInfoDictionaryKey:(NSString *)kCFBundleNameKey] UTF8String].

Can you make sure this returns a bundle name properly?

@deeje
Copy link
Author

deeje commented Dec 6, 2016

OK, that fixed it. Any reason why you're using that key rather than kCFBundleDisplayNameKey?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants