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

NavigationAgent3D causes crashes on unpausing the game in compatibility mode #100085

Closed
AldeonMoriak opened this issue Dec 6, 2024 · 5 comments · Fixed by #100105
Closed

NavigationAgent3D causes crashes on unpausing the game in compatibility mode #100085

AldeonMoriak opened this issue Dec 6, 2024 · 5 comments · Fixed by #100105

Comments

@AldeonMoriak
Copy link

AldeonMoriak commented Dec 6, 2024

Tested versions

  • Reproducible on: v4.4.dev6
  • Not reproducible on: v4.4.dev5

System information

Godot v4.4.dev6 - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Sat Nov 23 02:15:34 UTC 2024 on X11 - X11 display driver, Single-window, 1 monitor - OpenGL 3 (Compatibility) - GeForce GT 520M (nvidia; 390.157) - Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz (4 threads)

Issue description

If you pause and then unpause a scene that has a NavigationAgent3d in it, it will crash on unpausing the game.

This issue was not in v4.4.dev5 and was introduced in the latest dev build: v4.4.dev6.

Steps to reproduce

  • You must be in compatibility mode. It's the only option I've got on my laptop so I don't know if it can be reproduced in other modes.
  • Add a NavigationAgent3D to a 3d scene.
  • Make a script and pause the game tree on start. Alternatively just make a button to pause and unpause the tree scene.
  • unpause the scene tree
    and it crashes. At least on my system it crashed.

Minimal reproduction project (MRP)

Archive.zip

@AldeonMoriak AldeonMoriak changed the title NavigationAgent3D causes crashes on unpausing the game NavigationAgent3D causes crashes on unpausing the game in compatibility mode Dec 6, 2024
@SkanerSoft
Copy link

I went to start a problem, but it already exists. Confirm. Ubuntu 22.04

@SkanerSoft
Copy link

SkanerSoft commented Dec 6, 2024

Godot Engine v4.4.dev6.official.1f47e4c4e - https://godotengine.org
OpenGL API 4.6 (Core Profile) Mesa 23.3.6 - Compatibility - Using Device: AMD - AMD Radeon Graphics (radeonsi, renoir, LLVM 17.0.6, DRM 3.54, 6.6.47-generic-1rosa2021.1-x86_64)

ERROR: Caller thread can't call this function in this node (/root). Use call_deferred() or call_thread_group() instead.
   at: propagate_notification (scene/main/node.cpp:2505)
ERROR: Caller thread can't call this function in this node (/root). Use call_deferred() or call_thread_group() instead.
ERROR: Caller thread can't call this function in this node (/root). Use call_deferred() or call_thread_group() instead.

================================================================
   at: propagate_notification (scene/main/node.cpp:2505)
ERROR: Caller thread can't call this function in this node (/root). Use call_deferred() or call_thread_group() instead.
handle_crash: Program crashed with signal 11
ERROR: Caller thread can't call this function in this node (/root). Use call_deferred() or call_thread_group() instead.
ERROR: Caller thread can't call this function in this node (/root). Use call_deferred() or call_thread_group() instead.

================================================================
ERROR: Caller thread can't call this function in this node (/root). Use call_deferred() or call_thread_group() instead.
Engine version: Godot Engine v4.4.dev6.official (1f47e4c4e3a09a422e96880a7918d986dd575a63)
   at: propagate_notification (scene/main/node.cpp:2505)
   at: propagate_notification (scene/main/node.cpp:2505)

================================================================
   at: propagate_notification (scene/main/node.cpp:2505)

================================================================
handle_crash: Program crashed with signal 11
   at: propagate_notification (scene/main/node.cpp:2505)
handle_crash: Program crashed with signal 11
handle_crash: Program crashed with signal 11
ERROR: Caller thread can't call this function in this node (/root). Use call_deferred() or call_thread_group() instead.
   at: propagate_notification (scene/main/node.cpp:2505)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
Engine version: Godot Engine v4.4.dev6.official (1f47e4c4e3a09a422e96880a7918d986dd575a63)
Engine version: Godot Engine v4.4.dev6.official (1f47e4c4e3a09a422e96880a7918d986dd575a63)

================================================================
   at: propagate_notification (scene/main/node.cpp:2505)
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug to the project developer.

================================================================

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.4.dev6.official (1f47e4c4e3a09a422e96880a7918d986dd575a63)
Dumping the backtrace. Please include this when reporting the bug to the project developer.

================================================================
Engine version: Godot Engine v4.4.dev6.official (1f47e4c4e3a09a422e96880a7918d986dd575a63)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
Dumping the backtrace. Please include this when reporting the bug to the project developer.
handle_crash: Program crashed with signal 11
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.4.dev6.official (1f47e4c4e3a09a422e96880a7918d986dd575a63)
Engine version: Godot Engine v4.4.dev6.official (1f47e4c4e3a09a422e96880a7918d986dd575a63)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
Engine version: Godot Engine v4.4.dev6.official (1f47e4c4e3a09a422e96880a7918d986dd575a63)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib64/libc.so.6(+0x40050) [0x7fcd93c50050] (??:0)
[2] /home/petr/Apps/Godot/godot4-dev6() [0xec2957] (??:0)
[3] /home/petr/Apps/Godot/godot4-dev6() [0xecd452] (??:0)
[4] /home/petr/Apps/Godot/godot4-dev6() [0xecd484] (??:0)
[5] /home/petr/Apps/Godot/godot4-dev6() [0x43e739d] (??:0)
[6] /home/petr/Apps/Godot/godot4-dev6() [0x43e7b6a] (??:0)
[7] /home/petr/Apps/Godot/godot4-dev6() [0x3f01ebd] (??:0)
[8] /home/petr/Apps/Godot/godot4-dev6() [0x4bc42b3] (??:0)
[9] /lib64/libpthread.so.0(+0x8e3a) [0x7fcd93f5ce3a] (??:0)
[10] /lib64/libc.so.6(clone+0x3f) [0x7fcd93d2373f] (??:0)
-- END OF BACKTRACE --
================================================================

This happens when I write get_tree().paused = false

@akien-mga
Copy link
Member

Crash trace from the MRP:

ERROR: Caller thread can't call this function in this node (/root). Use call_deferred() or call_thread_group() instead.
   at: propagate_notification (./scene/main/node.cpp:2505)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.4.dev.custom_build (eb5103093c1bfd4d527ec1255d28e9bc8d3625b5)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib64/libc.so.6(+0x19dd0) [0x7f7e574f7dd0] (??:0)
[2] RVO2D::KdTree2D::queryAgentTreeRecursive(RVO2D::Agent2D*, float&, unsigned long) const (/home/akien/Godot/godot/thirdparty/rvo2/rvo2_2d/KdTree2d.cpp:257 (discriminator 1))
[3] RVO2D::KdTree2D::computeAgentNeighbors(RVO2D::Agent2D*, float&) const (/home/akien/Godot/godot/thirdparty/rvo2/rvo2_2d/KdTree2d.cpp:239)
[4] RVO2D::Agent2D::computeNeighbors(RVO2D::RVOSimulator2D*) (/home/akien/Godot/godot/thirdparty/rvo2/rvo2_2d/Agent2d.cpp:53)
[5] NavMap::compute_single_avoidance_step_2d(unsigned int, NavAgent**) (/home/akien/Godot/godot/./modules/navigation/nav_map.cpp:771)
[6] WorkerThreadPool::GroupUserData<NavMap, void (NavMap::*)(unsigned int, NavAgent**), NavAgent**>::callback_indexed(unsigned int) (/home/akien/Godot/godot/./core/object/worker_thread_pool.h:209)
[7] WorkerThreadPool::_process_task(WorkerThreadPool::Task*) (/home/akien/Godot/godot/./core/object/worker_thread_pool.cpp:101)
[8] WorkerThreadPool::_thread_function(void*) (/home/akien/Godot/godot/./core/object/worker_thread_pool.cpp:207)
[9] Thread::callback(unsigned long, Thread::Settings const&, void (*)(void*), void*) (/home/akien/Godot/godot/./core/os/thread.cpp:66)
[10] void std::__invoke_impl<void, void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*>(std::__invoke_other, void (*&&)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long&&, Thread::Settings&&, void (*&&)(void*), void*&&) (/usr/include/c++/14/bits/invoke.h:61)
[11] std::__invoke_result<void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*>::type std::__invoke<void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*>(void (*&&)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long&&, Thread::Settings&&, void (*&&)(void*), void*&&) (/usr/include/c++/14/bits/invoke.h:97)
[12] void std::thread::_Invoker<std::tuple<void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*> >::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul>) (/usr/include/c++/14/bits/std_thread.h:301)
[13] std::thread::_Invoker<std::tuple<void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*> >::operator()() (/usr/include/c++/14/bits/std_thread.h:308)
[14] std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*> > >::_M_run() (/usr/include/c++/14/bits/std_thread.h:253)
[15] /home/akien/Godot/godot/bin/godot.linuxbsd.editor.dev.x86_64() [0xbc9bd74] (msdf-error-correction.cpp:?)
[16] /lib64/libc.so.6(+0x70cd7) [0x7f7e5754ecd7] (??:0)
[17] /lib64/libc.so.6(+0xf4c8c) [0x7f7e575d2c8c] (??:0)
-- END OF BACKTRACE --
================================================================

@smix8
Copy link
Contributor

smix8 commented Dec 6, 2024

Reg from #99646

@timoschwarzer
Copy link
Contributor

I noticed this bug can also be triggered by pausing the game in the "Game" tab in the editor.

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