Emitting a Signal freezes App but only on Android

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Takiro

In my app I listen to key input’s on a LineEdit and when the enter key is pressed a signal is emitted to inform the parent a new line edit needs to be added to the parent’s VBoxContainer. This works perfectly on my desktop but on Android the App freezes and then crashes.

func _on_LineEdit_gui_input(event):
	if event is InputEventKey:
		if event.scancode == KEY_ENTER and event.pressed:
			if _can_add($InputContainer/LineEdit.text):
				print_debug("Can add")
				emit_signal("enter_key_pressed")

The App freezes at emit_signal("enter_key_pressed") but only on my phone. On the desktop it works as expected, the signal is emitted and processed. Am I missing something?

I use remote debugging but the output window shows no error.

Try reading the logcat to see if there’s any crash info:

$ adb logcat

Ev1lbl0w | 2021-08-26 09:46