Page 1 of 1

✔️ FIXED BUG: TFXplorer crashes if no audio devices are available.

Posted: 2024-Feb-05, 10:48
by bored
Maybe not the most common scenario on PCs these days, but I ran into it while RDPing a Windows PC without setting up the audio.
The symptoms were that I got the 'DirectX SDK June 2010 not installed, so there'll be no sound' message in the first screen. I ignored that as I wasn't interested in sound anyway, but I got a crash if I proceeded to try and run a scenario.
I was meddling with the code at the time, so it was a while before I realized what was happening. :)

Re: 🔴 OPEN BUG: TFXplorer crashes if no audio devices are available.

Posted: 2024-Feb-05, 22:39
by Krishty
A bug is a bug and needs fixing! I’ll check it out.

If you have a debugger attached: The specific function or call stack that’s crashing would speed up the investigation.

Re: 🔴 OPEN BUG: TFXplorer crashes if no audio devices are available.

Posted: 2024-Feb-06, 20:10
by bored
Good idea!
wdbgPNG.PNG
wdbgPNG.PNG (56.06 KiB) Viewed 3945 times

Re: 🔴 OPEN BUG: TFXplorer crashes if no audio devices are available.

Posted: 2024-Feb-06, 21:32
by Krishty
Fix in the pipeline. FYI: You *do* have XAudio2 installed, but there is simply no audio device for it to use. I never reached that code path before; thanks a lot for testing and finding that! 🙏

Open TFXplorer Sound.cpp. In line 716, replace

Code: Select all

	return OS::Win32::XAudio2::tryToCreate(audio.myToXAudio, audio.myToSpeakers);
with

Code: Select all

	if(OS::Win32::XAudio2::tryToCreate(audio.myToXAudio, audio.myToSpeakers))
		return yes;

	audio.myToXAudio   = nullptr;
	audio.myToSpeakers = nullptr;
	return no;

Re: ✔️ FIXED BUG: TFXplorer crashes if no audio devices are available.

Posted: 2024-Feb-11, 01:21
by Krishty
Fix has landed.