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

Eggheads talking about bytes and stuff.
Post Reply
mikew
Data Genius
Posts: 603
Joined: 2022-Jan-09, 20:21

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

Post by mikew »

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. :)
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

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

Post 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.
mikew
Data Genius
Posts: 603
Joined: 2022-Jan-09, 20:21

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

Post by mikew »

Good idea!
wdbgPNG.PNG
wdbgPNG.PNG (116.62 KiB) Viewed 344 times
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

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

Post 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;
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

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

Post by Krishty »

Fix has landed.
Post Reply