Game crashes when playing from the editor if scene is saved
Edits to a scene are passed along to the game while it’s being played in the editor; this is fine, however, once the scene is saved, the MIDI player abruptly stops playing, and soon after crashes. No error is produced, which I assume is because the error occurs within the thread.
Comments (5)
-
repo owner -
reporter Tested it; the first time I tested it, it didn’t crash after changing
max_polyphony
from 96 to 95, then saving the scene. However, every subsequent test after this (changing just any random value in any scene then saving) has resulted in a crash, spare a few times. Seems that most of the time it will crash, but rarely will not, which I guess is something to do with “threading the needle” on when something is locked vs. not locked.Something I’ve discovered is that by setting
Debug -> Synchronize Script Changes
to off, the crashing no longer occurs;Synchronize Scene Changes
doesn’t seem to make a difference. My guess is that Godot is attempting to alter either the MIDI player’s script, or one of the ADSR scripts, while the MIDI player thread is doing work there, resulting in a crash.From what I’ve seen, people usually find that
Synchronize Script Changes
is unreliable anyway, so it’s not the end of the world if this needs to stay off while using the MIDI player. -
reporter https://github.com/godotengine/godot/issues/35228
https://github.com/godotengine/godot/issues/24684
Issues that seem to be related. Might just be a Godot problem.
-
repo owner @Somni I committed
a13f483
that implement switchingThread
or_process
for fixed bug running on HTML5.Use
_process
while debugging on the editor.
It is not perfectly method, but It will be deal with the Godot Thread problem.
-
repo owner - changed status to resolved
6d1ae45
にてデバッグ時はThreadを使用しないことで対処I fixed it at
6d1ae45
, It will be disable Thread when running on debug mode. - Log in to comment
I added some mutex lock/unlock at 667f9c59db899f8de309c392006fdfa076c8b310