Trying to edit scene crashes Godot after version 4 conversion

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By keidav

I have a scene that crashes Godot 4.0 after conversion from v3.5.1. All child scenes of this scene open without issue. Everything works correctly with the unconverted project under v3.5.1.

MacBook Air w/ 16GB RAM running MacOS 13.2.1

If you start Godot from a terminal window, do you get any relevant info there after the crash?

jgodfrey | 2023-03-08 22:37

Trying to, keep getting permission denied, I own the damn thing and it won’t run from zsh…

keidav | 2023-03-08 22:46

Godot Engine v4.0.stable.official.92bee43ad - https://godotengine.org
Vulkan API 1.2.231 - Forward+ - Using Vulkan Device #0: Apple - Apple M2

USER WARNING: Atlas source margins should be positive.
at: set_margins (scene/resources/tile_set.cpp:3812)
USER ERROR: Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
at: create_tile (scene/resources/tile_set.cpp:4113)
USER ERROR: The TileSetAtlasSource atlas has no tile at (0, 0).
at: get_tile_data (scene/resources/tile_set.cpp:4515)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.stable.official (92bee43adba8d2401ef40e2480e53087bcb1eaf1)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] 1 libsystem_platform.dylib 0x00000001aa36c2a4 _sigtramp + 56
[2] Object::_validate_property(PropertyInfo&) const
[3] Object::_validate_property(PropertyInfo&) const
[4] Object::_validate_property(PropertyInfo&) const
[5] ScriptInstanceExtension::_add_property_with_state(void const*, void const*, void*)
[6] PrimitiveMesh::get_uv2_padding() const
[7] ResourceLoaderText::_parse_sub_resource_dummys(void*, VariantParser::Stream*, Ref&, int&, String&)
[8] JSON::get_data() const
[9] JSON::get_data() const
[10] JSON::get_data() const
[11] PrimitiveMesh::get_uv2_padding() const
[12] ResourceLoaderText::_parse_sub_resource_dummys(void*, VariantParser::Stream*, Ref&, int&, String&)
[13] JSON::get_data() const
[14] JSON::get_data() const
[15] JSON::get_data() const
[16] SceneTree::get_root() const
[17] Object::_validate_property(PropertyInfo&) const
[18] Object::_validate_property(PropertyInfo&) const
[19] Object::_validate_property(PropertyInfo&) const
[20] VariantInitializer<Vector >::init(Variant*)
[21] Object* ClassDB::creator()
[22] Object::get_instance_id() const
[23] JSON::get_data() const
[24] Object::get_instance_id() const
[25] AspectRatioContainer::get_alignment_vertical() const
[26] AspectRatioContainer::get_alignment_vertical() const
[27] AspectRatioContainer::get_alignment_vertical() const
[28] AspectRatioContainer::get_alignment_vertical() const
[29] SceneTree::get_root() const
[30] SceneTree::get_root() const
[31] SceneTree::get_root() const
[32] SceneTree::get_root() const
[33] SceneTree::get_root() const
[34] Ref DirAccess::_create_builtin()
[35] JSON::get_data() const
[36] JSON::get_data() const
[37] Ref DirAccess::_create_builtin()
[38] 38 Godot 0x000000010308eb24 Godot + 4025124
[39] RendererCompositorRD::_create_current()
[40] 40 dyld 0x00000001aa013e50 start + 2544
– END OF BACKTRACE –

keidav | 2023-03-08 22:55

Ran from cmdline and this is all I got:

krdavis@keiths-air MacOS % ./Godot &
[1] 40017
krdavis@keiths-air MacOS % arguments
0: ./Godot
Current path: /Users/krdavis/Desktop/Godot.app/Contents/MacOS
Godot Engine v4.0.stable.official.92bee43ad - https://godotengine.org
OpenGL API 4.1 Metal - 83 - Compatibility - Using Device: Apple - Apple M2

Editing project: /Users/krdavis/Projects/Trolls-Godot 4

[1] + done ./Godot

keidav | 2023-03-08 23:24

I’m certainly no expert here, but I wonder about these messages:

USER WARNING: Atlas source margins should be positive.
at: setmargins (scene/resources/tileset.cpp:3812)
USER ERROR: Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
at: createtile (scene/resources/tileset.cpp:4113)
USER ERROR: The TileSetAtlasSource atlas has no tile at (0, 0).
at: gettiledata (scene/resources/tile_set.cpp:4515)

Is the offending scene tile related?

jgodfrey | 2023-03-08 23:35

I don’t know for sure, I have two resource files that are causing the crash. Found this on closer inspection. These resource files worked without issue under v3.5.1. Sounds like an issue with the conversion or v4.0 incompatibilities with v3 resource files.

keidav | 2023-03-08 23:42

It could be something that SHOULD HAVE been a problem (though, certainly not a crash) in 3.5.1 too, but slipped through.

Here’s a (potentially) related report from an earlier Godot 4 beta:

v4.0-beta3 editor crash with project upgrade from v3.4.4. · Issue #67556 · godotengine/godot · GitHub

jgodfrey | 2023-03-08 23:47

Probably the same issue, will there be a fix for this in an upcoming v4 update? BTW thanks for the help!

keidav | 2023-03-08 23:54

will there be a fix for this in an upcoming v4 update?

Yeah, I’d assume so, though I can’t speak to any specific time line. Looks like there are a number of project converter issues logged.

https://github.com/godotengine/godot/issues/73960

I’d guess many of them will get picked off fairly quickly.

BTW thanks for the help!

Sure. Thank you.

jgodfrey | 2023-03-09 00:03

:bust_in_silhouette: Reply From: aidave

If it’s Tilemap related, one option is to open the .TSCN files and carefully delete any TileMap/TileSet references by hand.

:bust_in_silhouette: Reply From: keidav

I fixed this by manually editing the *.tres files and fixed the offending tile definitions. The problem then went away. Thanks to jgodfrey for pointing me here: https://github.com/godotengine/godot/issues/67556