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

Crash when opening tileset physics layer #93962

Closed
jrapf32 opened this issue Jul 5, 2024 · 3 comments · Fixed by #93971
Closed

Crash when opening tileset physics layer #93962

jrapf32 opened this issue Jul 5, 2024 · 3 comments · Fixed by #93971

Comments

@jrapf32
Copy link

jrapf32 commented Jul 5, 2024

Tested versions

Godot Engine v4.3.beta.custom_build.20ba2f00b

System information

Godot v4.3.beta (20ba2f0) - macOS 14.5.0 - Vulkan (Forward+) - integrated Apple M1 - Apple M1 (8 Threads)

Issue description

When I open the tileset physics layer it crashes:

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.beta.custom_build (20ba2f00bd9199b675176a8e1ac151f96bfb5cfa)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] 1   libsystem_platform.dylib            0x00000001817db584 _sigtramp + 56
[2] TileSetAtlasSource::get_tile_data(Vector2i, int) const (in godot.macos.editor.arm64) + 60
[3] TileSetAtlasSource::get_tile_data(Vector2i, int) const (in godot.macos.editor.arm64) + 60
[4] GenericTilePolygonEditor::_base_control_draw() (in godot.macos.editor.arm64) + 416
[5] Object::emit_signalp(StringName const&, Variant const**, int) (in godot.macos.editor.arm64) + 644
[6] CanvasItem::_redraw_callback() (in godot.macos.editor.arm64) + 152
[7] CallQueue::_call_function(Callable const&, Variant const*, int, bool) (in godot.macos.editor.arm64) + 336
[8] CallQueue::flush() (in godot.macos.editor.arm64) + 352
[9] SceneTree::process(double) (in godot.macos.editor.arm64) + 208
[10] Main::iteration() (in godot.macos.editor.arm64) + 1012
[11] OS_MacOS::run() (in godot.macos.editor.arm64) + 148
[12] main (in godot.macos.editor.arm64) + 392
[13] 13  dyld                                0x00000001814220e0 start + 2360
-- END OF BACKTRACE --
================================================================

Steps to reproduce

Create a TileMapLayer node. Then create a tileset. Then create a physics layer. Finally go to tileset>paint>physics layer 0 and it crashes.

Minimal reproduction project (MRP)

MRP.zip

@qarmin
Copy link
Contributor

qarmin commented Jul 5, 2024

editor/plugins/tiles/tile_data_editors.cpp:142:62: runtime error: member call on null pointer of type 'struct TileSetAtlasSource'
editor/plugins/tiles/tile_data_editors.cpp:142:62: runtime error: member access within null pointer of type 'struct TileSetAtlasSource'

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.beta.custom_build (6a13fdcae3662975c101213d47a1eb3a7db63cb3)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] ../../godot.linuxbsd.editor.dev.x86_64.san(+0x42a256a1) [0x5710be6e36a1] (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/linuxbsd/crash_handler_linuxbsd.cpp:61)
[2] /lib/x86_64-linux-gnu/libc.so.6(+0x45320) [0x7149c0245320] (??:0)
[3] GenericTilePolygonEditor::_base_control_draw() (/home/runner/work/GodotBuilds/GodotBuilds/godot/editor/plugins/tiles/tile_data_editors.cpp:142)
[4] void call_with_variant_args_helper<GenericTilePolygonEditor>(GenericTilePolygonEditor*, void (GenericTilePolygonEditor::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/home/runner/work/GodotBuilds/GodotBuilds/godot/./core/variant/binder_common.h:309 (discriminator 4))
[5] void call_with_variant_args<GenericTilePolygonEditor>(GenericTilePolygonEditor*, void (GenericTilePolygonEditor::*)(), Variant const**, int, Callable::CallError&) (/home/runner/work/GodotBuilds/GodotBuilds/godot/./core/variant/binder_common.h:404)
[6] CallableCustomMethodPointer<GenericTilePolygonEditor>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/runner/work/GodotBuilds/GodotBuilds/godot/./core/object/callable_method_pointer.h:101)
[7] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/runner/work/GodotBuilds/GodotBuilds/godot/core/variant/callable.cpp:57)
[8] Object::emit_signalp(StringName const&, Variant const**, int) (/home/runner/work/GodotBuilds/GodotBuilds/godot/core/object/object.cpp:1188)
[9] Node::emit_signalp(StringName const&, Variant const**, int) (/home/runner/work/GodotBuilds/GodotBuilds/godot/scene/main/node.cpp:3889)
[10] Error Object::emit_signal<>(StringName const&) (/home/runner/work/GodotBuilds/GodotBuilds/godot/./core/object/object.h:936)
[11] CanvasItem::_redraw_callback() (/home/runner/work/GodotBuilds/GodotBuilds/godot/scene/main/canvas_item.cpp:145)
[12] void call_with_variant_args_helper<CanvasItem>(CanvasItem*, void (CanvasItem::*)(), Variant const**, Callable::CallError&, IndexSequence<>) (/home/runner/work/GodotBuilds/GodotBuilds/godot/./core/variant/binder_common.h:309 (discriminator 4))
[13] void call_with_variant_args<CanvasItem>(CanvasItem*, void (CanvasItem::*)(), Variant const**, int, Callable::CallError&) (/home/runner/work/GodotBuilds/GodotBuilds/godot/./core/variant/binder_common.h:404)
[14] CallableCustomMethodPointer<CanvasItem>::call(Variant const**, int, Variant&, Callable::CallError&) const (/home/runner/work/GodotBuilds/GodotBuilds/godot/./core/object/callable_method_pointer.h:101)
[15] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/home/runner/work/GodotBuilds/GodotBuilds/godot/core/variant/callable.cpp:57)
[16] CallQueue::_call_function(Callable const&, Variant const*, int, bool) (/home/runner/work/GodotBuilds/GodotBuilds/godot/core/object/message_queue.cpp:221)
[17] CallQueue::flush() (/home/runner/work/GodotBuilds/GodotBuilds/godot/core/object/message_queue.cpp:270)
[18] SceneTree::physics_process(double) (/home/runner/work/GodotBuilds/GodotBuilds/godot/scene/main/scene_tree.cpp:494)
[19] Main::iteration() (/home/runner/work/GodotBuilds/GodotBuilds/godot/main/main.cpp:4057)
[20] OS_LinuxBSD::run() (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/linuxbsd/os_linuxbsd.cpp:962)
[21] ../../godot.linuxbsd.editor.dev.x86_64.san(main+0x4c7) [0x5710be6e3040] (/home/runner/work/GodotBuilds/GodotBuilds/godot/platform/linuxbsd/godot_linuxbsd.cpp:85)
[22] /lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca) [0x7149c022a1ca] (??:0)
[23] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b) [0x7149c022a28b] (??:0)
[24] ../../godot.linuxbsd.editor.dev.x86_64.san(_start+0x25) [0x5710be6e2ab5] (??:?)
-- END OF BACKTRACE --
================================================================

@KoBeWi
Copy link
Member

KoBeWi commented Jul 5, 2024

Regression from #93047

@akien-mga
Copy link
Member

It doesn't seem to validate that background_atlas_source is valid before de-referencing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Release Blocker
Development

Successfully merging a pull request may close this issue.

6 participants