Menu

#2188 Segfault from infinite recursion in internal PDF viewer

None
closed
nobody
None
1
2017-06-21
2017-06-21
Anonymous
No

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

0 0x00007ffff6ce0910 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5

1 0x00007ffff6c9f46c in QApplicationPrivate::notify_helper(QObject, QEvent) () from /usr/lib/libQt5Widgets.so.5

2 0x00007ffff6ca6cf4 in QApplication::notify(QObject, QEvent) () from /usr/lib/libQt5Widgets.so.5

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*) ()

6 0x00007ffff6ce0912 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5

7 0x00007ffff6c9f46c in QApplicationPrivate::notify_helper(QObject, QEvent) () from /usr/lib/libQt5Widgets.so.5

8 0x00007ffff6ca6cf4 in QApplication::notify(QObject, QEvent) () from /usr/lib/libQt5Widgets.so.5

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

11 0x00007ffff6e1b231 in QSplitterHandle::resizeEvent(QResizeEvent*) () from /usr/lib/libQt5Widgets.so.5

12 0x00000000007f07e1 in Internal::MiniSplitterHandle::resizeEvent(QResizeEvent*) ()

13 0x00007ffff6ce0912 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5

14 0x00007ffff6c9f46c in QApplicationPrivate::notify_helper(QObject, QEvent) () from /usr/lib/libQt5Widgets.so.5

15 0x00007ffff6ca6cf4 in QApplication::notify(QObject, QEvent) () from /usr/lib/libQt5Widgets.so.5

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*) ()

19 0x00007ffff6ce0912 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5

...

There seems to be an infinite recursion of Qt resize event handlers. The bottom of the backtrace looks like this:

(gdb) backtrace -20

61341 0x00007ffff6e17526 in ?? () from /usr/lib/libQt5Widgets.so.5

61342 0x00007ffff6e199b3 in ?? () from /usr/lib/libQt5Widgets.so.5

61343 0x00007ffff6ce0912 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5

61344 0x00007ffff6c9f46c in QApplicationPrivate::notify_helper(QObject, QEvent) () from /usr/lib/libQt5Widgets.so.5

61345 0x00007ffff6ca6cf4 in QApplication::notify(QObject, QEvent) () from /usr/lib/libQt5Widgets.so.5

61346 0x00007ffff5519b98 in QCoreApplication::notifyInternal2(QObject, QEvent) () from /usr/lib/libQt5Core.so.5

61347 0x00007ffff6cd7cba in QWidgetPrivate::setGeometry_sys(int, int, int, int, bool) () from /usr/lib/libQt5Widgets.so.5

61348 0x00007ffff6cd8a40 in QWidget::setGeometry(QRect const&) () from /usr/lib/libQt5Widgets.so.5

61349 0x00007ffff6e17526 in ?? () from /usr/lib/libQt5Widgets.so.5

61350 0x00007ffff6e199b3 in ?? () from /usr/lib/libQt5Widgets.so.5

61351 0x00007ffff6e1a15a in ?? () from /usr/lib/libQt5Widgets.so.5

61352 0x00007ffff6e1ae36 in ?? () from /usr/lib/libQt5Widgets.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) ()

61358 0x00000000005a25de in Texstudio::Texstudio(QWidget, QFlags<Qt::WindowType>, QSplashScreen) ()

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.

Discussion

  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-06-21

    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

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-06-21

    seems to be a qt5.9 problem

     
  • Ziman Zimanovic

    Ziman Zimanovic - 2017-06-21

    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.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-06-21
    • status: open --> closed
    • Group: -->
     

Log in to post a comment.