Closed twittyc closed 2 years ago
Looks like it may be related to the mutex check.
It appears to be somewhere in our NAudio dependency: https://github.com/naudio/NAudio/blob/fb35ce8367f30b8bc5ea84e7d2529e172cf4c381/NAudio.Wasapi/CoreAudioApi/AudioSessionManager.cs#L90-L102
I don't see any connection to our mutex check. The line numbers here are slightly off so that may have caused some confusion.
I'm fairly certain this is the line in our code that is crashing: https://github.com/blish-hud/Blish-HUD/blob/10a9618524828fafa90148b1ff82a921b1960c1e/Blish%20HUD/GameServices/GameIntegration/AudioIntegration.cs#L174
We can look at expanding the try/catch there to cover this, but can you confirm if you have any unique audio devices like virtual audio cables or anything like that configured? This code is attempting to detect your default device for Guild Wars 2 by enumerating the audio sessions and then checking their PID to see if they match the GW2 one. If they do, we measure the audio levels on that audio device to try and match our volume.
Hi, thanks for the reply. Here's a screenshot of my sound devices.
Ok, so I was going to set up the debugger and see if I could resolve this myself. However, when running the local build of Blish HUD. I didn't experience any crashing.
Ahh! It could be that we've already solved this in our prereleases. Could you check if you have the issue in our latest prerelease or build from CI?
So I'm only seeing 8 Releases and 8 Tags and no prerelease branches. Not sure if I don't have permission to see it or what. The above error was using the latest release v0.11.7.
Here is what I did to debug: I cloned the dev branch and went to build it locally and noticed a compilation error with AudioIntegration.cs the last import using NAudio.CoreAudioApi;
wasn't in the NuGet packages, only NAudio.Wasapi
. So I pulled in the base NAudio
and was able to compile it for debugging. I then launched the app followed by Guild Wars 2 and didn't get the error anymore. Anyway, IDK if these steps are helpful or not :)
Great! That should confirm we are good on the latest builds then. We only host the prereleases on a separate repo (or linked in our discord channel) so you'd have to pull it from the CI otherwise.
If the build from source worked, that means it will be working for you in the next release and we've already got it fixed. 😁
Yeah, you're right I just pulled the latest nightly build from Actions and it worked without crashing :)
Thanks for your patience in all of that. Glad we were able to confirm. I'll go ahead and close since we have it fixed in the latest dev builds. Don't hesitate to reach out if you run into any other issues. 👍
BlishHUD crashes when Guild Wars 2 starts with the following stack trace:
I tried digging into it a bit, but I'm not sure what file it's expecting.