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

TileMapEditor crashes sometimes when switching scene tabs #90827

Open
Rindbee opened this issue Apr 18, 2024 · 2 comments · May be fixed by #90849
Open

TileMapEditor crashes sometimes when switching scene tabs #90827

Rindbee opened this issue Apr 18, 2024 · 2 comments · May be fixed by #90849

Comments

@Rindbee
Copy link
Contributor

Rindbee commented Apr 18, 2024

Tested versions

v4.2.stable.official [46dc277] bad
v4.3.dev5.official [c9c17d6] bad
v4.3.dev.custom_build [3b18061] bad

System information

Linux Mint 21.3 (Virginia) - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1050 Ti (nvidia; 535.171.04) - Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz (4 Threads)

Issue description

When switching scene tabs, if TileMapEditor is open by default, the editor will crash when closing the scene tab or opening the scene again.

0.mp4
================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.dev.custom_build (3b1806182a3564736ad64793b203c2c13c251f56)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x784127842520] (??:0)
[2] RefCounted::reference() (/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/atomic_base.h:488)
[3] Ref<Texture2D>::ref(Ref<Texture2D> const&) (/opt/godot/godot/./core/object/ref_counted.h:71)
[4] Ref<Texture2D>::Ref(Ref<Texture2D> const&) (/opt/godot/godot/./core/object/ref_counted.h:167)
[5] TileSetAtlasSource::get_texture() const (/opt/godot/godot/scene/resources/2d/tile_set.cpp:4647)
[6] TileAtlasView::_draw_base_tiles() (/opt/godot/godot/editor/plugins/tiles/tile_atlas_view.cpp:173)
[7] void call_with_variant_args_helper<TileAtlasView>(TileAtlasView*, void (TileAtlasView::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/opt/godot/godot/./core/variant/binder_common.h:309)
[8] void call_with_variant_args<TileAtlasView>(TileAtlasView*, void (TileAtlasView::*)(), Variant const**, int, Callable::CallError&) (/opt/godot/godot/./core/variant/binder_common.h:419)
[9] CallableCustomMethodPointer<TileAtlasView>::call(Variant const**, int, Variant&, Callable::CallError&) const (/opt/godot/godot/./core/object/callable_method_pointer.h:104)
[10] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/opt/godot/godot/core/variant/callable.cpp:58)
[11] Object::emit_signalp(StringName const&, Variant const**, int) (/opt/godot/godot/core/object/object.cpp:1201)
[12] Node::emit_signalp(StringName const&, Variant const**, int) (/opt/godot/godot/scene/main/node.cpp:3901)
[13] Error Object::emit_signal<>(StringName const&) (/opt/godot/godot/./core/object/object.h:933)
[14] CanvasItem::_redraw_callback() (/opt/godot/godot/scene/main/canvas_item.cpp:143)
[15] void call_with_variant_args_helper<CanvasItem>(CanvasItem*, void (CanvasItem::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/opt/godot/godot/./core/variant/binder_common.h:309)
[16] void call_with_variant_args<CanvasItem>(CanvasItem*, void (CanvasItem::*)(), Variant const**, int, Callable::CallError&) (/opt/godot/godot/./core/variant/binder_common.h:419)
[17] CallableCustomMethodPointer<CanvasItem>::call(Variant const**, int, Variant&, Callable::CallError&) const (/opt/godot/godot/./core/object/callable_method_pointer.h:104)
[18] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/opt/godot/godot/core/variant/callable.cpp:58)
[19] CallQueue::_call_function(Callable const&, Variant const*, int, bool) (/opt/godot/godot/core/object/message_queue.cpp:222)
[20] CallQueue::flush() (/opt/godot/godot/core/object/message_queue.cpp:328)
[21] SceneTree::physics_process(double) (/opt/godot/godot/scene/main/scene_tree.cpp:493)
[22] Main::iteration() (/opt/godot/godot/main/main.cpp:3983)
[23] OS_LinuxBSD::run() (/opt/godot/godot/platform/linuxbsd/os_linuxbsd.cpp:962)
[24] godot-llvm-dev(main+0x18e) [0x5f7ac24658fe] (/opt/godot/godot/platform/linuxbsd/godot_linuxbsd.cpp:86)
[25] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x784127829d90] (??:0)
[26] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x784127829e40] (??:0)
[27] godot-llvm-dev(_start+0x25) [0x5f7ac24656a5] (??:?)
-- END OF BACKTRACE --
================================================================

Steps to reproduce

  1. Open MRP, open the scene and select TileMap/TileMapLayer, make sure TileMapEditor opens by default when switching scene tabs;
  2. Switch scenes;
  3. Possible crash when closing scene tab.
  4. If there is no crash, please repeat the above steps.

Minimal reproduction project (MRP)

tilemapeditorcrash.zip

@viksl
Copy link
Contributor

viksl commented Apr 18, 2024

I'd like to add that this might need more investigation. Editor crash now happens when you quickly switch tabs even in 3D without the tilemap editor open so there might be a bigger issue - unfortunately it seems it started with something in one of the 4.2.2 RC builds from what someone mentioned to me - at least on linux.

@AThousandShips
Copy link
Member

Looks like a deferred call issue or some delayed operation somewhere where data is invalid but referenced, will take a look at a potential fix

@AThousandShips AThousandShips linked a pull request Apr 18, 2024 that will close this issue
@AThousandShips AThousandShips added this to the 4.3 milestone Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants