커뮤니티 Q&A

Audiokinetic의 커뮤니티 Q&A 포럼에 오신 것을 환영합니다. 이 포럼은 Wwise와 Strata 사용자들이 서로 도움을 주는 곳입니다. Audiokinetic의 직접적인 도움을 얻으려면 지원 티켓 페이지를 사용하세요. 버그를 보고하려면 Audiokinetic 런처에서 Bug Report 옵션을 사용하세요. (Q&A 포럼에 제출된 버그 보고는 거절됩니다. 전용 Bug Report 시스템을 사용하면 보고 내용이 담당자에게 정확히 전달되어 문제 해결 가능성이 크게 높아집니다.)<segment 6493>

빠르고 정확한 답변을 얻으려면 질문을 올릴 때 다음 팁을 참고하세요.

  • 구체적인 내용을 적어주세요: 무엇을 하려는지, 혹은 어떤 특정 문제에 부딪혔는지 설명하세요.
  • 핵심 정보를 포함하세요: Wwise와 게임 엔진 버전, 운영체제 등 관련 정보를 함께 제공하세요.
  • 시도한 방법들을 알려주세요: 문제 해결을 위해 이미 어떤 단계를 시도해봤는지 설명해주세요.
  • 객관적인 사실에 초점을 맞추세요: 문제의 기술적 사실을 중심으로 설명하세요. 문제에 집중할수록 다른 사람들이 더 빠르게 해결책을 찾을 수 있습니다.

+4 투표
We're getting a Unity editor crash fairly consistently when playing in editor, right when we hit Stop. Some users get it every third time they stop or so, others get it much less frequently.

Wwise version is v2016.1.3 Build 5878.

It's happened on the last few Unity point releases, currently on Unity 5.4.3f1.

One thing that seemed relevant was that the Script Execution Order for AkTerminator needs to be fairly late. For some reason mine wasn't set properly, so I changed it to 31000. That seemed to reduce the crashes at least on my machine, but other users still report plenty of crashes.

We were calling AkSoundEngine.SetRTPCValue() three times per frame to set our volume levels, which most of the time weren't changing. Now I only make that call when they change. Again, it seemed to help the crashes, but it's really hard to tell. (Looking at what AkTerminator does to try to wait for things to settle down before terminating Wwise, it seemed like spamming events or RTPCs or whatever might exacerbate the issue, but that's purely a guess.)

This issue is costing us a lot of productivity right now because our project is large enough that it takes a while when you first hit play after starting Unity, so a crash wastes probably 5+ minutes each time. Any help is really appreciated!

The stack trace at the bottom of Editor.log usually looks like this:

========== OUTPUTING STACK TRACE ==================

0x00007FFADB2743B7 (AkSoundEngine) AK::MemoryMgr::Term
0x00007FFADB274784 (AkSoundEngine) AK::MemoryMgr::Term
0x00007FFADB2736A9 (AkSoundEngine) AK::MemoryMgr::Free
0x00007FFADB1A6C83 (AkSoundEngine) AK::SoundEngine::Term
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FFADB194849)
0x00007FFADB194849 (AkSoundEngine)
0x00000000261E346D (Mono JIT Code) (wrapper managed-to-native) AkSoundEnginePINVOKE:CSharp_Term ()
0x00000000261E3345 (Mono JIT Code) [C:\_airship\BattleChasers\Source\Assets\Wwise\Deployment\API\Generated\Windows\AkSoundEngine_Windows.cs:2360] AkSoundEngine:Term ()
0x00000000261E1D55 (Mono JIT Code) [C:\_airship\BattleChasers\Source\Assets\Wwise\Deployment\Components\AkTerminator.cs:93] AkTerminator:Terminate ()
0x00000000261E178D (Mono JIT Code) [C:\_airship\BattleChasers\Source\Assets\Wwise\Deployment\Components\AkTerminator.cs:43] AkTerminator:OnApplicationQuit ()
0x0000000005F07012 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FFAAD8D539F (mono) [c:\buildslave\mono\build\mono\mini\mini.c:4937] mono_jit_runtime_invoke
0x00007FFAAD828385 (mono) [c:\buildslave\mono\build\mono\metadata\object.c:2623] mono_runtime_invoke
0x0000000140362C9F (Unity) scripting_method_invoke
0x00000001404C99BF (Unity) ScriptingInvocation::Invoke
0x0000000140344146 (Unity) MonoBehaviour::HandleNotifications
0x000000014004AAE2 (Unity) MessageHandler::HandleMessage
0x000000014004B1B4 (Unity) GameObject::SendMessageAny
0x00000001403D2959 (Unity) SendMessageToEveryone
0x00000001404665C4 (Unity) NotifyPlayerQuit
0x0000000140BE2811 (Unity) Application::ExitPlayMode
0x0000000140BE2C3B (Unity) Application::SetIsPlaying
0x0000000140BE3716 (Unity) Application::TickTimer
0x0000000140E47E2E (Unity) FindMonoBinaryToUse
0x0000000140E49461 (Unity) WinMain
0x00000001415AD460 (Unity) strnlen
0x00007FFAE9E88364 (KERNEL32) BaseThreadInitThunk

========== END OF STACKTRACE ===========
General Discussion Christopher B. (140 포인트) 로 부터

1 답변

0 투표
Same issue here, again and again! Maybe an audiokinetic member can answer and give more informations ?
Olivier F. (230 포인트) 로 부터
Ok, I found a fix for this crash!

Add this in AKTerminator.cs:

    void OnEnable()
    {       
        //The sound engine was not terminated normally.  Make this instance the one that will manage termination.
        //This happen when Unity resets everything when a script changes.
        if (ms_Instance == null && AkSoundEngine.IsInitialized())
        {
            ms_Instance = this;
        }
    }
...