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

EditorFileSystem::_update_scan_actions() and _test_for_reimport() frequently crashing editor #47866

Open
smix8 opened this issue Apr 13, 2021 · 1 comment

Comments

@smix8
Copy link
Contributor

smix8 commented Apr 13, 2021

Godot version:
Godot 4.x
commit b4b7c97

OS/device including version:
Win 10 64x

Issue description:

EditorFileSystem::_update_scan_actions()
At: editor\editor_file_system.cpp:554

followed by

EditorFileSystem::_test_for_reimport()
At:editor\editor_file_system.cpp:414

... crashes the editor at random but very frequently on small operations like moving a file in the filesystemdock or importing a new asset.

Crash seems to be completely unrelated to the asset as the same asset works 4 times and crashes on the 5th reimport. Happens to meshes, animations, textures, every imported resource type. No additional error is logged or printed. The project remains unopenable afterwards as it crashes immediatly on reaching the editor screen.

The last asset before the crash seems to be properly moved/imported opening the systemfolder from outside but the only way to fix the project opening is to manual delete the last added file or reverting the change in file or folder location from outside the editor (or clear the entire project cache and reimport everything).

Steps to reproduce:
Move files in filesystemdock or import assets and wait for crash.

Minimal reproduction project:

@lyuma
Copy link
Contributor

lyuma commented Apr 14, 2021

EditorProgress is extremely sus.

I commented out the Main::iteration which causes re-entrant code execution via Main and it seems to reduce the crashes.

See issue #46893

Not sure if it's related, but I just ran into this crash, when clicking the Advanced... button on a model: It's a little different than the above issue:

ERROR: FATAL: Index p_index = 1 is out of bounds (size() = 1).
   at: CowData<struct Viewport::SubWindow>::get (S:\repo\godot-pr-pr\core/templates/cowdata.h:157)
CrashHandlerException: Program crashed
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[0] CowData<Viewport::SubWindow>::get (S:\repo\godot-pr-pr\core\templates\cowdata.h:157)
[1] Vector<Viewport::SubWindow>::operator[] (S:\repo\godot-pr-pr\core\templates\vector.h:89)
[2] Viewport::_sub_window_grab_focus (S:\repo\godot-pr-pr\scene\main\viewport.cpp:354)
[3] Viewport::_sub_window_register (S:\repo\godot-pr-pr\scene\main\viewport.cpp:242)
[4] Window::set_visible (S:\repo\godot-pr-pr\scene\main\window.cpp:390)
[5] Window::popup (S:\repo\godot-pr-pr\scene\main\window.cpp:1071)
[6] Window::popup_centered (S:\repo\godot-pr-pr\scene\main\window.cpp:1019)
[7] ProgressDialog::_popup (S:\repo\godot-pr-pr\editor\progress_dialog.cpp:150)
[8] ProgressDialog::add_task (S:\repo\godot-pr-pr\editor\progress_dialog.cpp:182)
[9] EditorNode::progress_add_task (S:\repo\godot-pr-pr\editor\editor_node.cpp:3977)
[10] EditorProgress::EditorProgress (S:\repo\godot-pr-pr\editor\editor_node.h:891)
[11] EditorFileSystem::reimport_files (S:\repo\godot-pr-pr\editor\editor_file_system.cpp:1940)
[12] EditorFileSystem::_update_scan_actions (S:\repo\godot-pr-pr\editor\editor_file_system.cpp:582)
[13] EditorFileSystem::_notification (S:\repo\godot-pr-pr\editor\editor_file_system.cpp:1124)
[14] EditorFileSystem::_notificationv (S:\repo\godot-pr-pr\editor\editor_file_system.h:108)
[15] Object::notification (S:\repo\godot-pr-pr\core\object\object.cpp:795)
[16] SceneTree::_notify_group_pause (S:\repo\godot-pr-pr\scene\main\scene_tree.cpp:811)
[17] SceneTree::process (S:\repo\godot-pr-pr\scene\main\scene_tree.cpp:443)
[18] Main::iteration (S:\repo\godot-pr-pr\main\main.cpp:2499)
[19] OS_Windows::run (S:\repo\godot-pr-pr\platform\windows\os_windows.cpp:622)
[20] widechar_main (S:\repo\godot-pr-pr\platform\windows\godot_windows.cpp:163)
[21] _main (S:\repo\godot-pr-pr\platform\windows\godot_windows.cpp:185)
[22] main (S:\repo\godot-pr-pr\platform\windows\godot_windows.cpp:199)
[23] __scrt_common_main_seh (D:\agent\_work\9\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[24] BaseThreadInitThunk
-- END OF BACKTRACE --

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

3 participants