Disconnecting Bluetooth headset hangs game
Need More Information
I caught it this time because a debugger was attached, but I don't have a _reliable_ way to reproduce it, other than to have your BT headset be disconnected by you walking too far away or something like that. Turning the headset off manually seems to work fine.
Hope this helps somehow!
Hello, shamsi!
Sorry to hear you're experiencing this issue. I've been trying this on some Airpods as my normal headset is wired. I have been able to reproduce a small issue where if I'm flying a ship, for example, there is a few second 'blip' where they have been disconnected. You mentioned yours hangs, is it possible to tell me a bit more about that or even provide a video? What I'm experiencing must be no more than two seconds so wonder if yours is more severe? I assume it then recovers after the hang? Please let me know :)
Kind Regards
Laura, QA Department
Hello, shamsi!
Sorry to hear you're experiencing this issue. I've been trying this on some Airpods as my normal headset is wired. I have been able to reproduce a small issue where if I'm flying a ship, for example, there is a few second 'blip' where they have been disconnected. You mentioned yours hangs, is it possible to tell me a bit more about that or even provide a video? What I'm experiencing must be no more than two seconds so wonder if yours is more severe? I assume it then recovers after the hang? Please let me know :)
Kind Regards
Laura, QA Department
I will think how I can capture it. No, after it hangs I have to force quit and restart the game. :(
I will think how I can capture it. No, after it hangs I have to force quit and restart the game. :(
Hello, shamsi!
Thank you for letting me know. So in terms of the questions, I asked previously, this does not sound like what I'm experiencing. Would you agree? Could you answer those please just for a bit more information? Could I ask what headset you are using? Is it also please possible to supply a copy of the log from this happening? I appreciate you have provided the above screenshot but a log would be excellent too.
Kind Regards
Laura, QA Department
Hello, shamsi!
Thank you for letting me know. So in terms of the questions, I asked previously, this does not sound like what I'm experiencing. Would you agree? Could you answer those please just for a bit more information? Could I ask what headset you are using? Is it also please possible to supply a copy of the log from this happening? I appreciate you have provided the above screenshot but a log would be excellent too.
Kind Regards
Laura, QA Department
Hi, so I'm attaching a video of the game as I disconnect my Sony WH-CH700N headphones. The game falls to the debugger, when I resumed, it crashed with the attached log.
We might be talking about some similar but related bugs, or one bug, I'm not sure. I've had three outcomes happen when I disconnect headphones:
* the game crashes with a log
* the game hangs and must be force quit
* the game stays up but there no more volume, and playing with the volume bar in the settings to reset things doesn't work
Hope this helps somehow
Hi, so I'm attaching a video of the game as I disconnect my Sony WH-CH700N headphones. The game falls to the debugger, when I resumed, it crashed with the attached log.
We might be talking about some similar but related bugs, or one bug, I'm not sure. I've had three outcomes happen when I disconnect headphones:
* the game crashes with a log
* the game hangs and must be force quit
* the game stays up but there no more volume, and playing with the volume bar in the settings to reset things doesn't work
Hope this helps somehow
Oops it seems there's something wrong with the video, guess OBS couldn't record it crashing. It's basically my drum machine that's using a lot of sound blocks at once.
Oops it seems there's something wrong with the video, guess OBS couldn't record it crashing. It's basically my drum machine that's using a lot of sound blocks at once.
Hello, shamsi!
Thank you so much for the information and log. A few further questions - Does this still happen even without the attached debugger? For instance, if you started it without this? Could you also please supply a copy of that world mentioned above to see if I can reproduce it on that rather than a fresh world of my own?
Kind Regards
Laura, QA Department
Hello, shamsi!
Thank you so much for the information and log. A few further questions - Does this still happen even without the attached debugger? For instance, if you started it without this? Could you also please supply a copy of that world mentioned above to see if I can reproduce it on that rather than a fresh world of my own?
Kind Regards
Laura, QA Department
As I already stated in another similar thread: https://support.keenswh.com/spaceengineers/pc/topic/game-locks-up-when-bluetooth-headphone-disconnected
I believe this bug occurs because Space Engineers initializes its XAudio2 sound engine using XAUDIO2_NO_VIRTUAL_AUDIO_CLIENT flag. This means that the sound engine is bound directly to specific audio output device.
Since most modern USB based or Bluetooth based Headphones are detected by system as individual audio output devices it means that as soon connection to one of them is interrupted that audio output device is no longer present so SE sound engine has nowhere to output its sound.
Now this internally raises Xaudio2 OnCriticalError Event which application can then use in order to reinitialize its sound interface to another Audio output device but it seems Se doesn't handle this properly and thus causes its audio system to crash and hang entire game.
So in order to fix this bug the above mention OnCriticalError must be handled properly.
Another solution would be to initialize XAudio2 sound engine without XAUDIO2_NO_VIRTUAL_AUDIO_CLIENT. This would initialize audio system as virtual client which means that it can handle switching of Audio Output devices without any interruptions. But it might have some other drawbacks. For instance I don't know how switching from 4 channel audio to 2 channel audio would be handled. It might lead to sound that would otherwise be played on 3rd and 4th channel of simply not being played.
PS: You can read a bit more about OnCriticalError event handling here: https://docs.microsoft.com/en-us/windows/win32/api/xaudio2/nf-xaudio2-ixaudio2enginecallback-oncriticalerror
PPS: I guess it would be most easy to reproduce this scenario by unplugging USB based headphones. Some Bluetooth based headphones does not remove their Audio output device right away but with a bit longer delay.
As I already stated in another similar thread: https://support.keenswh.com/spaceengineers/pc/topic/game-locks-up-when-bluetooth-headphone-disconnected
I believe this bug occurs because Space Engineers initializes its XAudio2 sound engine using XAUDIO2_NO_VIRTUAL_AUDIO_CLIENT flag. This means that the sound engine is bound directly to specific audio output device.
Since most modern USB based or Bluetooth based Headphones are detected by system as individual audio output devices it means that as soon connection to one of them is interrupted that audio output device is no longer present so SE sound engine has nowhere to output its sound.
Now this internally raises Xaudio2 OnCriticalError Event which application can then use in order to reinitialize its sound interface to another Audio output device but it seems Se doesn't handle this properly and thus causes its audio system to crash and hang entire game.
So in order to fix this bug the above mention OnCriticalError must be handled properly.
Another solution would be to initialize XAudio2 sound engine without XAUDIO2_NO_VIRTUAL_AUDIO_CLIENT. This would initialize audio system as virtual client which means that it can handle switching of Audio Output devices without any interruptions. But it might have some other drawbacks. For instance I don't know how switching from 4 channel audio to 2 channel audio would be handled. It might lead to sound that would otherwise be played on 3rd and 4th channel of simply not being played.
PS: You can read a bit more about OnCriticalError event handling here: https://docs.microsoft.com/en-us/windows/win32/api/xaudio2/nf-xaudio2-ixaudio2enginecallback-oncriticalerror
PPS: I guess it would be most easy to reproduce this scenario by unplugging USB based headphones. Some Bluetooth based headphones does not remove their Audio output device right away but with a bit longer delay.
I guess i can reproduce the problem. I also have sony headset connected via bluetooth. What could i do to collect data for support?
I guess i can reproduce the problem. I also have sony headset connected via bluetooth. What could i do to collect data for support?
Just commenting here, since I've experienced the same issue, but with a wired headset.
Here's all the details I know from my experience:
Order of events before encountering this issue:
Booted up Space Engineers > loaded offline creative game > within 5-10 seconds after loading I plugged my headset into the USB port > game audio swapped to headset, but all ambient audio was gone, except for footsteps > sat in, and then got back out of seat inside ship which "refreshed" the audio, and ambient audio returned > unplugged USB headset to rearrange wire > plugged headset back in > game was frozen when attempting to resume play, and no audio at all was heard > checked if Steam overlay still worked, and it did, and then closed it > minimized, and then maximized game > game was still frozen > force closed the game.
Obviously unsure what information may be helpful, I provided everything that I remember. Let me know if there are any questions. Hope this issue is resolved soon!
Just commenting here, since I've experienced the same issue, but with a wired headset.
Here's all the details I know from my experience:
Order of events before encountering this issue:
Booted up Space Engineers > loaded offline creative game > within 5-10 seconds after loading I plugged my headset into the USB port > game audio swapped to headset, but all ambient audio was gone, except for footsteps > sat in, and then got back out of seat inside ship which "refreshed" the audio, and ambient audio returned > unplugged USB headset to rearrange wire > plugged headset back in > game was frozen when attempting to resume play, and no audio at all was heard > checked if Steam overlay still worked, and it did, and then closed it > minimized, and then maximized game > game was still frozen > force closed the game.
Obviously unsure what information may be helpful, I provided everything that I remember. Let me know if there are any questions. Hope this issue is resolved soon!
I have had the same issue with my Bluetooth headphones, wired headset, and monitor speakers. I allowed the game to sit frozen while reading this thread. I tried going back to the game and it was not on my taskbar but steam still showed it as running. Went to task manager and it showed up (first) in my background processes, while still using my GPU.
Maybe this could help the troubleshooting process. Feel free to let me know if there is anything else I could provide or if you want some help reproducing the issue.
I have had the same issue with my Bluetooth headphones, wired headset, and monitor speakers. I allowed the game to sit frozen while reading this thread. I tried going back to the game and it was not on my taskbar but steam still showed it as running. Went to task manager and it showed up (first) in my background processes, while still using my GPU.
Maybe this could help the troubleshooting process. Feel free to let me know if there is anything else I could provide or if you want some help reproducing the issue.
I'm running into the same problem, with wired headphones plugged directly into the audio jack of my PC. It seems to happen pretty consistently when I unplug my headphones and windows automatically switches audio devices to my monitor. Same as above, the game doesn't respond to any input or to alt+f4, but doesn't crash and doesn't show as unresponsive in task manager.
I'm running into the same problem, with wired headphones plugged directly into the audio jack of my PC. It seems to happen pretty consistently when I unplug my headphones and windows automatically switches audio devices to my monitor. Same as above, the game doesn't respond to any input or to alt+f4, but doesn't crash and doesn't show as unresponsive in task manager.
Replies have been locked on this page!