Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
139 stars 2 forks source link

Deselecting "Use System Default Output Device" causes crash. #1704

Open FreyarH opened 6 months ago

FreyarH commented 6 months ago

Describe the bug?

When using the new settings menu in Beta 2024.4.15.1407, deselecting "Use System Default Output Device" causes a crash.

To Reproduce

Start Resonite in Desktop Mode Let Dashboard Open Select "Settings" Select "Audio" Click "Use System Default Output Device" to disable it.

Expected behavior

The setting will disable and the button to configure Audio Output Devices will be enabled so you can change output audio devices.

Screenshots

image image

Resonite Version Number

Beta 2024.4.15.1407

What Platforms does this occur on?

Windows

What headset if any do you use?

Desktop (Untested w/ Vive Pro Eye)

Log Files

X3DBOX - 2024.4.15.1407 - 2024-04-15 21_30_53.log Player.log

Additional Context

There are 14 output devices registered for playback on this system. (10 disabled, one disconnected, nvidia sure does like to count every display device as an audio device...) There are 6 input devices registered for recording. Deselecting "Use Default Device" for input does not cause this crash.

Reporters

@Freyar @marsmaantje @MaxyGates

FreyarH commented 6 months ago

Referenced in #1721 , and that may have a point. I have one virtual audio devices that pushes up to 7.1 audio channels.

Could be choking on enumerating that device. image

shiftyscales commented 6 months ago

Additional report by @marsmaantje from #1721:

Describe the bug?

Resonite crashes when I switch audio output device to one with a different amount of channels.

To Reproduce

  1. Make sure you have an audio output with more than the default 2 channels (you can do this with the virtual outputs of Voicemeeter, through the windows sound settings) image

  2. Open the Resonite settings and switch manually from your default output to the one with a different amount of channels image

  3. Observe the unity crash image

Expected behavior

you don't crash

Screenshots

No response

Resonite Version Number

Beta 2024.4.16.520

What Platforms does this occur on?

Windows

What headset if any do you use?

No response

Log Files

DESKTOP-K2H0L1O - 2024.4.16.520 - 2024-04-16 18_25_27.log Player.log

Additional Context

Added player log as well since its a unity crash and nothing is shown in the normal Resonite log

Might be the cause of #1704 as well

Reporters

marsmaantje

Nytra commented 6 months ago

I'm having a crash which I think is related. I can launch Resonite and deselect "Use System Default Output Device" without crashing, however if I then switch my default output device to OUT 1-4 (BEHRINGER UMC 204HD 192k) I crash instantly.

The output device at launch which works fine:

OUT 1-2 (BEHRINGER UMC 204HD 192k), ID: {0.0.0.00000000}.{a69178f9-b62b-4697-a7cc-dcde3ec9239d}, Format: ChannelsAvailable: 2|SampleRate: 48000|Bps: 384000|BlockAlign: 8|BitsPerSample: 32|Encoding: Extensible|SubFormat: 00000001-0000-0010-8000-00aa00389b71|ChannelMask: SpeakerFrontLeft, SpeakerFrontRight, Default: True

The device which crashes me:

OUT 1-4 (BEHRINGER UMC 204HD 192k), ID: {0.0.0.00000000}.{56e928aa-10fb-4cd6-b557-18d371f5d642}, Format: ChannelsAvailable: 4|SampleRate: 48000|Bps: 768000|BlockAlign: 16|BitsPerSample: 32|Encoding: Extensible|SubFormat: 00000001-0000-0010-8000-00aa00389b71|ChannelMask: SpeakerFrontLeft, SpeakerFrontRight, SpeakerBackLeft, SpeakerBackRight, Default: False

Logs:

DESKTOP-H976HO2 - 2024.4.26.1258 - 2024-04-28 22_36_21.log

Player.log

shiftyscales commented 6 months ago

Yeah, that device meets the suspected criteria of the above report in that it has more than two channels, @Nytra. Thanks for the additional logs, as far as I can tell this issue already has all that it needs to be looked into.

Seeking input from any of @Frooxius, @ProbablePrime, or @Geenz.

Cataena commented 5 months ago

Not sure if helpful to add, but it crashes me every time I turn my bluetooth headphones on and they connect to my PC, since I'm on "use default device" and it auto-switches to them. It's causing pretty frequent crashes for me since my headphones tend to time out every so often and turn themselves off.

shiftyscales commented 5 months ago

@FreyarH @marsmaantje @Nytra Can you retest on the latest build? I suspect this may be resolved with the closure of #1739.

Likewise, @Cataena - #1739 sounds like it may have been your issue, so it would be good to check if that issue is still occurring for you.

Nytra commented 5 months ago

@shiftyscales I am still crashing when trying to switch to the OUT 1-4 (BEHRINGER UMC 204HD 192k) device.

New log files:

DESKTOP-H976HO2 - 2024.5.24.202 - 2024-05-24 22_48_09.log

Player.log

FreyarH commented 5 months ago

@shiftyscales Problem persists on Beta 2024.5.24.202

X3DBOX - 2024.5.24.202 - 2024-05-24 16_43_09.log

Frooxius commented 5 months ago

From the logs, this looks unfortunately like a bug in CSCore library, probably due to it tripping over certain audio devices.

We would like to switch away from it completely, since it's not really maintained anymore, possibly to NAudio. I'm not sure if I'd want to commit to making fixes for it right now because of that.

If anybody wants to poke around and potentially open PR with a fix, here's out fork: https://github.com/Yellow-Dog-Man/cscore