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

TileMapLayer selection features broken when using Editable Children in instanced scene #93790

Closed
Snowlith opened this issue Jun 30, 2024 · 1 comment · Fixed by #93974
Closed

Comments

@Snowlith
Copy link

Snowlith commented Jun 30, 2024

Tested versions

Reproducible in: 4.3 beta1, 4.3 beta2

System information

Windows 11 - Godot v4.3 beta1, 4.3 beta2 - Vulkan (Forward+)

Issue description

When creating instances of a scene consisting of Node2Ds with the new TileMapLayer nodes as children with "Editable children" checked, the "Highlight Selected Layer" feature does not work, and the "Select next layer" and "Select previous layer" buttons crash the editor.

Correct behavior, the currently selected layer is highlighted (The TileMapLayers under "Layer manager 2" are local instances):
Screenshot 2024-06-30 205018

Bug (The selected layer is not highlighted despite "Highlight Selected Layer" being checked, and the two buttons circled crash the editor)
Screenshot 2024-06-30 204737

Steps to reproduce

  • Create a 2D scene consisting of a Node2D with TileMapLayers as children
  • Add this scene to another scene, and enable "Editable children" on the instanced scene
  • Create a tileset and place tiles on the multiple TileMapLayers with "Highlight Selected Layer" checked (The tiles on the currently selected layer are not highlighted)
  • Press the "Select next layer" and "Selected previous layer" buttons (Godot crashes)

Minimal reproduction project (MRP)

This MRP is for Godot 4.3 beta2
beta2-tile-test.zip

@KoBeWi
Copy link
Member

KoBeWi commented Jun 30, 2024

Crash:

CrashHandlerException: Program crashed
Engine version: Godot Engine v4.3.beta.custom_build (222fa1c44de4de6bd81537a7b145db93d355f1c7)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[0] CowData<TileMapLayer *>::get (C:\godot_source\core\templates\cowdata.h:205)
[1] Vector<TileMapLayer *>::operator[] (C:\godot_source\core\templates\vector.h:97)
[2] TileMapLayerEditor::_layers_select_next_or_previous (C:\godot_source\editor\plugins\tiles\tile_map_layer_editor.cpp:4122)
[3] TileMapLayerEditor::_select_next_layer_pressed (C:\godot_source\editor\plugins\tiles\tile_map_layer_editor.cpp:3719)
[4] call_with_variant_args_helper<TileMapLayerEditor> (C:\godot_source\core\variant\binder_common.h:309)
[5] call_with_variant_args<TileMapLayerEditor> (C:\godot_source\core\variant\binder_common.h:419)
[6] CallableCustomMethodPointer<TileMapLayerEditor>::call (C:\godot_source\core\object\callable_method_pointer.h:104)
[7] Callable::callp (C:\godot_source\core\variant\callable.cpp:58)
[8] Object::emit_signalp (C:\godot_source\core\object\object.cpp:1188)
[9] Node::emit_signalp (C:\godot_source\scene\main\node.cpp:3890)
[10] Object::emit_signal<> (C:\godot_source\core\object\object.h:936)
[11] BaseButton::_pressed (C:\godot_source\scene\gui\base_button.cpp:138)
[12] BaseButton::on_action_event (C:\godot_source\scene\gui\base_button.cpp:176)
[13] BaseButton::gui_input (C:\godot_source\scene\gui\base_button.cpp:69)
[14] Control::_call_gui_input (C:\godot_source\scene\gui\control.cpp:1829)
[15] Viewport::_gui_call_input (C:\godot_source\scene\main\viewport.cpp:1570)
[16] Viewport::_gui_input_event (C:\godot_source\scene\main\viewport.cpp:1836)
[17] Viewport::push_input (C:\godot_source\scene\main\viewport.cpp:3259)
[18] Window::_window_input (C:\godot_source\scene\main\window.cpp:1692)
[19] call_with_variant_args_helper<Window,Ref<InputEvent> const &,0> (C:\godot_source\core\variant\binder_common.h:304)
[20] call_with_variant_args<Window,Ref<InputEvent> const &> (C:\godot_source\core\variant\binder_common.h:419)
[21] CallableCustomMethodPointer<Window,Ref<InputEvent> const &>::call (C:\godot_source\core\object\callable_method_pointer.h:104)
[22] Callable::callp (C:\godot_source\core\variant\callable.cpp:58)
[23] Callable::call<Ref<InputEvent> > (C:\godot_source\core\variant\variant.h:876)
[24] DisplayServerWindows::_dispatch_input_event (C:\godot_source\platform\windows\display_server_windows.cpp:3510)
[25] DisplayServerWindows::_dispatch_input_events (C:\godot_source\platform\windows\display_server_windows.cpp:3481)
[26] Input::_parse_input_event_impl (C:\godot_source\core\input\input.cpp:774)
[27] Input::flush_buffered_events (C:\godot_source\core\input\input.cpp:1053)
[28] DisplayServerWindows::process_events (C:\godot_source\platform\windows\display_server_windows.cpp:2978)
[29] OS_Windows::run (C:\godot_source\platform\windows\os_windows.cpp:1686)
[30] widechar_main (C:\godot_source\platform\windows\godot_windows.cpp:181)
[31] _main (C:\godot_source\platform\windows\godot_windows.cpp:206)
[32] main (C:\godot_source\platform\windows\godot_windows.cpp:220)
[33] WinMain (C:\godot_source\platform\windows\godot_windows.cpp:234)
[34] __scrt_common_main_seh (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[35] <couldn't map PC to fn name>
-- END OF BACKTRACE --

@akien-mga akien-mga added this to the 4.3 milestone Jul 1, 2024
@akien-mga akien-mga moved this from Unassessed to Release Blocker in 4.x Release Blockers Jul 1, 2024
@akien-mga akien-mga changed the title TIleMapLayer selection features broken when using Editable Children in instanced scene TileMapLayer selection features broken when using Editable Children in instanced scene Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Release Blocker
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants