]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Clear MIDI masters properly to avoid replay freezes (#36809)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Sat, 26 Apr 2025 06:42:16 +0000 (08:42 +0200)
committerGitHub <noreply@github.com>
Sat, 26 Apr 2025 06:42:16 +0000 (16:42 +1000)
commite7be57d85f8f0644aac9010378d35f5cbc6c4224
tree3a7cf2f001112506975f9c2f10669e297a0425c1
parentf4322c5bb7eced64668fba35e4c52353637179cf
Clear MIDI masters properly to avoid replay freezes (#36809)

While trying to play a replay I noticed that the replay would freeze
when seeking in some cases. After some debugging, I discovered that two
MIDI renderers had each other as master, which caused an infinite loop
processing MIDI events.

I'm not entirely sure of the sequence of events that leads to this
during replay playback, but I did notice that MIDI render masters are
never set to null. This is in the best case just a memory leak, in the
worst case probably the source of the bug, so... I fixed that.
Content.Client/Instruments/InstrumentSystem.cs