googlevr / gvr-ios-sdk

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

Video Not compatible is Accelerate framework #124

Closed mortocks closed 8 years ago

mortocks commented 8 years ago

Both GVRSDK and CardboardSDK (not sure which one to use) seem incompatible with projects that include apples Accelerate.framework.

To replicate add the framework to the video examples. Projects build fine but throws EXC_BAD_ACCESS when first frame of video attempt to render.

* thread #25: tid = 0x42b39, 0x000000018542af40 libsystem_platform.dylib`_platform_memmove + 320, name = 'com.google.cardboard.RenderThread', stop reason = EXC_BAD_ACCESS (code=1, address=0xd5b16124d4ab6bdf)
  * frame #0: 0x000000018542af40 libsystem_platform.dylib`_platform_memmove + 320
    frame #1: 0x000000010029f41c BH360`mem_read + 92
    frame #2: 0x0000000100662d80 BH360`unz64local_getByte + 52
    frame #3: 0x0000000100662b20 BH360`unz64local_getLong + 48
    frame #4: 0x0000000100661bd0 BH360`unz64local_GetCurrentFileInfoInternal + 128
    frame #5: 0x00000001006620dc BH360`unzGetCurrentFileInfo + 72
    frame #6: 0x000000010029770c BH360`ion::base::ZipAssetManager::RegisterAssetData(void const*, unsigned long) + 208
    frame #7: 0x00000001001d8f1c BH360`ion::base::OnceFlag::CallChecked(std::__1::function<bool ()> const&) + 16
    frame #8: 0x00000001001dda60 BH360`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (&)(std::__1::function<bool ()> const&), bool (*)()>&>(std::__1::__bind<void (&)(std::__1::function<bool ()> const&), bool (*)()>&&&) + 80
    frame #9: 0x00000001001e0530 BH360`vr::VideoTextureRenderable::SetupShaderProgram(ion::base::SharedPtr<ion::gfxutils::ShaderManager> const&, ion::base::SharedPtr<ion::gfx::ShaderInputRegistry> const&) + 288
    frame #10: 0x00000001001e00b4 BH360`vr::VideoTextureRenderable::VideoTextureRenderable(ion::base::SharedPtr<ion::gfxutils::ShaderManager> const&, ion::base::SharedPtr<ion::gfx::Renderer> const&, std::__1::vector<int, std::__1::allocator<int> > const&, ion::math::Matrix<3, float> const&, bool) + 1168
    frame #11: 0x00000001001dfa68 BH360`vr::NativePanoVideoRenderer::CreateVideoTextureRenderable(std::__1::vector<int, std::__1::allocator<int> > const&, vr::internal::widgets::video::SphericalMetadata const&, ion::math::Matrix<3, float> const&, std::__1::shared_ptr<vr::StereoScene>, ion::base::SharedPtr<ion::gfxutils::ShaderManager>, ion::base::SharedPtr<ion::gfx::Renderer>) + 112
    frame #12: 0x00000001001df7ac BH360`vr::PanoVideoRenderer::SetVideoTexture(std::__1::vector<int, std::__1::allocator<int> > const&, ion::math::Matrix<3, float> const&) + 168
    frame #13: 0x00000001000f86ec BH360`-[GCSVideoView drawAtTime:] + 1136
    frame #14: 0x00000001000fb0fc BH360`-[GCSWidgetView render:] + 72
    frame #15: 0x00000001000f31a0 BH360`-[GCSRenderLoop updateWithDisplayLink:] + 200
    frame #16: 0x00000001021d3b1c GPUToolsCore`-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 176
    frame #17: 0x00000001895a3640 QuartzCore`CA::Display::DisplayLinkItem::dispatch(unsigned long long) + 44
    frame #18: 0x00000001895a34ec QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 444
    frame #19: 0x000000018660c570 IOKit`IODispatchCalloutFromCFMessage + 372
    frame #20: 0x000000018633656c CoreFoundation`__CFMachPortPerform + 180
    frame #21: 0x000000018634e934 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
    frame #22: 0x000000018634e0e8 CoreFoundation`__CFRunLoopDoSource1 + 436
    frame #23: 0x000000018634bbcc CoreFoundation`__CFRunLoopRun + 1840
    frame #24: 0x000000018627a048 CoreFoundation`CFRunLoopRunSpecific + 444
    frame #25: 0x00000001862c78d4 CoreFoundation`CFRunLoopRun + 112
    frame #26: 0x0000000186e8650c Foundation`__NSThread__start__ + 1024
    frame #27: 0x0000000185433860 libsystem_pthread.dylib`_pthread_body + 240
    frame #28: 0x0000000185433770 libsystem_pthread.dylib`_pthread_start + 284
    frame #29: 0x0000000185430dbc libsystem_pthread.dylib`thread_start + 4
mortocks commented 8 years ago

Actually it looks like it's not the Accelerate framework that's the problem but a conflict with the Wikitude AR library.

sorenbryder commented 7 years ago

I am having the exact same problem with Wikitude and GVRSDK. Did you manage to find a solution?

mortocks commented 7 years ago

In speaking to the Wikitude support staff - apparently they override some core libraries that GoogleVR uses. They're looking at a re-write but don't hold your breath. Unfortunately my only choice was to write my own GoogleVR Clone using SceneKit.

On Tue, Jun 20, 2017 at 12:09 AM, Søren Bryder notifications@github.com wrote:

I am having the exact same problem with Wikitude and GVRSDK. Did you manage to find a solution?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/googlevr/gvr-ios-sdk/issues/124#issuecomment-309451033, or mute the thread https://github.com/notifications/unsubscribe-auth/AATLVMb_WWPZH4mQsHtOKCI1-QW2haC5ks5sFoESgaJpZM4KChxe .

sorenbryder commented 7 years ago

Thanks for your answer. It is really too bad Wikitude is doing that kind of stuff. Especially since they charge quite a bit of money for their library.

Is it possible to take a look at your clone? I am willing to cover some of your expenses if I can use it as a working replacement in my project.

mortocks commented 7 years ago

Unfortunately it was for a client project so I can't share it - but it was heavily inspired by the work of this repo

https://github.com/Aralekk/simple360player_iOS

Should give you pretty much everything you need to roll your own 360 video player

On Wed, Jun 21, 2017 at 5:21 PM, Søren Bryder notifications@github.com wrote:

Thanks for your answer. It is really too bad Wikitude is doing that kind of stuff. Especially since they charge quite a bit of money for their library.

Is it possible to take a look at your clone? I am willing to cover some of your expenses if I can use it as a working replacement in my project.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/googlevr/gvr-ios-sdk/issues/124#issuecomment-309986070, or mute the thread https://github.com/notifications/unsubscribe-auth/AATLVIaTCZdx5-C5etaNr-FdVdb3NRhsks5sGMR4gaJpZM4KChxe .