![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Promixe |
Hello, I have a simple game where MIDI input is used to trigger signals, which are then connected to several child nodes to emit other nodes programmatically:
func _input(event : InputEvent):
if (event is InputEventMIDI):
match event.message:
MidiMessageType.MIDI_MESSAGE_NOTE_ON:
emit_signal("key_on", event.pitch - 21, event.velocity)
MidiMessageType.MIDI_MESSAGE_NOTE_OFF:
emit_signal("key_off", event.pitch - 21)
However the game crashes randomly after (this is my guess) too many child notes emitted. The only error message I get (in the Godot Engine text window) is either:
ERROR: is_greater_than: Condition "!data.inside_tree" is true. Returned: false
At: scene/main/node.cpp:1445
ERROR: is_greater_than: Condition "!data.inside_tree" is true. Returned: false
At: scene/main/node.cpp:1445
ERROR: is_greater_than: Condition "!data.inside_tree" is true. Returned: false
At: scene/main/node.cpp:1445
ERROR: is_greater_than: Condition "p_node->data.depth < 0" is true. Returned: false
At: scene/main/node.cpp:1449
Or this message:
ERROR: is_greater_than: Index idx = -1 is out of bounds (data.depth = 0).
At: scene/main/node.cpp:1468
ERROR: is_greater_than: Index idx = -1 is out of bounds (data.depth = 0).
At: scene/main/node.cpp:1468
Unfortunately, I don’t know what any of them mean and don’t know how to get more detailed debug info on WHERE in my GDScript this happens, because the game exits without warnings/errors in the editor (the editor remains opened).
Could you please point me in the right direction as to where to look next? Thanks!
PS: The number of child nodes emitted from pressing MIDI keys is definitely below 1000…Probably close to 500 when the game crashes…
PPS: Godot 3.2.1 on Windows 10 1903