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

"Entering a window while a window is hovered should never happen in DisplayServer." warning introduced recently #93085

Closed
akien-mga opened this issue Jun 12, 2024 · 6 comments · Fixed by #93100

Comments

@akien-mga
Copy link
Member

akien-mga commented Jun 12, 2024

Tested versions

  • Reproducible in 4.3.beta (2fb296a)
  • Not reproducible in 4.3.beta1 (a4f2ea9)

System information

Fedora Linux 40 (KDE Plasma) - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 7600M XT (RADV NAVI33) - AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16 Threads)

Issue description

Related to #86582 where it was reported by @capnm, copying their comment:


Current tip Linux x11 backtrace:

(lldb) b ./scene/main/window.cpp:743
Breakpoint 1: where = godot-mcdev`Window::_event_callback(DisplayServer::WindowEvent) + 83 at window.cpp:743:5, address = 0x00000000056990d3
(lldb) r
Process 99702 launched: '/home/mc/bin/godot-mcdev' (x86_64)
Process 99702 stopped and restarted: thread 1 received signal: SIGCHLD

Godot Engine v4.3 ... 2fb296a
Vulkan 1.3.230 - Forward+ ...

Process 99702 stopped


* thread #1, name = 'godot-mcdev', stop reason = breakpoint 1.1
    frame #0: 0x000055555abed0d3 godot-mcdev`Window::_event_callback(this=0x00005555607734e0, p_event=WINDOW_EVENT_MOUSE_ENTER) at window.cpp:743:5
   740 				Window *root = get_tree()->get_root();
   741 				if (root->gui.windowmanager_window_over) {
   742 	#ifdef DEV_ENABLED
-> 743 					WARN_PRINT_ONCE("Entering a window while a window is hovered should never happen in DisplayServer.");
   744 	#endif // DEV_ENABLED
   745 					root->gui.windowmanager_window_over->_event_callback(DisplayServer::WINDOW_EVENT_MOUSE_EXIT);
   746 				}
(lldb) bt all
* thread #1, name = 'godot-mcdev', stop reason = breakpoint 1.1
  * frame #0: 0x000055555abed0d3 godot-mcdev`Window::_event_callback(this=0x00005555607734e0, p_event=WINDOW_EVENT_MOUSE_ENTER) at window.cpp:743:5
    frame #1: 0x0000555558d475c3 godot-mcdev`DisplayServerX11::_send_window_event(DisplayServerX11::WindowData const&, DisplayServer::WindowEvent) [inlined] Variant Callable::call<Variant>(this=0x000055555d538c58, p_args=Variant @ 0x00007fffffffd4d8) const at variant.h:875:2
    frame #2: 0x0000555558d4756a godot-mcdev`DisplayServerX11::_send_window_event(this=<unavailable>, wd=0x000055555d538bf8, p_event=WINDOW_EVENT_MOUSE_ENTER) at display_server_x11.cpp:4074:21
    frame #3: 0x0000555558d5c5e7 godot-mcdev`DisplayServerX11::process_events(this=0x000055555dd2db20) at display_server_x11.cpp:4656:6
    frame #4: 0x0000555558d35aec godot-mcdev`OS_LinuxBSD::run(this=0x00007fffffffd8d0) at os_linuxbsd.cpp:958:35
    frame #5: 0x0000555558d2c4ae godot-mcdev`main(argc=<unavailable>, argv=<unavailable>) at godot_linuxbsd.cpp:85:6
    frame #6: 0x00007ffff7d1424a libc.so.6`__libc_start_call_main(main=(godot-mcdev`main at godot_linuxbsd.cpp:56), argc=1, argv=0x00007fffffffdef8) at libc_start_call_main.h:58:16
    frame #7: 0x00007ffff7d14305 libc.so.6`__libc_start_main_impl(main=(godot-mcdev`main at godot_linuxbsd.cpp:56), argc=1, argv=0x00007fffffffdef8, init=<unavailable>, fini=<unavailable>, rtld_fini=<unavailable>, stack_end=0x00007fffffffdee8) at libc-start.c:360:3
    frame #8: 0x0000555558d2c321 godot-mcdev`_start + 33


thread #2, name = 'godot-mcdev'
    frame #0: 0x00007ffff7d72e96 libc.so.6`__futex_abstimed_wait_common [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=<unavailable>, abstime=0x0000000000000000, op=393, expected=0, futex_word=0x000055555d758768) at futex-internal.c:57:12
    frame #1: 0x00007ffff7d72e58 libc.so.6`__futex_abstimed_wait_common(futex_word=0x000055555d758768, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:87:9
    frame #2: 0x00007ffff7d75558 libc.so.6`___pthread_cond_wait [inlined] __pthread_cond_wait_common(abstime=0x0000000000000000, clockid=0, mutex=0x000055555d758718, cond=0x000055555d758740) at pthread_cond_wait.c:503:10
    frame #3: 0x00007ffff7d75480 libc.so.6`___pthread_cond_wait(cond=0x000055555d758740, mutex=0x000055555d758718) at pthread_cond_wait.c:618:10
    frame #4: 0x000055555c8ea285 godot-mcdev`_IP_ResolverPrivate::_thread_function(void*) [inlined] Semaphore::wait(this=0x000055555d758718) const at semaphore.h:79:14
    frame #5: 0x000055555c8ea243 godot-mcdev`_IP_ResolverPrivate::_thread_function(self=0x000055555d7566f0) at ip.cpp:113:13
    frame #6: 0x000055555c7834d2 godot-mcdev`Thread::callback(p_caller_id=<unavailable>, p_settings=<unavailable>, p_callback=(godot-mcdev`_IP_ResolverPrivate::_thread_function(void*) [inlined] std::__atomic_base<bool>::load(std::memory_order) const at ip.cpp:109
godot-mcdev`_IP_ResolverPrivate::_thread_function(void*) [inlined] std::atomic<bool>::load(std::memory_order) const at atomic:112:22
godot-mcdev`_IP_ResolverPrivate::_thread_function(void*) [inlined] SafeFlag::is_set() const at safe_refcount.h:161:15
godot-mcdev`_IP_ResolverPrivate::_thread_function(void*) at ip.cpp:112:29), p_userdata=0x000055555d7566f0) at thread.cpp:64:3
    frame #7: 0x000055555d0982a3 godot-mcdev`execute_native_thread_routine + 19
    frame #8: 0x00007ffff7d76134 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:442:8
    frame #9: 0x00007ffff7df67dc libc.so.6`__clone3 at clone3.S:81


thread #3, name = 'godot-mcdev'
    frame #0: 0x00007ffff7d72e96 libc.so.6`__futex_abstimed_wait_common [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=<unavailable>, abstime=0x0000000000000000, op=393, expected=0, futex_word=0x000055555d822078) at futex-internal.c:57:12
    frame #1: 0x00007ffff7d72e58 libc.so.6`__futex_abstimed_wait_common(futex_word=0x000055555d822078, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:87:9
    frame #2: 0x00007ffff7d75558 libc.so.6`___pthread_cond_wait [inlined] __pthread_cond_wait_common(abstime=0x0000000000000000, clockid=0, mutex=0x000055555d77bf10, cond=0x000055555d822050) at pthread_cond_wait.c:503:10
    frame #3: 0x00007ffff7d75480 libc.so.6`___pthread_cond_wait(cond=0x000055555d822050, mutex=0x000055555d77bf10) at pthread_cond_wait.c:618:10
    frame #4: 0x000055555cd60d3a godot-mcdev`WorkerThreadPool::_thread_function(void*) [inlined] void ConditionVariable::wait<MutexImpl<std::mutex>>(this=0x000055555d822050, p_lock=0x00007ffff63ffa98) const at condition_variable.h:59:13
    frame #5: 0x000055555cd60d2f godot-mcdev`WorkerThreadPool::_thread_function(p_user=0x000055555d822020) at worker_thread_pool.cpp:190:27
    frame #6: 0x000055555c7834d2 godot-mcdev`Thread::callback(p_caller_id=<unavailable>, p_settings=<unavailable>, p_callback=(godot-mcdev`WorkerThreadPool::_thread_function(void*) at worker_thread_pool.cpp:175), p_userdata=0x000055555d822020) at thread.cpp:64:3
    frame #7: 0x000055555d0982a3 godot-mcdev`execute_native_thread_routine + 19
    frame #8: 0x00007ffff7d76134 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:442:8
    frame #9: 0x00007ffff7df67dc libc.so.6`__clone3 at clone3.S:81

thread #4, name = 'godot-mcdev'
    frame #0: 0x00007ffff7d72e96 libc.so.6`__futex_abstimed_wait_common [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=<unavailable>, abstime=0x0000000000000000, op=393, expected=0, futex_word=0x000055555d8220d8) at futex-internal.c:57:12
    frame #1: 0x00007ffff7d72e58 libc.so.6`__futex_abstimed_wait_common(futex_word=0x000055555d8220d8, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:87:9
    frame #2: 0x00007ffff7d75558 libc.so.6`___pthread_cond_wait [inlined] __pthread_cond_wait_common(abstime=0x0000000000000000, clockid=0, mutex=0x000055555d77bf10, cond=0x000055555d8220b0) at pthread_cond_wait.c:503:10
    frame #3: 0x00007ffff7d75480 libc.so.6`___pthread_cond_wait(cond=0x000055555d8220b0, mutex=0x000055555d77bf10) at pthread_cond_wait.c:618:10
    frame #4: 0x000055555cd60d3a godot-mcdev`WorkerThreadPool::_thread_function(void*) [inlined] void ConditionVariable::wait<MutexImpl<std::mutex>>(this=0x000055555d8220b0, p_lock=0x00007ffff59ffa98) const at condition_variable.h:59:13
    frame #5: 0x000055555cd60d2f godot-mcdev`WorkerThreadPool::_thread_function(p_user=0x000055555d822080) at worker_thread_pool.cpp:190:27
    frame #6: 0x000055555c7834d2 godot-mcdev`Thread::callback(p_caller_id=<unavailable>, p_settings=<unavailable>, p_callback=(godot-mcdev`WorkerThreadPool::_thread_function(void*) at worker_thread_pool.cpp:175), p_userdata=0x000055555d822080) at thread.cpp:64:3
    frame #7: 0x000055555d0982a3 godot-mcdev`execute_native_thread_routine + 19
    frame #8: 0x00007ffff7d76134 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:442:8
    frame #9: 0x00007ffff7df67dc libc.so.6`__clone3 at clone3.S:81


thread #5, name = 'godot-mcdev'
    frame #0: 0x00007ffff7dbc485 libc.so.6`__GI___clock_nanosleep(clock_id=0, flags=0, req=0x00007ffff4fff960, rem=0x00007ffff4fff970) at clock_nanosleep.c:48:7
    frame #1: 0x00007ffff7dc0d93 libc.so.6`__GI___nanosleep(req=0x00007ffff4fff960, rem=0x00007ffff4fff970) at nanosleep.c:25:13
    frame #2: 0x0000555559ac28aa godot-mcdev`OS_Unix::delay_usec(this=<unavailable>, p_usec=<unavailable>) const at os_unix.cpp:289:9
    frame #3: 0x0000555558d3b556 godot-mcdev`JoypadLinux::monitor_joypads(this=0x000055555dd1bca0, p_udev=0x00007ffff0000b70) at joypad_linux.cpp:228:24
    frame #4: 0x0000555558d3b0c3 godot-mcdev`JoypadLinux::monitor_joypads_thread_run(this=0x000055555dd1bca0) at joypad_linux.cpp:149:4
    frame #5: 0x0000555558d3ae39 godot-mcdev`JoypadLinux::monitor_joypads_thread_func(p_user=<unavailable>) at joypad_linux.cpp:133:6 [artificial]
    frame #6: 0x000055555c7834d2 godot-mcdev`Thread::callback(p_caller_id=<unavailable>, p_settings=<unavailable>, p_callback=(godot-mcdev`JoypadLinux::monitor_joypads_thread_func(void*) at joypad_linux.cpp:133:6), p_userdata=0x000055555dd1bca0) at thread.cpp:64:3
    frame #7: 0x000055555d0982a3 godot-mcdev`execute_native_thread_routine + 19
    frame #8: 0x00007ffff7d76134 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:442:8
    frame #9: 0x00007ffff7df67dc libc.so.6`__clone3 at clone3.S:81


thread #6, name = 'godot-mcdev'
    frame #0: 0x00007ffff7dbc485 libc.so.6`__GI___clock_nanosleep(clock_id=0, flags=0, req=0x00007fffefdffa30, rem=0x00007fffefdffa40) at clock_nanosleep.c:48:7
    frame #1: 0x00007ffff7dc0d93 libc.so.6`__GI___nanosleep(req=0x00007fffefdffa30, rem=0x00007fffefdffa40) at nanosleep.c:25:13
    frame #2: 0x0000555559ac28aa godot-mcdev`OS_Unix::delay_usec(this=<unavailable>, p_usec=<unavailable>) const at os_unix.cpp:289:9
    frame #3: 0x0000555558d3cac1 godot-mcdev`JoypadLinux::joypad_events_thread_run(this=0x000055555dd1bca0) at joypad_linux.cpp:511:25
    frame #4: 0x0000555558d3ae49 godot-mcdev`JoypadLinux::joypad_events_thread_func(p_user=<unavailable>) at joypad_linux.cpp:482:6 [artificial]
    frame #5: 0x000055555c7834d2 godot-mcdev`Thread::callback(p_caller_id=<unavailable>, p_settings=<unavailable>, p_callback=(godot-mcdev`JoypadLinux::joypad_events_thread_func(void*) at joypad_linux.cpp:482:6), p_userdata=0x000055555dd1bca0) at thread.cpp:64:3
    frame #6: 0x000055555d0982a3 godot-mcdev`execute_native_thread_routine + 19
    frame #7: 0x00007ffff7d76134 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:442:8
    frame #8: 0x00007ffff7df67dc libc.so.6`__clone3 at clone3.S:81


thread #7, name = 'godot-m:disk$0'
    frame #0: 0x00007ffff7d72e96 libc.so.6`__futex_abstimed_wait_common [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=<unavailable>, abstime=0x0000000000000000, op=393, expected=0, futex_word=0x000055555dc974f8) at futex-internal.c:57:12
    frame #1: 0x00007ffff7d72e58 libc.so.6`__futex_abstimed_wait_common(futex_word=0x000055555dc974f8, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:87:9
    frame #2: 0x00007ffff7d75558 libc.so.6`___pthread_cond_wait [inlined] __pthread_cond_wait_common(abstime=0x0000000000000000, clockid=0, mutex=0x000055555dc974a8, cond=0x000055555dc974d0) at pthread_cond_wait.c:503:10
    frame #3: 0x00007ffff7d75480 libc.so.6`___pthread_cond_wait(cond=0x000055555dc974d0, mutex=0x000055555dc974a8) at pthread_cond_wait.c:618:10
    frame #4: 0x00007fffed7ed909 libvulkan_radeon.so`___lldb_unnamed_symbol7850 + 9
    frame #5: 0x00007fffed7c059b libvulkan_radeon.so`___lldb_unnamed_symbol7131 + 139
    frame #6: 0x00007fffed7ed847 libvulkan_radeon.so`___lldb_unnamed_symbol7843 + 23
    frame #7: 0x00007ffff7d76134 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:442:8
    frame #8: 0x00007ffff7df67dc libc.so.6`__clone3 at clone3.S:81


thread #8, name = 'godot-mcdev'
    frame #0: 0x00007ffff7deb8dc libc.so.6`__GI___select(nfds=7, readfds=0x00007fffe0fffa20, writefds=0x0000000000000000, exceptfds=0x0000000000000000, timeout=0x00007fffe0fffa10) at select.c:69:11
    frame #1: 0x0000555558d4895c godot-mcdev`DisplayServerX11::_wait_for_events(this=0x000055555dd2db20) const at display_server_x11.cpp:4114:22
    frame #2: 0x0000555558d58d08 godot-mcdev`DisplayServerX11::_poll_events_thread(void*) [inlined] DisplayServerX11::_poll_events(this=0x000055555dd2db20) at display_server_x11.cpp:4130:3
    frame #3: 0x0000555558d58cd0 godot-mcdev`DisplayServerX11::_poll_events_thread(ud=0x000055555dd2db20) at display_server_x11.cpp:4092:18
    frame #4: 0x000055555c7834d2 godot-mcdev`Thread::callback(p_caller_id=<unavailable>, p_settings=<unavailable>, p_callback=(godot-mcdev`DisplayServerX11::_poll_events_thread(void*) [inlined] std::__atomic_base<bool>::load(std::memory_order) const at display_server_x11.cpp:4090
godot-mcdev`DisplayServerX11::_poll_events_thread(void*) [inlined] std::atomic<bool>::load(std::memory_order) const at atomic:112:22
godot-mcdev`DisplayServerX11::_poll_events_thread(void*) [inlined] SafeFlag::is_set() const at safe_refcount.h:161:15
godot-mcdev`DisplayServerX11::_poll_events_thread(void*) [inlined] DisplayServerX11::_poll_events() at display_server_x11.cpp:4129:29
godot-mcdev`DisplayServerX11::_poll_events_thread(void*) at display_server_x11.cpp:4092:18), p_userdata=0x000055555dd2db20) at thread.cpp:64:3
    frame #5: 0x000055555d0982a3 godot-mcdev`execute_native_thread_routine + 19
    frame #6: 0x00007ffff7d76134 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:442:8
    frame #7: 0x00007ffff7df67dc libc.so.6`__clone3 at clone3.S:81


thread #9, name = 'godot-mcdev'
    frame #0: 0x00007ffff7dbc485 libc.so.6`__GI___clock_nanosleep(clock_id=0, flags=0, req=0x00007fffdbdff920, rem=0x00007fffdbdff930) at clock_nanosleep.c:48:7
    frame #1: 0x00007ffff7dc0d93 libc.so.6`__GI___nanosleep(req=0x00007fffdbdff920, rem=0x00007fffdbdff930) at nanosleep.c:25:13
    frame #2: 0x0000555559ac28aa godot-mcdev`OS_Unix::delay_usec(this=<unavailable>, p_usec=<unavailable>) const at os_unix.cpp:289:9
    frame #3: 0x0000555558d4076d godot-mcdev`FreeDesktopPortalDesktop::_thread_monitor(p_ud=0x000055555dc75a90) at freedesktop_portal_desktop.cpp:594:24
    frame #4: 0x000055555c7834d2 godot-mcdev`Thread::callback(p_caller_id=<unavailable>, p_settings=<unavailable>, p_callback=(godot-mcdev`FreeDesktopPortalDesktop::_thread_monitor(void*) [inlined] std::__atomic_base<bool>::load(std::memory_order) const at freedesktop_portal_desktop.cpp:527
godot-mcdev`FreeDesktopPortalDesktop::_thread_monitor(void*) [inlined] std::atomic<bool>::load(std::memory_order) const at atomic:112:22
godot-mcdev`FreeDesktopPortalDesktop::_thread_monitor(void*) [inlined] SafeFlag::is_set() const at safe_refcount.h:161:15
godot-mcdev`FreeDesktopPortalDesktop::_thread_monitor(void*) at freedesktop_portal_desktop.cpp:530:39), p_userdata=0x000055555dc75a90) at thread.cpp:64:3
    frame #5: 0x000055555d0982a3 godot-mcdev`execute_native_thread_routine + 19
    frame #6: 0x00007ffff7d76134 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:442:8
    frame #7: 0x00007ffff7df67dc libc.so.6`__clone3 at clone3.S:81


thread #10, name = 'godot-mcdev'
    frame #0: 0x00007ffff7dbc485 libc.so.6`__GI___clock_nanosleep(clock_id=0, flags=0, req=0x00007fffd93ff9f0, rem=0x00007fffd93ffa00) at clock_nanosleep.c:48:7
    frame #1: 0x00007ffff7dc0d93 libc.so.6`__GI___nanosleep(req=0x00007fffd93ff9f0, rem=0x00007fffd93ffa00) at nanosleep.c:25:13
    frame #2: 0x0000555559ac28aa godot-mcdev`OS_Unix::delay_usec(this=<unavailable>, p_usec=<unavailable>) const at os_unix.cpp:289:9
    frame #3: 0x0000555559af2f84 godot-mcdev`AudioDriverPulseAudio::thread_func(p_udata=0x00007fffffffdb80) at audio_driver_pulseaudio.cpp:584:25
    frame #4: 0x000055555c7834d2 godot-mcdev`Thread::callback(p_caller_id=<unavailable>, p_settings=<unavailable>, p_callback=(godot-mcdev`AudioDriverPulseAudio::thread_func(void*) at audio_driver_pulseaudio.cpp:394), p_userdata=0x00007fffffffdb80) at thread.cpp:64:3
    frame #5: 0x000055555d0982a3 godot-mcdev`execute_native_thread_routine + 19
    frame #6: 0x00007ffff7d76134 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:442:8
    frame #7: 0x00007ffff7df67dc libc.so.6`__clone3 at clone3.S:81


thread #11, name = 'WSI swapchain q'
    frame #0: 0x00007ffff7d72e96 libc.so.6`__futex_abstimed_wait_common [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=<unavailable>, abstime=0x00007fffcbdffac0, op=137, expected=0, futex_word=0x000055555ef0c324) at futex-internal.c:57:12
    frame #1: 0x00007ffff7d72e58 libc.so.6`__futex_abstimed_wait_common(futex_word=0x000055555ef0c324, expected=0, clockid=<unavailable>, abstime=0x00007fffcbdffac0, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:87:9
    frame #2: 0x00007ffff7d7583c libc.so.6`___pthread_cond_timedwait64 [inlined] __pthread_cond_wait_common(abstime=0x00007fffcbdffac0, clockid=1, mutex=0x000055555ef0c2d0, cond=0x000055555ef0c2f8) at pthread_cond_wait.c:503:10
    frame #3: 0x00007ffff7d75760 libc.so.6`___pthread_cond_timedwait64(cond=0x000055555ef0c2f8, mutex=0x000055555ef0c2d0, abstime=0x00007fffcbdffac0) at pthread_cond_wait.c:643:10
    frame #4: 0x00007fffed758d15 libvulkan_radeon.so`___lldb_unnamed_symbol5786 + 245
    frame #5: 0x00007ffff7d76134 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:442:8
    frame #6: 0x00007ffff7df67dc libc.so.6`__clone3 at clone3.S:81
  thread #12, name = 'godot-mcdev'
    frame #0: 0x00007ffff7d72e96 libc.so.6`__futex_abstimed_wait_common [inlined] __futex_abstimed_wait_common64(private=<unavailable>, cancel=<unavailable>, abstime=0x0000000000000000, op=393, expected=0, futex_word=0x000055556054fc74) at futex-internal.c:57:12
    frame #1: 0x00007ffff7d72e58 libc.so.6`__futex_abstimed_wait_common(futex_word=0x000055556054fc74, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:87:9
    frame #2: 0x00007ffff7d75558 libc.so.6`___pthread_cond_wait [inlined] __pthread_cond_wait_common(abstime=0x0000000000000000, clockid=0, mutex=0x000055556054fc20, cond=0x000055556054fc48) at pthread_cond_wait.c:503:10
    frame #3: 0x00007ffff7d75480 libc.so.6`___pthread_cond_wait(cond=0x000055556054fc48, mutex=0x000055556054fc20) at pthread_cond_wait.c:618:10
    frame #4: 0x00005555598f179b godot-mcdev`tvg::TaskQueue::pop(this=0x000055556054fc10, task=0x00007fffd89ffab8) at tvgTaskScheduler.cpp:84:19
    frame #5: 0x00005555598f1697 godot-mcdev`tvg::TaskSchedulerImpl::run(this=0x000055556054fba0, i=0) at tvgTaskScheduler.cpp:152:45
    frame #6: 0x000055555d0982a3 godot-mcdev`execute_native_thread_routine + 19
    frame #7: 0x00007ffff7d76134 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:442:8
    frame #8: 0x00007ffff7df67dc libc.so.6`__clone3 at clone3.S:81


(lldb) c
Process 99702 resuming
WARNING: Entering a window while a window is hovered should never happen in DisplayServer.
     at: _event_callback (./scene/main/window.cpp:743)

I can reproduce it too, now bisecting.

Steps to reproduce

  • Open any project (at least on Linux)

Minimal reproduction project (MRP)

n/a

@akien-mga
Copy link
Member Author

I've been struggling to bisect this, I bisected twice between 4.3-beta1 and master and landed on different, completely unrelated commits.

$ git bisect log
git bisect start
# status: waiting for both good and bad commits
# bad: [2fb296a5cd83bfa7a234cfcaae78a63da3556fb8] Merge pull request #93074 from bruvzg/bmp_imp_adv
git bisect bad 2fb296a5cd83bfa7a234cfcaae78a63da3556fb8
# status: waiting for good commit(s), bad commit known
# good: [a4f2ea91a1bd18f70a43ff4c1377db49b56bc3f0] Merge pull request #92571 from akien-mga/fbx2gltf-rename-path-setting-back
git bisect good a4f2ea91a1bd18f70a43ff4c1377db49b56bc3f0
# good: [ea7d988b72587c265726ccfdabd56b4083c4d2fc] Merge pull request #92781 from bruvzg/menu_open_close_imp
git bisect good ea7d988b72587c265726ccfdabd56b4083c4d2fc
# good: [4ac7a27e4333ef8a814103441fe2428ac70265e9] Merge pull request #92905 from DeeJayLSP/qoa-ups
git bisect good 4ac7a27e4333ef8a814103441fe2428ac70265e9
# bad: [41381a73fe3a5fc338416aac80f28c51ada269d6] Merge pull request #92930 from passivestar/inspector-node-delete
git bisect bad 41381a73fe3a5fc338416aac80f28c51ada269d6
# bad: [1a8c6e85ba09b0d6e13c2cb6a5e518af5662dddb] Merge pull request #93023 from akien-mga/revert-92650
git bisect bad 1a8c6e85ba09b0d6e13c2cb6a5e518af5662dddb
# bad: [4223444d87e125534c72d09c4f45ed490b0c5e5e] Merge pull request #92993 from capnm/240610-embree-error-hotfix
git bisect bad 4223444d87e125534c72d09c4f45ed490b0c5e5e
# bad: [78a96c26a9904f0b9ffb5d5f5338ca8736f87073] Merge pull request #92988 from adamscott/max-webgl-version
git bisect bad 78a96c26a9904f0b9ffb5d5f5338ca8736f87073
# good: [d3c1eb009e0002096d4f2f6c4fb5b2436da00020] Merge pull request #92908 from bruvzg/fix_main_window_initial_mouseover
git bisect good d3c1eb009e0002096d4f2f6c4fb5b2436da00020
# good: [5a01c2e954851605659d6e0104a51190bbfa4e4c] Replace deprecated `USE_WEBGL2` linker flag
git bisect good 5a01c2e954851605659d6e0104a51190bbfa4e4c
# first bad commit: [78a96c26a9904f0b9ffb5d5f5338ca8736f87073] Merge pull request #92988 from adamscott/max-webgl-version

I must have made a mistake twice... the error doesn't seem to be 100% reproducible every time.

But #92908 added an _event_callback call in Window so it's a very likely candidate, CC @bruvzg.

@akien-mga
Copy link
Member Author

Right I re-ran the last steps and confirmed that #92908 is also bad and thus this is the first bad commit:

768fd1eacba427f08b0896aa641c27846b9eb185 is the first bad commit
commit 768fd1eacba427f08b0896aa641c27846b9eb185 (HEAD)
Author: bruvzg <7645683+bruvzg@users.noreply.github.com>
Date:   Sat Jun 8 19:08:10 2024 +0300

    [Window] Fix mouse hover state of the main window when mouse enter event was sent before setting callbacks.

 scene/main/window.cpp | 4 ++++
 1 file changed, 4 insertions(+)

It's reproducible simply by opening the project manager and checking the console output.

So far I've assumed it's Linux specific, but worth confirming by testing Windows and macOS.

@capnm
Copy link
Contributor

capnm commented Jun 12, 2024

You're right, on closer look at my older ThorVG PR backup I realize
it wasn't there...

@bruvzg
Copy link
Member

bruvzg commented Jun 12, 2024

Probably X11 event is sent late, it should not be an issue. I'm not sure what's the best way to handle it and why this message is there in the first place. If the same window get enter event twice, it probably should be silently ignored without sending notification.

@capnm
Copy link
Contributor

capnm commented Jun 12, 2024

I don't have the macOS issue that it fixes #91589 in Linux OS x11, then maybe the change should be made macOS specific.

The test was made by 2f8673d

@AeioMuch
Copy link
Contributor

So far I've assumed it's Linux specific, but worth confirming by testing Windows and macOS.

This warning is happening on Windows as well.

@akien-mga akien-mga changed the title "Entering a window while a window is hovered should never happen in DisplayServer." warning on Linux introduced recently "Entering a window while a window is hovered should never happen in DisplayServer." warning introduced recently Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Immediate Blocker
Development

Successfully merging a pull request may close this issue.

4 participants