[QT] Crash in pthread_setspecific when switching content while QT interface is open
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
Description
Is there an existing issue for this?
- This is a bug in RetroArch frontend
- I have searched the existing issues
Description
I'm unable to switch content while the qt interface is open without crashing retroarch.
Expected behavior
No crash
Steps to reproduce the bug
Linux:
- Start retroarch
- load content
- F5
- load another content
- GLib (gthread-posix.c): Unexpected error from C library during 'pthread_setspecific': Invalid argument. Aborting.
Version/Commit
1.20.0 Git version: 3797d4deb6 (Build date Jan, 21 2025)
Bisect Results
No response
Present in the nightly version
I don't know
Platform & operating system
Linux x86 64bit
Affected Cores
Any
Environment information
X11, GLCore
Relevant log output
Thread 1 "retroarch" received signal SIGABRT, Aborted.
0x00007ffff0cac83c in ?? () from /usr/lib/libc.so.6
(gdb) bt all
No symbol "all" in current context.
(gdb) bt full
#0 0x00007ffff0cac83c in () at /usr/lib/libc.so.6
#1 0x00007ffff0c5c668 in raise () at /usr/lib/libc.so.6
#2 0x00007ffff0c444b8 in abort () at /usr/lib/libc.so.6
#3 0x00007ffff4079f94 in () at /usr/lib/libglib-2.0.so.0
#4 0x00007ffff407a14f in g_private_set () at /usr/lib/libglib-2.0.so.0
#5 0x00007ffff405429a in g_thread_self () at /usr/lib/libglib-2.0.so.0
#6 0x00007ffff401f153 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#7 0x00007ffff759d074 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt6Core.so.6
#8 0x00005555556586d3 in ()
#9 0x00007ffff0c45cd0 in () at /usr/lib/libc.so.6
#10 0x00007ffff0c45d8a in __libc_start_main () at /usr/lib/libc.so.6
#11 0x000055555564a5b5 in ()
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the crash on Linux by opening the Qt interface, loading content, pressing F5, and loading another item. Start with the provided gdb backtrace around the Qt event dispatcher, GLib g_main_context_iteration, and pthread_setspecific; done means switching content no longer aborts RetroArch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100