Signals not working and a bunch of errors in exported Linux project. (Godot 4)

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

Hello, I’m making a project using Godot 4.

When I run the project via the editor (not in exported form), it runs fine.
However when exported I get a whole list of errors.
This is the log:


Godot Engine v4.0.beta1.mono.official.4ba934bf3 - https://godotengine.org
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0
Vulkan API 1.2.0 - Using Vulkan Device #0: Intel - Intel(R) UHD Graphics 630 (CML GT2)

ERROR: .NET: Failed to load hostfxr
at: initialize (modules/mono/mono_gd/gd_mono.cpp:394)
SCRIPT ERROR: Parse Error: Preload file “res://video_track.tscn” does not exist.
at: GDScript::reload (res://Scripts/editor.gd:3)
SCRIPT ERROR: Parse Error: Preload file “res://audio_track.tscn” does not exist.
at: GDScript::reload (res://Scripts/editor.gd:4)
ERROR: Parser bug (please report): tried to assign unset node without an identifier.
at: resolve_class_interface (modules/gdscript/gdscript_analyzer.cpp:656)
SCRIPT ERROR: Parse Error: Preload file “res://file.tscn” does not exist.
at: GDScript::reload (res://Scripts/file-manager.gd:4)
ERROR: Parser bug (please report): tried to assign unset node without an identifier.
at: resolve_class_interface (modules/gdscript/gdscript_analyzer.cpp:656)
SCRIPT ERROR: Parse Error: Preload file “res://sample.tscn” does not exist.
at: GDScript::reload (res://Scripts/file-drag-manager.gd:3)
ERROR: Signal ‘mouse_entered’ is already connected to given callable ‘Control(custom-button.gd)::on_mouse_hover’ in that object.
at: connect (core/object/object.cpp:1269)
ERROR: Signal ‘mouse_exited’ is already connected to given callable ‘Control(custom-button.gd)::on_mouse_unhover’ in that object.
at: connect (core/object/object.cpp:1269)
ERROR: Signal ‘mouse_entered’ is already connected to given callable ‘Control(custom-button.gd)::on_mouse_hover’ in that object.
at: connect (core/object/object.cpp:1269)
ERROR: Signal ‘mouse_exited’ is already connected to given callable ‘Control(custom-button.gd)::on_mouse_unhover’ in that object.
at: connect (core/object/object.cpp:1269)
ERROR: Signal ‘mouse_entered’ is already connected to given callable ‘Control(custom-button.gd)::on_mouse_hover’ in that object.
at: connect (core/object/object.cpp:1269)
ERROR: Signal ‘mouse_exited’ is already connected to given callable ‘Control(custom-button.gd)::on_mouse_unhover’ in that object.
at: connect (core/object/object.cpp:1269)
ERROR: Signal ‘mouse_entered’ is already connected to given callable ‘Control(custom-button-fade.gd)::on_mouse_hover’ in that object.
at: connect (core/object/object.cpp:1269)
ERROR: Signal ‘mouse_exited’ is already connected to given callable ‘Control(custom-button-fade.gd)::on_mouse_unhover’ in that object.
at: connect (core/object/object.cpp:1269)
ERROR: Signal ‘mouse_entered’ is already connected to given callable ‘Control(custom-button-fade.gd)::on_mouse_hover’ in that object.
at: connect (core/object/object.cpp:1269)
ERROR: Signal ‘mouse_exited’ is already connected to given callable ‘Control(custom-button-fade.gd)::on_mouse_unhover’ in that object.
at: connect (core/object/object.cpp:1269)


In the exported version, nothing seems to happen when GUI buttons are clicked, while in the unexported mode, everything works.

As seen in the log, no signals seem to get connected properly, these are connected via the Godot 4 GUI, not via script. Just to mention that.

When a GUI button is clicked in the exported project, i get this error:


ERROR: Error calling from signal ‘pressed’ to callable: ‘Node(editor.gd)::on_add_video_track’: Method not found…
at: emit_signalp (core/object/object.cpp:1057)


This button is a custom made one, but it does work in the unexported version.
‘editor.gd’ by the way is a script i made.

This project is fully written in GDScript.

Can someone please help me to fix this issue?

(My machine runs Fedora Linux 36)

:bust_in_silhouette: Reply From: MomoVR

I fixed it. Apparently, it wasn’t about the errors. It was about using preload() in Godot 4. As said in the announcement page of Godot 4, preload() doesn’t work yet in this version.

I was using preload to spawn an object when the button was pressed. Since preload() fails, there was nothing to spawn. Thus this didn’t work.

Just replacing preload() with load() fixed everything.

So don’t use preload() in Godot 4 beta!!!