Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

godot --editor --quit hangs when project has fonts and cache is clean #62820

Open
Houkime opened this issue Jul 7, 2022 · 4 comments
Open

godot --editor --quit hangs when project has fonts and cache is clean #62820

Houkime opened this issue Jul 7, 2022 · 4 comments

Comments

@Houkime
Copy link

Houkime commented Jul 7, 2022

Godot version

3.4.4.stable

System information

Arch Linux (as of issue opening date)

Issue description

When: (godot cache is clean OR the project has never been opened before) AND project contains a font file
Occurs: godot -e -q hangs
Instead of: godot exits cleanly

Steps to reproduce

  • Go to the attached project folder
  • Clean cache (rm rf ~/.cache/godot)
  • godot -e -q

Minimal reproduction project

reprohang.zip

Context

This happens when a person has newly cloned the git repo and does godot -e -q to import assets.

Output

Godot Engine v3.4.4.stable.arch_linux - https://godotengine.org
WARNING: XOpenIM failed
     at: initialize (platform/x11/os_x11.cpp:197)
Found discrete GPU, setting DRI_PRIME=1 to use it.
Note: Set DRI_PRIME=0 in the environment to disable Godot from using the discrete GPU.
WARNING: XCreateIC couldn't create xic
     at: initialize (platform/x11/os_x11.cpp:494)
OpenGL ES 2.0 Renderer: AMD Radeon HD 8600 / 8700M (oland, LLVM 14.0.6, DRM 3.46, 5.18.9-arch1-1)
OpenGL ES Batching: ON

WARNING: Scan thread aborted...
     at: _notification (editor/editor_file_system.cpp:1087)

NOTE: this is Wayland+XWayland, and all these warnings occur with clean exits too.

@qarmin
Copy link
Contributor

qarmin commented Jul 7, 2022

Freeze here



#0  0x00007ffff7b46868 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x7fffffffd160, rem=0x7fffffffd170) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:78
#1  0x00007ffff7b4b6e7 in __GI___nanosleep (req=<optimized out>, rem=<optimized out>) at ../sysdeps/unix/sysv/linux/nanosleep.c:25
#2  0x0000000002b6175a in OS_Unix::delay_usec (this=0x7fffffffd5b0, p_usec=10000) at drivers/unix/os_unix.cpp:243
#3  0x0000000002f19263 in EditorResourcePreview::stop (this=0x87de220) at editor/editor_resource_preview.cpp:441
#4  0x0000000002f194ae in EditorResourcePreview::~EditorResourcePreview (this=0x87de220, __in_chrg=<optimized out>) at editor/editor_resource_preview.cpp:454
#5  0x0000000001a87160 in memdelete<Node> (p_class=0x87de220) at ./core/os/memory.h:114
#6  0x00000000039dc389 in Node::_notification (this=0x97906e0, p_notification=1) at scene/main/node.cpp:171
#7  0x000000000191e3fa in Node::_notificationv (this=0x97906e0, p_notification=1, p_reversed=true) at ./scene/main/node.h:47
#8  0x0000000002e63be7 in EditorNode::_notificationv (this=0x97906e0, p_notification=1, p_reversed=true) at editor/editor_node.h:91
#9  0x0000000004ae0beb in Object::notification (this=0x97906e0, p_notification=1, p_reversed=true) at core/object.cpp:927
#10 0x0000000004addcb7 in Object::_predelete (this=0x97906e0) at core/object.cpp:387
#11 0x0000000004aeaeb3 in predelete_handler (p_object=0x97906e0) at core/object.cpp:2001
#12 0x0000000001a87140 in memdelete<Node> (p_class=0x97906e0) at ./core/os/memory.h:110
#13 0x00000000039dc389 in Node::_notification (this=0x90debc0, p_notification=1) at scene/main/node.cpp:171
#14 0x000000000191e3fa in Node::_notificationv (this=0x90debc0, p_notification=1, p_reversed=true) at ./scene/main/node.h:47
#15 0x0000000003a60c65 in Viewport::_notificationv (this=0x90debc0, p_notification=1, p_reversed=true) at scene/main/viewport.h:91
#16 0x0000000004ae0beb in Object::notification (this=0x90debc0, p_notification=1, p_reversed=true) at core/object.cpp:927
#17 0x0000000004addcb7 in Object::_predelete (this=0x90debc0) at core/object.cpp:387
#18 0x0000000004aeaeb3 in predelete_handler (p_object=0x90debc0) at core/object.cpp:2001
#19 0x0000000003a2d444 in memdelete<Viewport> (p_class=0x90debc0) at ./core/os/memory.h:110
#20 0x0000000003a1a13e in SceneTree::finish (this=0x8fc9f40) at scene/main/scene_tree.cpp:739
#21 0x000000000187919b in OS_X11::run (this=0x7fffffffd5b0) at platform/x11/os_x11.cpp:3940
#22 0x0000000001863b0b in main (argc=3, argv=0x7fffffffded8) at platform/x11/godot_x11.cpp:55

@Calinou
Copy link
Member

Calinou commented Jul 7, 2022

I'd say editor resource preview generation should probably not happen when --quit is used.

@MikeSchulze
Copy link

MikeSchulze commented Jul 25, 2022

i can confirm this bug, i try since days to workaround this bug.
I build a CI workflow and load submodule and needs to reload the project.

To solve my problem i build a simple script to enforce the editor to reload and quit.
addons/gdUnit3/scan_project.gd

run this line on mac or windows works fine
godot -e --path . -s res://addons/gdUnit3/scan_project.gd --no-window

but when execution on GitHub action it hangs
this bug forced me to use a timeout and ignore the error
https://github.com/MikeSchulze/gdUnit3/blob/master/.github/workflows/ci-pr.yml

- name: "Update Project"
        if: ${{ !cancelled() }}
        timeout-minutes: 1
        continue-on-error: true # we still ignore the timeout, the script is not quit and we run into a timeout
        run: |
          ${{ env.GODOT_BIN }} -e --path . -s res://addons/gdUnit3/scan_project.gd --no-window

Is there a better way to update the project file?

@MikeSchulze
Copy link

@Houkime i found a workaround to fix

func fix_cache_bug():
	for node in root.get_children():
		if node.name.begins_with("EditorNode"):
			for child in node.get_children():
				if child is EditorResourcePreview:
					var prewview := child as EditorResourcePreview
					prewview.check_for_invalidation("res://")
	yield(root.get_tree(), "idle_frame")

@Calinou Calinou changed the title godot -e -q hangs when project has fonts and cache is clean godot --editor --quit hangs when project has fonts and cache is clean Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants