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

Various random crashes #253

Open
laurentsenta opened this issue Dec 3, 2024 · 4 comments
Open

Various random crashes #253

laurentsenta opened this issue Dec 3, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@laurentsenta
Copy link

laurentsenta commented Dec 3, 2024

Godot version

v4.3.stable.mono.official (77dcf97d82cbfe4e4615475fa52ca03da645dbd8)

LimboAI version

v1.2.2 [d3d3295]

LimboAI variant

GDExtension / AssetLib

Issue description

Hi there, thanks for maintaining the lib, lovely system and nice to use.

I'm seeing a lot of crashes, which always seem to happen around clicking or saving near LimboAI,
Using macOS.

This one happened when I clicked on the LimboAI tab after opening the project:

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.stable.mono.official (77dcf97d82cbfe4e4615475fa52ca03da645dbd8)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] invoke_previous_action(sigaction*, int, __siginfo*, void*, bool)
[2] 2   libsystem_platform.dylib            0x000000019c212584 _sigtramp + 56
[3] GLTFLight::from_dictionary(Dictionary)
[4] 4   liblimboai.macos.editor             0x000000010bf55774 limboai_init + 1505944
[5] 5   liblimboai.macos.editor             0x000000010bf1a60c limboai_init + 1263920
[6] ScriptInstanceExtension::_add_property_with_state(void const*, void const*, void*)
[7] Color::blend(Color const&) const
[8] 8   liblimboai.macos.editor             0x000000010bf23824 limboai_init + 1301320
[9] 9   liblimboai.macos.editor             0x000000010be41ef0 limboai_init + 377364
[10] 10  liblimboai.macos.editor             0x000000010be41bb0 limboai_init + 376532
[11] 11  liblimboai.macos.editor             0x000000010bdf2d10 limboai_init + 53300
[12] Object::get_property_list(List<PropertyInfo, DefaultAllocator>*, bool) const (in Godot) + 616
[13] Resource::hash_edited_version_for_preview() const (in Godot) + 148
[14] EditorResourcePreview::_iterate() (in Godot) + 692
[15] EditorResourcePreview::_thread() (in Godot) + 92
[16] Thread::callback(unsigned long long, Thread::Settings const&, void (*)(void*), void*) (in Godot) + 120
[17] Thread::~Thread()
[18] 18  libsystem_pthread.dylib             0x000000019c1e1f94 _pthread_start + 136
[19] 19  libsystem_pthread.dylib             0x000000019c1dcd34 thread_start + 8
-- END OF BACKTRACE --
================================================================
zsh: abort      /Applications/Godot_mono.app/Contents/MacOS/Godot --editor ./project.godot |
zsh: done       tee godot_logs

How to reproduce

No precise steps at the moment,
Is there a way to enable more logging and share more precise details?

@laurentsenta laurentsenta added the bug Something isn't working label Dec 3, 2024
@laurentsenta
Copy link
Author

I have seen this error after changing a BTAction code in vscode then clicking back on the LimboAI panel:

ERROR: Condition "!p_keep_state && has_instances" is true. Returning: ERR_ALREADY_IN_USE
   at: reload (modules/gdscript/gdscript.cpp:745)

@laurentsenta
Copy link
Author

laurentsenta commented Dec 3, 2024

Another case: editing a file in vscode, moving back to the limboAI editor, and saving:

Unloading assembly load context...
Assembly load context unloaded successfully.

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.stable.mono.official (77dcf97d82cbfe4e4615475fa52ca03da645dbd8)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] invoke_previous_action(sigaction*, int, __siginfo*, void*, bool)
[2] 2   libsystem_platform.dylib            0x000000019c212584 _sigtramp + 56
[3] GLTFLight::from_dictionary(Dictionary)
[4] 4   liblimboai.macos.editor             0x000000010d179774 limboai_init + 1505944
[5] 5   liblimboai.macos.editor             0x000000010d13e60c limboai_init + 1263920
[6] ScriptInstanceExtension::_add_property_with_state(void const*, void const*, void*)
[7] Color::blend(Color const&) const
[8] 8   liblimboai.macos.editor             0x000000010d147824 limboai_init + 1301320
[9] 9   liblimboai.macos.editor             0x000000010d065ef0 limboai_init + 377364
[10] 10  liblimboai.macos.editor             0x000000010d065bb0 limboai_init + 376532
[11] 11  liblimboai.macos.editor             0x000000010d016d10 limboai_init + 53300
[12] Object::get_property_list(List<PropertyInfo, DefaultAllocator>*, bool) const (in Godot) + 616
[13] ResourceFormatSaverTextInstance::_find_resources(Variant const&, bool) (in Godot) + 448
[14] ResourceFormatSaverTextInstance::_find_resources(Variant const&, bool) (in Godot) + 820
[15] ResourceFormatSaverTextInstance::_find_resources(Variant const&, bool) (in Godot) + 624
[16] ResourceFormatSaverTextInstance::_find_resources(Variant const&, bool) (in Godot) + 1184
[17] ResourceFormatSaverTextInstance::save(String const&, Ref<Resource> const&, unsigned int) (in Godot) + 408
[18] ResourceFormatSaverText::save(Ref<Resource> const&, String const&, unsigned int) (in Godot) + 260
[19] ResourceSaver::save(Ref<Resource> const&, String const&, unsigned int) (in Godot) + 624
[20] EditorNode::_save_scene(String, int) (in Godot) + 1344
[21] EditorNode::_save_scene_with_preview(String, int) (in Godot) + 3268
[22] EditorNode::_menu_option_confirm(int, bool) (in Godot) + 13884
[23] Object::emit_signalp(StringName const&, Variant const**, int) (in Godot) + 616
[24] PopupMenu::activate_item(int) (in Godot) + 452
[25] PopupMenu::activate_item_by_event(Ref<InputEvent> const&, bool) (in Godot) + 592
[26] MenuBar::shortcut_input(Ref<InputEvent> const&) (in Godot) + 328
[27] Node::_call_shortcut_input(Ref<InputEvent> const&) (in Godot) + 496
[28] SceneTree::_call_input_pause(StringName const&, SceneTree::CallInputType, Ref<InputEvent> const&, Viewport*) (in Godot) + 1188
[29] Viewport::_push_unhandled_input_internal(Ref<InputEvent> const&) (in Godot) + 168
[30] Viewport::push_input(Ref<InputEvent> const&, bool) (in Godot) + 824
[31] Window::_window_input(Ref<InputEvent> const&) (in Godot) + 756
[32] GridMapEditorPlugin::~GridMapEditorPlugin()
[33] DisplayServerMacOS::_dispatch_input_event(Ref<InputEvent> const&)
[34] DisplayServerMacOS::_dispatch_input_event(Ref<InputEvent> const&) (in Godot) + 572
[35] Input::_parse_input_event_impl(Ref<InputEvent> const&, bool) (in Godot) + 2828
[36] Input::flush_buffered_events() (in Godot) + 136
[37] DisplayServerMacOS::process_events() (in Godot) + 692
[38] OS_MacOS::run() (in Godot) + 156
[39] main (in Godot) + 392
[40] 40  dyld                                0x000000019be57154 start + 2476
-- END OF BACKTRACE --
================================================================
zsh: abort      /Applications/Godot_mono.app/Contents/MacOS/Godot --editor ./project.godot |
zsh: done       tee godot_logs

The stack traces look very similar, but happy to share more as they happen.

another (folded)
================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.stable.mono.official (77dcf97d82cbfe4e4615475fa52ca03da645dbd8)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] invoke_previous_action(sigaction*, int, __siginfo*, void*, bool)
[2] 2   libsystem_platform.dylib            0x000000019c212584 _sigtramp + 56
[3] GLTFLight::from_dictionary(Dictionary)
[4] 4   liblimboai.macos.editor             0x000000010fccd774 limboai_init + 1505944
[5] 5   liblimboai.macos.editor             0x000000010fc9260c limboai_init + 1263920
[6] ScriptInstanceExtension::_add_property_with_state(void const*, void const*, void*)
[7] Color::blend(Color const&) const
[8] 8   liblimboai.macos.editor             0x000000010fc9b824 limboai_init + 1301320
[9] 9   liblimboai.macos.editor             0x000000010fbb9ef0 limboai_init + 377364
[10] 10  liblimboai.macos.editor             0x000000010fbb9bb0 limboai_init + 376532
[11] 11  liblimboai.macos.editor             0x000000010fb6ad10 limboai_init + 53300
[12] Object::get_property_list(List<PropertyInfo, DefaultAllocator>*, bool) const (in Godot) + 616
[13] ResourceFormatSaverTextInstance::_find_resources(Variant const&, bool) (in Godot) + 448
[14] ResourceFormatSaverTextInstance::_find_resources(Variant const&, bool) (in Godot) + 820
[15] ResourceFormatSaverTextInstance::_find_resources(Variant const&, bool) (in Godot) + 624
[16] ResourceFormatSaverTextInstance::_find_resources(Variant const&, bool) (in Godot) + 1184
[17] ResourceFormatSaverTextInstance::save(String const&, Ref<Resource> const&, unsigned int) (in Godot) + 408
[18] ResourceFormatSaverText::save(Ref<Resource> const&, String const&, unsigned int) (in Godot) + 260
[19] ResourceSaver::save(Ref<Resource> const&, String const&, unsigned int) (in Godot) + 624
[20] EditorNode::_save_scene(String, int) (in Godot) + 1344
[21] EditorNode::_save_scene_with_preview(String, int) (in Godot) + 3268
[22] EditorNode::_menu_option_confirm(int, bool) (in Godot) + 13884
[23] Object::emit_signalp(StringName const&, Variant const**, int) (in Godot) + 616
[24] PopupMenu::activate_item(int) (in Godot) + 452
[25] PopupMenu::activate_item_by_event(Ref<InputEvent> const&, bool) (in Godot) + 592
[26] MenuBar::shortcut_input(Ref<InputEvent> const&) (in Godot) + 328
[27] Node::_call_shortcut_input(Ref<InputEvent> const&) (in Godot) + 496
[28] SceneTree::_call_input_pause(StringName const&, SceneTree::CallInputType, Ref<InputEvent> const&, Viewport*) (in Godot) + 1188
[29] Viewport::_push_unhandled_input_internal(Ref<InputEvent> const&) (in Godot) + 168
[30] Viewport::push_input(Ref<InputEvent> const&, bool) (in Godot) + 824
[31] Window::_window_input(Ref<InputEvent> const&) (in Godot) + 756
[32] GridMapEditorPlugin::~GridMapEditorPlugin()
[33] DisplayServerMacOS::_dispatch_input_event(Ref<InputEvent> const&)
[34] DisplayServerMacOS::_dispatch_input_event(Ref<InputEvent> const&) (in Godot) + 572
[35] Input::_parse_input_event_impl(Ref<InputEvent> const&, bool) (in Godot) + 2828
[36] Input::flush_buffered_events() (in Godot) + 136
[37] DisplayServerMacOS::process_events() (in Godot) + 692
[38] OS_MacOS::run() (in Godot) + 156
[39] main (in Godot) + 392
[40] 40  dyld                                0x000000019be57154 start + 2476
-- END OF BACKTRACE --
================================================================
zsh: abort      /Applications/Godot_mono.app/Contents/MacOS/Godot --editor ./project.godot |
zsh: done       tee godot_logs

@laurentsenta
Copy link
Author

laurentsenta commented Dec 3, 2024

I got the latest gdextension from https://github.com/limbonaut/limboai/actions/runs/12109251884
then built the repository (current master, 6644f191ca3dbd29a37ae009e6052ffce9a0acca)
with scons target=editor dev_build=yes and replaced the addons/limboai/bin folder with what was built.

The extension was working, I could run my project and work on it for a bit,
I eventually got another crash with more details:

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.stable.mono.official (77dcf97d82cbfe4e4615475fa52ca03da645dbd8)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] invoke_previous_action(sigaction*, int, __siginfo*, void*, bool)
[2] 2   libsystem_platform.dylib            0x000000019c212584 _sigtramp + 56
[3] GLTFLight::from_dictionary(Dictionary)
[4] unsigned long long godot::internal::_call_native_mb_ret<unsigned long long>(void const*, void*)
[5] godot::Object::get_instance_id() const
[6] godot::CallableCustomMethodPointerRetC<LimboState, godot::Ref<BlackboardPlan>>::get_object() const
[7] godot::custom_callable_mp_is_valid(void*)
[8] ScriptInstanceExtension::_add_property_with_state(void const*, void const*, void*)
[9] Color::blend(Color const&) const
[10] signed char godot::internal::_call_builtin_method_ptr_ret<signed char>(void (*)(void*, void const* const*, void*, int), void*)
[11] godot::Callable::is_valid() const
[12] BlackboardPlan::is_mapping_enabled() const
[13] BlackboardPlan::_get_property_list(godot::List<godot::PropertyInfo, godot::DefaultAllocator>*) const
[14] BlackboardPlan::get_property_list_bind(void*, unsigned int*)
[15] Object::get_property_list(List<PropertyInfo, DefaultAllocator>*, bool) const (in Godot) + 616
[16] ResourceFormatSaverTextInstance::_find_resources(Variant const&, bool) (in Godot) + 448
[17] ResourceFormatSaverTextInstance::_find_resources(Variant const&, bool) (in Godot) + 820
[18] ResourceFormatSaverTextInstance::_find_resources(Variant const&, bool) (in Godot) + 624
[19] ResourceFormatSaverTextInstance::_find_resources(Variant const&, bool) (in Godot) + 1184
[20] ResourceFormatSaverTextInstance::save(String const&, Ref<Resource> const&, unsigned int) (in Godot) + 408
[21] ResourceFormatSaverText::save(Ref<Resource> const&, String const&, unsigned int) (in Godot) + 260
[22] ResourceSaver::save(Ref<Resource> const&, String const&, unsigned int) (in Godot) + 624
[23] EditorNode::_save_scene(String, int) (in Godot) + 1344
[24] EditorNode::_save_scene_with_preview(String, int) (in Godot) + 3268
[25] EditorNode::_save_all_scenes() (in Godot) + 332
[26] EditorNode::try_autosave() (in Godot) + 308
[27] EditorRunBar::_run_scene(String const&) (in Godot) + 2216
[28] EditorRunBar::play_main_scene(bool) (in Godot) + 88
[29] CallableCustomBind::call(Variant const**, int, Variant&, Callable::CallError&) const (in Godot) + 376
[30] Object::emit_signalp(StringName const&, Variant const**, int) (in Godot) + 616
[31] BaseButton::_pressed() (in Godot) + 268
[32] BaseButton::on_action_event(Ref<InputEvent>) (in Godot) + 376
[33] BaseButton::gui_input(Ref<InputEvent> const&) (in Godot) + 312
[34] Control::_call_gui_input(Ref<InputEvent> const&) (in Godot) + 704
[35] Viewport::_gui_call_input(Control*, Ref<InputEvent> const&) (in Godot) + 448
[36] Viewport::_gui_input_event(Ref<InputEvent>) (in Godot) + 684
[37] Viewport::push_input(Ref<InputEvent> const&, bool) (in Godot) + 720
[38] Window::_window_input(Ref<InputEvent> const&) (in Godot) + 756
[39] GridMapEditorPlugin::~GridMapEditorPlugin()
[40] DisplayServerMacOS::_dispatch_input_event(Ref<InputEvent> const&)
[41] DisplayServerMacOS::_dispatch_input_event(Ref<InputEvent> const&) (in Godot) + 572
[42] Input::_parse_input_event_impl(Ref<InputEvent> const&, bool) (in Godot) + 2828
[43] Input::flush_buffered_events() (in Godot) + 136
[44] DisplayServerMacOS::process_events() (in Godot) + 692
[45] OS_MacOS::run() (in Godot) + 156
[46] main (in Godot) + 392
[47] 47  dyld                                0x000000019be57154 start + 2476
-- END OF BACKTRACE --
================================================================
zsh: abort      /Applications/Godot_mono.app/Contents/MacOS/Godot --editor ./project.godot |
zsh: done       tee godot_logs

@laurentsenta laurentsenta changed the title Various segfaults Various random crashes Dec 3, 2024
@limbonaut
Copy link
Owner

limbonaut commented Dec 4, 2024

Thanks for the stack trace. From what I can read, it happens on "Run Scene" command, while auto-saving the scenes, and saving some particular BlackboardPlan in the process. Somehow it crashes inside GLTFLight::from_dictionary() call. Hmm, it might be a pointer corruption, though. Do you store GLTFLight resource in a blackboard plan? If so, can you post a screenshot of the BlackboardPlan?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants