Right click a text file in the filesystem makes the engine throw the error Cannot get class 'TextFile'
#101447
Labels
Milestone
Cannot get class 'TextFile'
#101447
Tested versions
Reproducible in: v4.4.dev3.official [f4af820] and higher
Not reproducible in: v4.4.dev2.official [97ef3c8] and lower
System information
Godot v4.4.dev (abf8e1e) - Windows 10 (build 19045) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated AMD Radeon RX 580 2048SP (Advanced Micro Devices, Inc.; 31.0.21921.1000) - AMD Ryzen 5 3600 6-Core Processor (12 threads)
Issue description
When you right click a text file in the filesystem the error
Cannot get class 'TextFile'
is raised by the editor. A similar issue exists (#93248) but i was unable to reproduce in the version mentioned by the issue author, for me only happens in 4.4 dev 3 and after.I bisected and git pointed pr #65585 as the culprit:
I tested 4 text formats (txt, cfg, xml and json) and for some reason json don't raise the error.
unknown_2025.01.11-18.10_1.mp4
As you can see in the video above, if you open any text file in the editor the error stops being raised until you restart the editor. I also was able to stop the error registering the
TextFile
class in thescene\register_scene_types.cpp
but was not sure if that was the correct fix.CC @SaracenOne
Steps to reproduce
Right click a text file in the filesystem (json format doesn't work to reproduce this issue).
Minimal reproduction project (MRP)
Not necessary, any project with a txt file can reproduce.
The text was updated successfully, but these errors were encountered: