When loading a PDF document in the internal viewer, TexStudio segfaults.
TeXstudio 2.12.4 (hg 6475:fe21cf14c0b4)
Using Qt Version 5.9.0, compiled with Qt 5.8.0 R
Arch Linux x86_64
This is the top of the backtrace:
Thread 1 "texstudio" received signal SIGSEGV, Segmentation fault.
0x00007ffff6ce0910 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
(gdb) bt
3 0x00007ffff5519b98 in QCoreApplication::notifyInternal2(QObject, QEvent) () from /usr/lib/libQt5Core.so.5
4 0x00007ffff6cd8c62 in QWidget::setContentsMargins(int, int, int, int) () from /usr/lib/libQt5Widgets.so.5
5 0x00000000007f079f in Internal::MiniSplitterHandle::resizeEvent(QResizeEvent*) ()
9 0x00007ffff5519b98 in QCoreApplication::notifyInternal2(QObject, QEvent) () from /usr/lib/libQt5Core.so.5
10 0x00007ffff6cd8c62 in QWidget::setContentsMargins(int, int, int, int) () from /usr/lib/libQt5Widgets.so.5
12 0x00000000007f07e1 in Internal::MiniSplitterHandle::resizeEvent(QResizeEvent*) ()
16 0x00007ffff5519b98 in QCoreApplication::notifyInternal2(QObject, QEvent) () from /usr/lib/libQt5Core.so.5
17 0x00007ffff6cd8c62 in QWidget::setContentsMargins(int, int, int, int) () from /usr/lib/libQt5Widgets.so.5
18 0x00000000007f079f in Internal::MiniSplitterHandle::resizeEvent(QResizeEvent*) ()
...
There seems to be an infinite recursion of Qt resize event handlers. The bottom of the backtrace looks like this:
(gdb) backtrace -20
61346 0x00007ffff5519b98 in QCoreApplication::notifyInternal2(QObject, QEvent) () from /usr/lib/libQt5Core.so.5
61353 0x000000000054a2e3 in Texstudio::newPdfPreviewer(bool) ()
61354 0x000000000057ed11 in Texstudio::runInternalPdfViewer(QFileInfo const&, QString const&) ()
61355 0x000000000059538c in Texstudio::runInternalCommand(QString const&, QFileInfo const&, QString const&) ()
61356 0x000000000059d351 in Texstudio::restoreSession(Session const&, bool, bool) ()
61357 0x000000000059d886 in Texstudio::fileRestoreSession(bool, bool) ()
61359 0x000000000053a202 in TexstudioApp::init(QStringList&) ()
61360 0x000000000053465e in main ()
The reference to restoreSession gave me a hint to remove the path to the PDF file from the session file. After doing so, TexStudio starts up fine, but it will crash anytime I try to open a PDF in the internal viewer.
I haven't been able to find a similar issue filed here so I'm filing this one.
try to remove
centralVSplitterState=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\x1\x84\0\0\x1\x17\0\xff\xff\xff\xff\x1\0\0\0\x2\0)
from texstudio.ini
seems to be a qt5.9 problem
I created an account just to say thank you!
I can confirm that the solution works and the response time was amazing, despite me causing a horrible mess of the bug report by ignoring Markdown.