Open SeanRamey opened 1 year ago
The crash happens here:
https://github.com/godotengine/godot/blob/6758a7f8c07d1f4c8ec4f052ded6d26402967ebe/scene/resources/tile_set.cpp#L5213-L5217
Seems the method is called on a nullpointer during the execution of _compatibility_conversion
.
Could you provide the original project as well?
Anti-malfunction-wont-convert.zip
These are the project files before conversion. I used the Full Conversion option when attempting to convert.
The crash results from the region used for your tileset. (The one that is internally stored in main menu.tscn
). There the texture region is larger than the texture. Due to the rewrite of the tileset system this crashes in godot 4, because no tile data can exist outside the texture in the new implementation. The large region does not seem to fullfill any purpose and looks like an accident to me, so you should be able to startup godot after setting the region to the texture size. (You will still need to do some work to fixup your tilemap e.g. the tilesize will default back to 16 in Godot 4. But this is beyond the scope of this issue.)
Not sure whether we need actual code changes here. Maybe tile sources could crop their region to the texture size on conversion. This would still break the tileset but would atleast prevent a crash which seems like a better user experience. But the case seems very rare so it might not be worth the extra code.
Godot version
4.1.1
System information
Godot v4.1.1.stable unknown - EndeavourOS #1 SMP PREEMPT_DYNAMIC Wed, 19 Jul 2023 19:19:38 +0000 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 1070 (nvidia; 535.86.05) - Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz (6 Threads)
Issue description
After automatically converting my project to godot 4.1.1, it crashes upon trying to open the project. It seems something specific with this project, but I don't know what.
This is what the terminal spits out when I try to open it:
Steps to reproduce
The included project files have already been converted, so just open it up in godot 4.1.1 and watch it crash.
Minimal reproduction project
Total-mal.zip