Typing into the file's search field prints "Cannot get class 'TextFile'." errors.
Tested versions
v4.3.beta1.official [a4f2ea91a] (don't remember seeing it in 4.2.1)
System information
Godot v4.3.beta1 - macOS 14.5.0 - Vulkan (Forward+) - integrated Apple M1 - Apple M1 (8 Threads)
Issue description
When I try to use the filter field of the FileSystem panel, the first letter I enter after the field is given focus prints out an error:
Steps to reproduce
Click somewhere in the Godot editor. Now click on the FileSystem filter field. Start typing. The error will be printed to the console.
Minimal reproduction project (MRP)
Any Godot project.
Could be related to:
- https://github.com/godotengine/godot/issues/85698
Will see what I can find later today
I can't reproduce it at a normal project with Godot v4.3.beta (2b11d0ca9) - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.5168) - 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (16 Threads)
I suspect it could be related to certain files and import settings. It would be great if you can upload a MRP that has this issue.
I can only reproduce this in my current project, not a fresh project. I'm not sure what's causing it but here's some behavior I documented:
- One error appears for each individual character entered into filter (with matching results).
- Must have
res://or any folder underres://selected; having 'Favorites' selected won't bring up results, even if you have matching favorite'd files. - The error only appears when there is a matching result after the first character.
- Having
res://selected on its own can also produce the error (select 'Favorites', thenres://to produce a single new error, note that you must have text in the filter for this to happen).
Again I don't know how to reproduce this in a new project, so I can't provide an MRP at the moment.
Copying all files from my project to a fresh project, I can reproduce it. So it has something do with the files which come up as matching results, and it has nothing to do with the project.godot file. May still be related to an Editor setting.
Figured it out.
How to recreate:
- Click dropdown on
FileSystemtab, and select 'Move to Bottom'. - Create a new text file (either inside or outside of Godot editor)
- Type the name of the text file into the
FileSystemfilter tab
MRP (it's just an empty project with a text file; you'll need to move the FileSystem in-editor) textfile-error.zip
I tried to reproduce the error but nothing happens:
https://github.com/user-attachments/assets/e72fa786-c5e7-4f16-89f8-071579c8ccee
Godot v4.3.beta1 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 580 2048SP (Advanced Micro Devices, Inc.; 31.0.21916.2) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)
Can anyone reproduce this?
The same thing is happening to me: new-game-project.zip
Godot v4.3.stable (77dcf97d8) - Windows 10.0.19045 - Vulkan (Forward+) - integrated Intel(R) HD Graphics 630 (Intel Corporation; 31.0.101.2111) - Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz (4 Threads)
It still occurs on Godot v4.4.dev6.mono.official [1f47e4c4e]
Steps to reproduce. Press right mouse button on a .cfg file type in the file system inspector
Following the step provided by Mike i was able to reproduce the issue, but for some reason i was unable to reproduce it in the same version as the author, in my case the regression started after the 4.4 dev 3 and was bisected to pr #65585. I'll not ping the pr author yet because my case can be a different issue.
I tested with 4 text formats (txt, xml, cfg and json) and only the json file didn't triggered the error. Also, i was able to stop the error registering the TextFile class in the scene\register_scene_types.cpp, not sure if is a valid fix as this issue didn't happened before but at least can give a idea of what's wrong.
@AThousandShips Should i open a separated issue because the engine version difference or it's fine keep it here?
A new issue sounds good!
Based on the fix, I determined the conditions required to trigger the bug:
- File list has to be visible (i.e. file dock's split view)
- You need to use a non-default editor feature profile