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

Broken imports result in endless reimports making the editor unusable #62271

Closed
Ansraer opened this issue Jun 21, 2022 · 5 comments · Fixed by #94357
Closed

Broken imports result in endless reimports making the editor unusable #62271

Ansraer opened this issue Jun 21, 2022 · 5 comments · Fixed by #94357

Comments

@Ansraer
Copy link
Contributor

Ansraer commented Jun 21, 2022

Godot version

4.0 alpha 10

System information

Windows 10, amd 6900xt, vulkan clustered

Issue description

Having broken gltf files in your project folder causes the editor to get stuck in an endless re-import loop, causing everything to freeze up.
In the end, I had to kill the editor with the task manager and remove the gltf files from the project folder with the windows file explorer while Godot wasn't running to fix this problem.

Steps to reproduce

I encountered this by trying to import animation libraries from a bunch of split gltf models (each had SomeFile.gltf + data.bin) in the same folder. All the bin files overwrote each other, and all but one of the gltf files thus became broken.

Minimal reproduction project

Can't share my assets, but if necessary it should be possible to reproduce this with any other split gltf files.

@KoBeWi
Copy link
Member

KoBeWi commented Jun 21, 2022

Might be related to #54817 (there is a PR that fixes it)

@A-Lamia
Copy link
Contributor

A-Lamia commented Jun 27, 2022

I'm having an issue that is sort of the same with textures, if a texture is broken every time you leave the godot window or come back it will keep failing to import and if you add any new textures it will fail to import and ignore the new file, you can't even select the new file and manually import it's just broken, it hard locks the import function making it unusable.

The only way to resolve the issue is to delete the broken texture.

@Ansraer Ansraer changed the title Broken models result in endless reimports making the editor unusable Broken imports result in endless reimports making the editor unusable Jun 27, 2022
@clayjohn
Copy link
Member

Can anyone who encountered this issue still reproduce it? The issue linked by KoBeWi was fixed recently by #68324

@MarkoSFG
Copy link

I'm getting a freeze / infinite loop when I do reimport on a glb model file with an animation in it set to "save to file" the animation which is already inside an animation library (that is referenced by an animation player in open scene).

I'm not 100% sure exactly about the specifics of the data setup but in the code if you look at animation_tree.cpp _setup_animation_player() you'll see that it's possible for set_root_node, remove_animation_library and add_animation_library to emit the signals "caches_cleared" and "animation_list_changed" which both are set to call _setup_animation_player() again within that very method;

if (!player->is_connected(SNAME("caches_cleared"), callable_mp(this, &AnimationTree::_setup_animation_player))) {
	player->connect(SNAME("caches_cleared"), callable_mp(this, &AnimationTree::_setup_animation_player), CONNECT_DEFERRED);
}
if (!player->is_connected(SNAME("animation_list_changed"), callable_mp(this, &AnimationTree::_setup_animation_player))) {
	player->connect(SNAME("animation_list_changed"), callable_mp(this, &AnimationTree::_setup_animation_player), CONNECT_DEFERRED);
}

In my Godot fork; I passed in a bool (false) to those 3 functions and made them not emit a signal (by default set to true) which seemed to resolve the infinite loop issue; though I am not sure if that's the best fix - there may be an easier fix to prevent the infinite loop being fired off by the message_queue.cpp CallQueue::flush() method.

@Flavelius
Copy link
Contributor

in 4.3beta, i have a related issue, the editor doesn't become unusable, but it tries to repeatedly import the file it errored out on before (an fbx model in my case). This happens on every focus/unfocus of the editor, min-/maximizing, window resizes (even for popup windows, like editor/project settings), and filesystem changes.
I think it might be related, because in my expectation, the editor should not try to reimport a file it failed on previously until something about it changed (size or timestamps), but since it seems to do so currently, my guess is, there might be a link to it constantly trying to reimport (maybe a dependency).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants