resonance-audio / resonance-audio-unity-sdk

Resonance Audio SDK for Unity
https://resonance-audio.github.io/resonance-audio/develop/unity/getting-started
Other
297 stars 38 forks source link

Crashing on iOS #20

Closed hamaluik closed 6 years ago

hamaluik commented 6 years ago

I'm getting a crash on iOS.

Here are the steps to reproduce:

  1. Start from a new, blank, Unity [2017.3.0f3] project
  2. Import ResonanceAudioForUnity_1.1.1.unitypackage
  3. Change audio spatializer plugin and ambisonic decoder plugin to Resonance Audio
  4. Enable the Google Cardboard virtual reality SDK
  5. Enable the transition view in the Google Cardboard virtual reality SDK
  6. Use the included ResonanceAudioDemo scene in the build
  7. Build, open in XCode 9.2
  8. Build and test on iPhone 7+ [iOS 11.2.5]
  9. Launch, then rotate landscape the load the scene beyond the transition view
  10. Crash

Get this stack trace:

Thread 1 Queue : com.apple.main-thread (serial)
#0  0x00000001855282e8 in __pthread_kill ()
#1  0x000000018563d2f8 in pthread_kill$VARIANT$mp ()
#2  0x00000001854579e4 in raise ()
#3  0x0000000103009278 in ion::base::logging_internal::NullLogger::NullLogger(ion::port::LogSeverity) ()
#4  0x0000000102e0b798 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >* ion::base::logging_internal::CheckNotNull<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*>(char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*&&) ()
#5  0x0000000102e0b558 in vraudio::CreateShHrirsFromAssets(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, vraudio::Resampler*) ()
#6  0x0000000102e0a17c in vraudio::AmbisonicBinauralDecoderNode::AmbisonicBinauralDecoderNode(vraudio::SystemSettings const&, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, vraudio::FftManager*, vraudio::Resampler*) ()
#7  0x0000000102e09f70 in std::__1::shared_ptr<vraudio::AmbisonicBinauralDecoderNode> std::__1::shared_ptr<vraudio::AmbisonicBinauralDecoderNode>::make_shared<vraudio::SystemSettings const&, int&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, vraudio::FftManager*, vraudio::Resampler*>(vraudio::SystemSettings const&&&, int&&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&, vraudio::FftManager*&&, vraudio::Resampler*&&) ()
#8  0x000000010386d73c in vraudio::GraphManager::InitializeAmbisonicRendererGraph(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) ()
#9  0x000000010386d0cc in vraudio::GraphManager::GraphManager(vraudio::SystemSettings const&) ()
#10 0x0000000103868cbc in vraudio::VrAudioApiImpl::VrAudioApiImpl(unsigned long, unsigned long, int) ()
#11 0x0000000103868a8c in CreateVrAudioApi ()
#12 0x0000000103864c50 in vraudio::unity::Initialize(int, unsigned long, unsigned long) ()
#13 0x0000000103866644 in vraudio::unity::RendererCreateCallback(UnityAudioEffectState*) ()
#14 0x00000001033e3954 in ::UnityAudioEffect_InternalCreateCallback() at /Users/builduser/buildslave/unity/build/Modules/Audio/Public/AudioEffectInternal.cpp:61
#15 0x00000001037be508 in FMOD::PluginFactory::createDSP(FMOD::FMOD_DSP_DESCRIPTION_EX*, FMOD::DSPI**) ()
#16 0x00000001037d1398 in FMOD::SystemI::createDSP(FMOD_DSP_DESCRIPTION*, FMOD::DSPI**) ()
#17 0x00000001037c8f30 in FMOD::System::createDSP(FMOD_DSP_DESCRIPTION*, FMOD::DSP**) ()
#18 0x00000001033e3fa4 in ::CreateDSP() at /Users/builduser/buildslave/unity/build/Modules/Audio/Public/AudioEffectInternal.cpp:331
#19 0x00000001033ffe94 in ::CreateAudioMixerMemory() at /Users/builduser/buildslave/unity/build/Modules/Audio/Public/mixer/audiomixerruntime.cpp:381
#20 0x00000001033eaeb4 in ::EnsureValidRuntime() at /Users/builduser/buildslave/unity/build/Modules/Audio/Public/AudioMixer.cpp:201
#21 0x00000001033e9904 in ::Update() at /Users/builduser/buildslave/unity/build/Modules/Audio/Public/AudioMixer.cpp:352
#22 0x00000001033e978c in ::Update() at /Users/builduser/buildslave/unity/build/Modules/Audio/Public/AudioManager.cpp:2289
#23 0x00000001033e0ac4 in ::Update() at /Users/builduser/buildslave/unity/build/Modules/Audio/AudioModule.cpp:30
#24 0x000000010321f88c in ::PlayerLoop() at /Users/builduser/buildslave/unity/build/Runtime/Misc/PlayerLoop.cpp:197
#25 0x000000010307cdb8 in ::UnityPlayerLoopImpl() at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/LibEntryPoint.mm:224
#26 0x0000000102a7c8c4 in ::UnityRepaint() at /Users/kenton/Projects/pllc/Media 101/Build/iOS/Classes/UnityAppController+Rendering.mm:267
#27 0x0000000102a7c7b0 in ::-[UnityAppController(Rendering) repaintDisplayLink]() at /Users/kenton/Projects/pllc/Media 101/Build/iOS/Classes/UnityAppController+Rendering.mm:76
#28 0x00000001056d0254 in __clang_call_terminate ()
#29 0x000000018994164c in CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) ()
#30 0x0000000185c7e098 in IODispatchCalloutFromCFMessage ()
#31 0x00000001859a1090 in __CFMachPortPerform ()
#32 0x00000001859bbe00 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#33 0x00000001859bb504 in __CFRunLoopDoSource1 ()
#34 0x00000001859b8fd8 in __CFRunLoopRun ()
#35 0x00000001858d8c58 in CFRunLoopRunSpecific ()
#36 0x0000000187784f84 in GSEventRunModal ()
#37 0x000000018f0315c4 in UIApplicationMain ()
#38 0x0000000102a752e0 in main at /Users/kenton/Projects/pllc/Media 101/Build/iOS/Classes/main.mm:33
#39 0x00000001853f856c in start ()

Crashing on line 4 here:

libsystem_kernel.dylib`__pthread_kill:
    0x1855282e0 <+0>:  mov    x16, #0x148
    0x1855282e4 <+4>:  svc    #0x80
->  0x1855282e8 <+8>:  b.lo   0x185528300               ; <+32>
    0x1855282ec <+12>: stp    x29, x30, [sp, #-0x10]!
    0x1855282f0 <+16>: mov    x29, sp
    0x1855282f4 <+20>: bl     0x185508bdc               ; cerror_nocancel
    0x1855282f8 <+24>: mov    sp, x29
    0x1855282fc <+28>: ldp    x29, x30, [sp], #0x10
    0x185528300 <+32>: ret    

Any help or thoughts on what could be going on / how to fix it would be greatly appreciated!

Thanks!

anokta commented 6 years ago

This is most likely caused by the issue googlevr/gvr-unity-sdk/issues/665.

Could you verify if running pod update inside the generated XCode workspace fixes the crash? Please refer to the mentioned issue above (and the referenced duplicate issues accordingly) for further information and fix steps.

anokta commented 6 years ago

Also, another thing you may want to verify is that you have removed the legacy GVR Audio plugin assets from your project. Please see the related documentation below for more information: https://developers.google.com/resonance-audio/develop/unity/getting-started#delete_google_vr_audio_assets_and_libraries

hamaluik commented 6 years ago

Sorry for the delay; running pod update seems to have fixed it from crashing.

Thanks!

lightbe commented 6 years ago

@anokta I tried to look at your link from the Google developer website. When I clicked the link it attempts to open this link which does not exist: https://github.com/resonance-audio/resonance-audio-unity-sdk/issues/url> I had to copy/paste the text of your link into a new window to open it.

anokta commented 6 years ago

The link should be correct now, thanks!