On Qt 5.9 beta 2, texstudio can't start as MiniSplitter::resizeEvent() indirectly calls itself and results in stack overflow. Here's the GDB backtrace:
$ gdb ./texstudio
Reading symbols from ./texstudio...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/yen/Projects/tmp/texstudio/texstudio
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe9dfc700 (LWP 24463)]
[New Thread 0x7fffe3fff700 (LWP 24464)]
[New Thread 0x7fffe095f700 (LWP 24466)]
[New Thread 0x7fffd998d700 (LWP 24467)]
[New Thread 0x7fffd90f0700 (LWP 24468)]
[New Thread 0x7fffd88ef700 (LWP 24470)]
[New Thread 0x7fffc7fff700 (LWP 24472)]
[New Thread 0x7fffc67fa700 (LWP 24473)]
[New Thread 0x7fffc5ff9700 (LWP 24474)]
propsReply "Method \"GetAll\" with signature \"s\" on interface \"org.freedesktop.DBus.Properties\" doesn't exist\n"
nmReply "Method \"GetDevices\" with signature \"\" on interface \"org.freedesktop.NetworkManager\" doesn't exist\n"
"Object path cannot be empty"
Thread 1 "texstudio" received signal SIGSEGV, Segmentation fault.
0x00007ffff5536e42 in QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
(gdb) bt
#0 0x00007ffff5536e42 in QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*) ()
from /usr/lib/libQt5Core.so.5
#1 0x00007ffff6c94a78 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#2 0x00007ffff6c9c321 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#3 0x00007ffff5537330 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#4 0x00007ffff6cced32 in QWidget::setContentsMargins(int, int, int, int) () from /usr/lib/libQt5Widgets.so.5
#5 0x00007ffff6e151a1 in QSplitterHandle::resizeEvent(QResizeEvent*) () from /usr/lib/libQt5Widgets.so.5
#6 0x00000000007efea1 in Internal::MiniSplitterHandle::resizeEvent(QResizeEvent*) ()
#7 0x00007ffff6cd6a9e in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#8 0x00007ffff6c94a3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#9 0x00007ffff6c9c321 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#10 0x00007ffff5537330 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#11 0x00007ffff6cced32 in QWidget::setContentsMargins(int, int, int, int) () from /usr/lib/libQt5Widgets.so.5
#12 0x00000000007efe5f in Internal::MiniSplitterHandle::resizeEvent(QResizeEvent*) ()
#13 0x00007ffff6cd6a9e in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#14 0x00007ffff6c94a3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#15 0x00007ffff6c9c321 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#16 0x00007ffff5537330 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#17 0x00007ffff6cced32 in QWidget::setContentsMargins(int, int, int, int) () from /usr/lib/libQt5Widgets.so.5
#18 0x00007ffff6e151a1 in QSplitterHandle::resizeEvent(QResizeEvent*) () from /usr/lib/libQt5Widgets.so.5
#19 0x00000000007efea1 in Internal::MiniSplitterHandle::resizeEvent(QResizeEvent*) ()
#20 0x00007ffff6cd6a9e in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#21 0x00007ffff6c94a3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#22 0x00007ffff6c9c321 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#23 0x00007ffff5537330 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#24 0x00007ffff6cced32 in QWidget::setContentsMargins(int, int, int, int) () from /usr/lib/libQt5Widgets.so.5
#25 0x00000000007efe5f in Internal::MiniSplitterHandle::resizeEvent(QResizeEvent*) ()
#26 0x00007ffff6cd6a9e in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#27 0x00007ffff6c94a3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#28 0x00007ffff6c9c321 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#29 0x00007ffff5537330 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#30 0x00007ffff6cced32 in QWidget::setContentsMargins(int, int, int, int) () from /usr/lib/libQt5Widgets.so.5
#31 0x00007ffff6e151a1 in QSplitterHandle::resizeEvent(QResizeEvent*) () from /usr/lib/libQt5Widgets.so.5
#32 0x00000000007efea1 in Internal::MiniSplitterHandle::resizeEvent(QResizeEvent*) ()
#33 0x00007ffff6cd6a9e in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
---Type <return> to continue, or q <return> to quit---q
Quit
I managed to workaround it by removing the call to QSplitter::resizeEvent():
diff --git a/minisplitter.cpp b/minisplitter.cpp
--- a/minisplitter.cpp
+++ b/minisplitter.cpp
@@ -67,17 +67,16 @@ QSize MiniSplitterHandle::sizeHint() con
void MiniSplitterHandle::resizeEvent(QResizeEvent *event)
{
if (orientation() == Qt::Horizontal)
setContentsMargins(2, 0, 2, 0);
else
setContentsMargins(0, 2, 0, 2);
setMask(QRegion(contentsRect()));
- QSplitterHandle::resizeEvent(event);^M
}
void MiniSplitterHandle::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
painter.fillRect(event->rect(), StyleHelper::borderColor());
}
System: Arch Linux x86_64 with [KDE-Unstable] repository enabled, which includes Qt 5.9 beta 2 packages.
let's wait and see what happens with qt 5.9 final.
works fine qith qt5.9 beta 3
Thanks for testing. I find the cause - my texstudio.ini has an invalid line:
Removing this line brings texstudio back, even on Qt 5.9 beta 3.
I can confirm the exact same issue, as well as for other people here https://bugs.archlinux.org/task/54269
Same backtrace for me with Qt 5.9.0. But the workaround from Yen Chi-Hsuan fixes it.