Skip to content

Will not shut down when SDL is chosen as handler, must kill from task manager. #17227

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

Open
castle024 opened this issue May 20, 2025 · 1 comment
Labels

Comments

@castle024
Copy link

Quick summary

Using 0.0.36-17952-cb4fd176 Alpha master, and option to exit RPCS3 when process finishes is enabled. When using sdl controller (8bitdo Ultimate 2) RPCS3 will not fully shutdown. This happens whether it is closed via the game window or using the Home Menu. It will appear to close, but when attempting to reopen, it will give the "another instance of RPCS 3 is running" error and needs to be terminated from Windows task manager in order to relaunch. If the handler is changed to x-input (same controller), the problem goes away, and everything closes as it should.

Details

No response

Attach a log file

RPCS3.log

Attach capture files for visual issues

No response

System configuration

ASUS ROG Strix Z790-E Gaming WIFI
Intel Core i7 13700k
RTX 4070 TI Super (Driver Version 32.0.15.7652 - nVIDIA ForceWare 576.52)
32 GB DDR5 (Corsair Vengeance)

Other details

No response

@Kethen
Copy link
Contributor

Kethen commented May 20, 2025

Adding more information, this can be observed on Linux as well when:

  • "Enable Pad Navigation" is enabled
  • Game and emulator is closed in quick succession
    • Closing the main window while a game is running
      or
    • Closing the game with "Exit RPCS3 when process finishes" enabled

This likely has to do with trying to use qt signal to run callbacks on qt application main thread after the qt application was instructed to quit.

·! 0:01:27.826821 {Gui Pad Thread} GUI: gui_pad_thread: Pad thread started
·! 0:01:27.826992 {Gui Pad Thread} GUI: gui_pad_thread: Using input configuration: 'Default'
·! 0:01:27.827020 {Gui Pad Thread} Input: Loading pad config (title_id='', config_file='Default', strict=0)
·! 0:01:27.827154 {Gui Pad Thread} Input: Loading input configuration: 'E:/LaunchBox/Emulators/rpcs3-v0.0.17/config/input_configs/global/Default.yml'
·! 0:01:27.829250 {Gui Pad Thread} Input: Loading pad config (title_id='', config_file='Default', strict=0)
·! 0:01:27.829341 {Gui Pad Thread} Input: Loading input configuration: 'E:/LaunchBox/Emulators/rpcs3-v0.0.17/config/input_configs/global/Default.yml'
·! 0:01:27.854258 GUI: Quitting gui application
·! 0:01:27.873162 GUI: Quitting gui application
·! 0:01:27.875189 Media: video_encoder: Stopping video encoder. flush=1
·! 0:01:27.875853 GUI: gui_application: Deleting old game window
·E 0:01:27.896776 SIG: Thread [Gui Pad Thread] is too sleepy. Waiting for it 20857.075us already!
·E 0:01:27.915845 SIG: Thread [Gui Pad Thread] is too sleepy. Waiting for it 39926.860us already!
...

Backtrace while it is stuck:

(lldb) thread list
Process 8 stopped
* thread #1: tid = 8, 0x00007f32917bea8d libc.so.6`syscall + 29, name = 'rpcs3', stop reason = signal SIGSTOP
  thread #2: tid = 10, 0x00007f32917466c2 libc.so.6`__syscall_cancel_arch_end, name = 'Log Writer', stop reason = signal SIGSTOP
  thread #3: tid = 11, 0x00007f32917466c2 libc.so.6`__syscall_cancel_arch_end, name = 'QXcbEventQueue', stop reason = signal SIGSTOP
  thread #4: tid = 15, 0x00007f32917466c2 libc.so.6`__syscall_cancel_arch_end, name = 'QDBusConnection', stop reason = signal SIGSTOP
  thread #5: tid = 38, 0x00007f32917466c2 libc.so.6`__syscall_cancel_arch_end, name = 'libusb_event', stop reason = signal SIGSTOP
  thread #6: tid = 39, 0x00007f32917466c2 libc.so.6`__syscall_cancel_arch_end, name = 'libusb', stop reason = signal SIGSTOP
  thread #7: tid = 65, 0x00007f32917466c2 libc.so.6`__syscall_cancel_arch_end, name = 'QPulseAudioEngi', stop reason = signal SIGSTOP
  thread #8: tid = 225, 0x00007f32917bea8d libc.so.6`syscall + 29, name = 'Gui Pad Thread', stop reason = signal SIGSTOP
(lldb) bt
* thread #1, name = 'rpcs3', stop reason = signal SIGSTOP
  * frame #0: 0x00007f32917bea8d libc.so.6`syscall + 29
    frame #1: 0x0000000001d12f00 rpcs3`futex(uaddr=0x00000000199a888c, futex_op=128, val=1, timeout=0x00007ffee6816d00, mask=0) at sync.h:78:9
    frame #2: 0x0000000001d12718 rpcs3`atomic_wait_engine::wait(data=0x00000000199a888c, old_value=1, timeout=1000000, ext=0x0000000000000000) at atomic.cpp:928:7
    frame #3: 0x0000000001166197 rpcs3`atomic_t<unsigned int, 4ul>::wait(this=0x00000000199a888c, old_value=1, timeout=1000000) const requires sizeof (std::remove_cv<T>::type) == 4 at atomic.hpp:1691:3
    frame #4: 0x0000000001d95bfe rpcs3`thread_base::join(this=0x00000000199a8870, dtor=true) const at Thread.cpp:2647:10
    frame #5: 0x0000000001246b14 rpcs3`named_thread<std::function<void ()>>::operator=(this=0x00000000199a8850, s=finished) at Thread.h:705:12
    frame #6: 0x000000000124c22e rpcs3`named_thread<std::function<void ()>>::~named_thread(this=0x00000000199a8850) at Thread.h:723:3
    frame #7: 0x000000000124c187 rpcs3`std::default_delete<named_thread<std::function<void ()>>>::operator()(this=0x0000000019af5c90, __ptr=0x00000000199a8850) const at unique_ptr.h:93:2
    frame #8: 0x000000000124c0d8 rpcs3`std::__uniq_ptr_impl<named_thread<std::function<void ()>>, std::default_delete<named_thread<std::function<void ()>>>>::reset(this=0x0000000019af5c90, __p=0x0000000000000000) at unique_ptr.h:205:4
    frame #9: 0x000000000126327d rpcs3`std::unique_ptr<named_thread<std::function<void ()>>, std::default_delete<named_thread<std::function<void ()>>>>::reset(this=nullptr, __p=0x0000000000000000) at unique_ptr.h:512:7
    frame #10: 0x000000000158b4d5 rpcs3`gui_pad_thread::~gui_pad_thread(this=0x0000000019af5c60) at gui_pad_thread.cpp:51:11
    frame #11: 0x000000000158b7a9 rpcs3`gui_pad_thread::~gui_pad_thread(this=0x0000000019af5c60) at gui_pad_thread.cpp:49:1
    frame #12: 0x0000000000ff95d8 rpcs3`std::default_delete<gui_pad_thread>::operator()(this=0x0000000019626460, __ptr=0x0000000019af5c60) const at unique_ptr.h:93:2
    frame #13: 0x0000000000fef2cf rpcs3`std::unique_ptr<gui_pad_thread, std::default_delete<gui_pad_thread>>::~unique_ptr(this=0x19af5c60) at unique_ptr.h:399:4
    frame #14: 0x0000000000f9a66f rpcs3`main_window::~main_window(this=0x00000000196261f0) at main_window.cpp:186:1
    frame #15: 0x0000000000f9a799 rpcs3`main_window::~main_window(this=0x00000000196261f0) at main_window.cpp:185:1
    frame #16: 0x00007f328ccbeeec libQt6Core.so.6`QObject::event(QEvent*) + 76
    frame #17: 0x00007f328ddbf7af libQt6Widgets.so.6`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 143
    frame #18: 0x00007f328cc63fa8 libQt6Core.so.6`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 360
    frame #19: 0x00007f328cc67cd6 libQt6Core.so.6`QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 854
    frame #20: 0x00007f328cc6d246 libQt6Core.so.6`QCoreApplication::exec() + 198
    frame #21: 0x0000000000f16dcc rpcs3`run_rpcs3(argc=1, argv=0x00007ffee681a298) at rpcs3.cpp:1320:9
    frame #22: 0x0000000000f0e8d2 rpcs3`main(argc=1, argv=0x00007ffee681a298) at main.cpp:8:24
    frame #23: 0x00007f32916d05f5 libc.so.6`__libc_start_call_main + 117
    frame #24: 0x00007f32916d06a8 libc.so.6`__libc_start_main@@GLIBC_2.34 + 136
    frame #25: 0x0000000000f0e7e5 rpcs3`_start + 37
(lldb) thread select 8
* thread #8, name = 'Gui Pad Thread', stop reason = signal SIGSTOP
    frame #0: 0x00007f32917bea8d libc.so.6`syscall + 29
libc.so.6`syscall:
->  0x7f32917bea8d <+29>: cmpq   $-0xfff, %rax  ; imm = 0xF001 
    0x7f32917bea93 <+35>: jae    0x7f32917bea96 ; <+38>
    0x7f32917bea95 <+37>: retq   
    0x7f32917bea96 <+38>: movq   0xf634b(%rip), %rcx ; _GLOBAL_OFFSET_TABLE_ + 648
(lldb) bt
* thread #8, name = 'Gui Pad Thread', stop reason = signal SIGSTOP
  * frame #0: 0x00007f32917bea8d libc.so.6`syscall + 29
    frame #1: 0x0000000001d12f00 rpcs3`futex(uaddr=0x00007f3192ff72b0, futex_op=128, val=0, timeout=0x0000000000000000, mask=0) at sync.h:78:9
    frame #2: 0x0000000001d12718 rpcs3`atomic_wait_engine::wait(data=0x00007f3192ff72b0, old_value=0, timeout=18446744073709551615, ext=0x0000000000000000) at atomic.cpp:928:7
    frame #3: 0x0000000001166197 rpcs3`atomic_t<unsigned int, 4ul>::wait(this=0x00007f3192ff72b0, old_value=0, timeout=inf) const requires sizeof (std::remove_cv<T>::type) == 4 at atomic.hpp:1691:3
    frame #4: 0x0000000001c9692d rpcs3`Emulator::BlockingCallFromMainThread(this=0x00000000033bf0c0, func=0x00007f3192ff7438, src_loc=source_location @ 0x00007f3192ff72a8) const at System.cpp:206:11
    frame #5: 0x000000000162476b rpcs3`sdl_pad_handler::Init(this=0x00007f317c0868b0) at sdl_pad_handler.cpp:185:6
    frame #6: 0x000000000158be35 rpcs3`gui_pad_thread::init(this=0x0000000019af5c60) at gui_pad_thread.cpp:130:20
    frame #7: 0x000000000158de1a rpcs3`gui_pad_thread::run(this=0x0000000019af5c60) at gui_pad_thread.cpp:258:9
    frame #8: 0x000000000158f858 rpcs3`gui_pad_thread::gui_pad_thread()::$_0::operator()(this=0x00000000199a8850) const at gui_pad_thread.cpp:45:95
    frame #9: 0x000000000158f835 rpcs3`void std::__invoke_impl<void, gui_pad_thread::gui_pad_thread()::$_0&>((null)=__invoke_other @ 0x00007f3192ff822f, __f=0x00000000199a8850) at invoke.h:63:14
    frame #10: 0x000000000158f7e5 rpcs3`std::enable_if<is_invocable_r_v<void, gui_pad_thread::gui_pad_thread()::$_0&>, void>::type std::__invoke_r<void, gui_pad_thread::gui_pad_thread()::$_0&>(__fn=0x00000000199a8850) at invoke.h:113:2
    frame #11: 0x000000000158f70d rpcs3`std::_Function_handler<void (), gui_pad_thread::gui_pad_thread()::$_0>::_M_invoke(__functor=0x00000000199a8850) at std_function.h:292:9
    frame #12: 0x0000000000f8194e rpcs3`std::function<void ()>::operator()(this=0x00000000199a8850) const at std_function.h:593:9
    frame #13: 0x000000000125221a rpcs3`named_thread<std::function<void ()>>::entry_point2(this=0x00000000199a8850) at Thread.h:488:14
    frame #14: 0x0000000001248b79 rpcs3`named_thread<std::function<void ()>>::entry_point(_base=0x00000000199a8870) at Thread.h:469:45
    frame #15: 0x00007f328107050b
    frame #16: 0x00007f32917c0cec libc.so.6`__clone3 + 44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants