Got some help with looking into the game freeze
issue when accessing the EVA controller #62.
As it turns out, after doing some profiling on an
affected person's computer where this issue was
happening, the infinite loop was happening when
find_prev_focus()
and
find_next_focus()
was called. This is
likely an issue with the Godot Engine, because the
code in those
functions literally have while(true)
in
them. It seems like my scene tree might be set
up in a way that triggers this issue.
There's an issue about this issue that was closed, but was commented on recently with a new MRP that reproduces the issue in 4.4. The issue happens when some nodes are visible, and the bug in my game happens on the affected person's computer when all of the focus-able controls are not visible. I tried adding a workaround which skips running the code, and this fixes the issue. However, I also noticed that the code only runs when a directional input is provided. Sure enough, the affected person had an unused controller plugged in which when unplugged no longer caused the issue. It was probably sending a small directional input that triggered the bug. It's likely that other users affected by this bug also had a controller plugged in.