Game crashes when playing from the editor if scene is saved

Issue #70 resolved
Somni created an issue

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)

  1. Somni 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.

  2. きのもと結衣 repo owner

    @Somni I committed a13f483 that implement switching Thread 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.

  3. きのもと結衣 repo owner

    6d1ae45にてデバッグ時はThreadを使用しないことで対処

    I fixed it at 6d1ae45, It will be disable Thread when running on debug mode.

  4. Log in to comment