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 crashes when trying creating an import file whose name would be longer than the filesystem would allow #24395

Open
Oranjoose opened this issue Dec 16, 2018 · 4 comments

Comments

@Oranjoose
Copy link

Godot 3.1 alpha 3
Windows 10 x64

Windows apparently won't allow file names to be longer than a set length. Godot automatically creates import files in the .import directory when an image is found in the project directory. If the file that would automatically be created would have a file name longer than Windows would allow, then Godot crashes.

Steps to reproduce:
In the project folder, add an image file. Change the file name to be as long as Windows will allow (put a bunch of dummy text in the file name until Windows forces no more characters from being added to the name). As soon as Windows accepts the new name, Godot crashes when trying to import the file.

@dreamsComeTrue
Copy link
Contributor

@KoBeWi
Copy link
Member

KoBeWi commented Jul 5, 2020

Still valid in 0287508

Here's backtrace:

CrashHandlerException: Program crashed
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[0] ResourceImporterTexture::_save_stex (x:\inne\godot\source\godot\editor\import\resource_importer_texture.cpp:304)
[1] ResourceImporterTexture::import (x:\inne\godot\source\godot\editor\import\resource_importer_texture.cpp:550)
[2] EditorFileSystem::_reimport_file (x:\inne\godot\source\godot\editor\editor_file_system.cpp:1728)
[3] EditorFileSystem::reimport_files (x:\inne\godot\source\godot\editor\editor_file_system.cpp:1917)
[4] EditorFileSystem::_update_scan_actions (x:\inne\godot\source\godot\editor\editor_file_system.cpp:560)
[5] EditorFileSystem::_notification (x:\inne\godot\source\godot\editor\editor_file_system.cpp:1122)
[6] EditorFileSystem::_notificationv (x:\inne\godot\source\godot\editor\editor_file_system.h:106)
[7] Object::notification (x:\inne\godot\source\godot\core\object.cpp:901)
[8] SceneTree::_notify_group_pause (x:\inne\godot\source\godot\scene\main\scene_tree.cpp:828)
[9] SceneTree::idle (x:\inne\godot\source\godot\scene\main\scene_tree.cpp:455)
[10] Main::iteration (x:\inne\godot\source\godot\main\main.cpp:2206)
[11] OS_Windows::run (x:\inne\godot\source\godot\platform\windows\os_windows.cpp:627)
[12] widechar_main (x:\inne\godot\source\godot\platform\windows\godot_windows.cpp:161)
[13] _main (x:\inne\godot\source\godot\platform\windows\godot_windows.cpp:183)
[14] main (x:\inne\godot\source\godot\platform\windows\godot_windows.cpp:195)
[15] __scrt_common_main_seh (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283)
[16] BaseThreadInitThunk
-- END OF BACKTRACE --

@fire fire changed the title Godot crashes when trying creating an import file whose name would be longer than the filesytem would allow Godot crashes when trying creating an import file whose name would be longer than the filesystem would allow Nov 16, 2020
@Calinou
Copy link
Member

Calinou commented Nov 28, 2020

Have you tried these Win10 workaround with long path names?

howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters

quora.com/What-is-the-maximum-character-limit-for-file-names-in-windows-10

Apparently, for this workaround to work, the application's manifest must allow it: https://www.tenforums.com/tutorials/51704-enable-disable-win32-long-paths-windows-10-a.html

I guess we need to carry out this change in Godot first, so that the tweak can work.

@SirLich
Copy link
Contributor

SirLich commented Nov 6, 2022

Update for Godot4, Beta4: The editor no longer crashes, but the file is simply not imported. There is no feedback to explain why the import failed. This happened organically for me, on a downloaded file with a long name. Reproducable by naming a file 'aaaaaa....aaaa.png` (max out the length).

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

7 participants