obsproject / obsproject/obs-studio
error at run-time: QWidget: Cannot create a QWidget without QApplication
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 76.4k
- Forks
- 10.2k
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 12
Description
Operating System Info
Other
Other OS
FreeBSD 15
OBS Studio Version
32.0.4
OBS Studio Version (Other)
No response
OBS Studio Log URL
n/a
OBS Studio Crash Log URL
No response
Expected Behavior
no abort
Current Behavior
$ obs
Gtk-Message: 03:21:59.947: Failed to load module "colorreload-gtk-module"
Qt: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes/
warning: Get on org.freedesktop.portal.Settings returned an invalid reply
warning: Crash or unclean shutdown detected
QWidget: Cannot create a QWidget without QApplication
Abort trap obs
Steps to Reproduce
build+run
Anything else we should know?
The problem disappears when compiled with debug options.
The stack trace of abort is:
Thread 1 hit Breakpoint 1.5, 0x0000000805958534 in abort () from /lib/libc.so.7
(gdb) bt
#0 0x0000000805958534 in abort () at /lib/libc.so.7
#1 0x000000080527ce9d in ??? () at /usr/local/lib/qt6/libQt6Core.so.6
#2 0x00000008052950df in ??? () at /usr/local/lib/qt6/libQt6Core.so.6
#3 0x000000080529b0d8 in QMessageLogger::fatal(char const*, ...) const () at /usr/local/lib/qt6/libQt6Core.so.6
#4 0x000000080412f58e in QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) () at /usr/local/lib/qt6/libQt6Widgets.so.6
#5 0x000000080436ccce in QDialog::QDialog(QDialogPrivate&, QWidget*, QFlags<Qt::WindowType>) () at /usr/local/lib/qt6/libQt6Widgets.so.6
#6 0x000000080439eaa6 in QMessageBox::QMessageBox(QWidget*) () at /usr/local/lib/qt6/libQt6Widgets.so.6
#7 0x0000000000655c22 in ??? ()
#8 0x0000000000648c3e in ??? ()
#9 0x000000080587b26f in __libc_start1 () at /lib/libc.so.7
#10 0x00000000003e3004 in ??? ()
(gdb)
It seems like it attempts to show some message box without having QApplication object.
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
Start by reproducing the abort on FreeBSD 15 with a non-debug build, then inspect the startup path around the QMessageBox and QWidget frames shown in the stack trace. Compare the debug and release builds to identify why a QWidget is created before QApplication. Done means OBS starts without the abort and the relevant startup behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100