コミュニティQ&A

Audiokineticのコミュニティ主導のQ&Aフォーラムへようこそ。ここはWwiseとStrataのユーザのみなさまがお互いに協力し合う場です。弊社チームによる直接のサポートをご希望の場合はサポートチケットページをご利用ください。バグを報告するには、Audiokinetic LauncherのBug Reportオプションをご利用ください。(Q&AフォーラムではBug Reportを受け付けておりませんのでご注意ください。専用のBug Reportシステムをご利用いただくことで、バグの報告が適切な担当部門に届き、修正される可能性が高まります。)

最適な回答を迅速に得られるよう、ご質問を投稿される際は以下のヒントをご参考ください。

  • 具体的に示す:何を達成したいのか、またはどんな問題に直面しているのかを具体的に示してください。
  • 重要な詳細情報を含める:Wwiseとゲームエンジンのバージョンやご利用のOSなど詳細情報を記載してください。
  • 試したことを説明する:すでに試してみたトラブルシューティングの手順を教えてください。
  • 事実に焦点を当てる:問題の技術的な事実を記載してください。問題に焦点を当てることで、ほかのユーザのみなさまが解決策を迅速に見つけやすくなります。

+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 ===========
Christopher B. (140 ポイント) General Discussion

回答 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;
        }
    }
...