space-wizards / RobustToolbox

Robust multiplayer game engine, used by Space Station 14
https://spacestation14.io
Other
551 stars 410 forks source link

Unhandled exception in MIDI thread #1247

Closed PJB3005 closed 4 years ago

PJB3005 commented 4 years ago
Unhandled exception. System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'AudioSource'.
   at Robust.Client.Graphics.Clyde.Clyde.BufferedAudioSource._checkDisposed() in /var/lib/jenkins/workspace/SS14 Content@2/RobustToolbox/Robust.Client/Graphics/Clyde/Audio/Clyde.Audio.cs:line 754
   at Robust.Client.Graphics.Clyde.Clyde.BufferedAudioSource.WriteBuffer(Int32 handle, ReadOnlySpan`1 data) in /var/lib/jenkins/workspace/SS14 Content@2/RobustToolbox/Robust.Client/Graphics/Clyde/Audio/Clyde.Audio.cs:line 798
   at Robust.Client.Audio.Midi.MidiRenderer.Render(Int32 length) in /var/lib/jenkins/workspace/SS14 Content@2/RobustToolbox/Robust.Client/Audio/Midi/MidiRenderer.cs:line 426
   at Robust.Client.Audio.Midi.MidiManager.ThreadUpdate() in /var/lib/jenkins/workspace/SS14 Content@2/RobustToolbox/Robust.Client/Audio/Midi/MidiManager.cs:line 341
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

This causes a hard client crash because the MIDI thread has no exception handling.

PJB3005 commented 4 years ago

Fixed by #1248