Bug 394352 - Kopete crashes after chat window close
Summary: Kopete crashes after chat window close
Status: REPORTED
Alias: None
Product: kopete
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2018-05-17 04:55 UTC by Paul
Modified: 2021-02-08 15:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul 2018-05-17 04:55:08 UTC
Application: kopete (1.13.0)

Qt Version: 5.9.3
Frameworks Version: 5.46.0
Operating System: Linux 4.13.0-41-generic x86_64
Distribution: KDE neon LTS User Edition 5.12

-- Information about the crash:
- What I was doing when the application crashed:
I'm using kopete to communicate through our company local jabber sever. 

I have opened several tabs (chats) with different persons. After several messages (sending/recieving) i changed to another tab. But when i wrote message to this chat - i can't send my message due to inactivity of "Send" button. So, the first issue, that "Send" button does not become enabled after text typing in chat window. Also my send shortcut key doesn't work.
After that - i'm trying to reopen my chat window, to "fix" this issue. But after close this chat window my kopete crashes.

The crash can be reproduced every time.

-- Backtrace:
Application: Kopete (kopete), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7efc19bbc940 (LWP 6396))]

Thread 6 (Thread 0x7efbe7286700 (LWP 9924)):
#0  0x00007efc145a874d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007efc0d50e38c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007efc0d50e49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007efc14ecf6cb in QEventDispatcherGlib::processEvents (this=0x7efbd80008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007efc14e77e2a in QEventLoop::exec (this=this@entry=0x7efbe7285bb0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007efc14ca08f4 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:515
#6  0x00007efbe9ad6ca6 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/kopete_jabber.so
#7  0x00007efc14ca5709 in QThreadPrivate::start (arg=0xf00380) at thread/qthread_unix.cpp:368
#8  0x00007efc0f18e6ba in start_thread (arg=0x7efbe7286700) at pthread_create.c:333
#9  0x00007efc145b441d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7efbe7a87700 (LWP 9923)):
#0  0x00007efc0d50b3e4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007efc0d50d8bb in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007efc0d50e2bb in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007efc0d50e49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007efc14ecf6cb in QEventDispatcherGlib::processEvents (this=0x7efbe00008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#5  0x00007efc14e77e2a in QEventLoop::exec (this=0x7efbe00013a0, flags=...) at kernel/qeventloop.cpp:212
#6  0x00007efbe9433d25 in QCA::SyncThread::run() () from /usr/lib/x86_64-linux-gnu/libqca-qt5.so.2
#7  0x00007efc14ca5709 in QThreadPrivate::start (arg=0xdca580) at thread/qthread_unix.cpp:368
#8  0x00007efc0f18e6ba in start_thread (arg=0x7efbe7a87700) at pthread_create.c:333
#9  0x00007efc145b441d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7efbfa333700 (LWP 7043)):
#0  0x00007efc145a874d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007efc0d50e38c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007efc0d50e49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007efc14ecf6cb in QEventDispatcherGlib::processEvents (this=0x7efbec0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007efc14e77e2a in QEventLoop::exec (this=this@entry=0x7efbfa332c80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007efc14ca08f4 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:515
#6  0x00007efc14ca5709 in QThreadPrivate::start (arg=0xa3e8e0) at thread/qthread_unix.cpp:368
#7  0x00007efc0f18e6ba in start_thread (arg=0x7efbfa333700) at pthread_create.c:333
#8  0x00007efc145b441d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7efbfb544700 (LWP 7026)):
#0  0x00007efc145a874d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007efc0d50e38c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007efc0d50e49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007efc14ecf6cb in QEventDispatcherGlib::processEvents (this=0x7efbf40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007efc14e77e2a in QEventLoop::exec (this=this@entry=0x7efbfb543c50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007efc14ca08f4 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:515
#6  0x00007efc1687a315 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007efc14ca5709 in QThreadPrivate::start (arg=0x7efc16aeed40) at thread/qthread_unix.cpp:368
#8  0x00007efc0f18e6ba in start_thread (arg=0x7efbfb544700) at pthread_create.c:333
#9  0x00007efc145b441d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7efc019e8700 (LWP 7023)):
#0  0x00007efc145a874d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007efc0f9f1c62 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007efc0f9f38d7 in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007efc039181f9 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007efc14ca5709 in QThreadPrivate::start (arg=0x979ca0) at thread/qthread_unix.cpp:368
#5  0x00007efc0f18e6ba in start_thread (arg=0x7efc019e8700) at pthread_create.c:333
#6  0x00007efc145b441d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7efc19bbc940 (LWP 6396)):
[KCrash Handler]
#6  QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::data (this=0x8) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:140
#7  qGetPtrHelper<QScopedPointer<QObjectData> > (p=...) at ../../include/QtCore/../../src/corelib/global/qglobal.h:999
#8  QScrollArea::d_func (this=this@entry=0x0) at widgets/qscrollarea.h:89
#9  QScrollArea::widget (this=this@entry=0x0) at widgets/qscrollarea.cpp:227
#10 0x00007efbeb1145c9 in KHTMLView::contentsHeight (this=0x0) at /workspace/build/src/khtmlview.cpp:695
#11 0x00007efbeb9af2b8 in ChatMessagePart::slotScrollView() () from /usr/lib/x86_64-linux-gnu/libkopetechatwindow_shared.so.1
#12 0x00007efbeb9ca785 in ?? () from /usr/lib/x86_64-linux-gnu/libkopetechatwindow_shared.so.1
#13 0x00007efc14ea6279 in QMetaObject::activate (sender=sender@entry=0x1ea42f0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3766
#14 0x00007efc14ea6b87 in QMetaObject::activate (sender=sender@entry=0x1ea42f0, m=m@entry=0x7efc15330ee0 <QSingleShotTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3628
#15 0x00007efc14eb2bf3 in QSingleShotTimer::timeout (this=0x1ea42f0) at .moc/qtimer.moc:125
#16 QSingleShotTimer::timerEvent (this=0x1ea42f0) at kernel/qtimer.cpp:321
#17 0x00007efc14ea7273 in QObject::event (this=0x1ea42f0, e=<optimized out>) at kernel/qobject.cpp:1268
#18 0x00007efc15bd7b9c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1ea42f0, e=0x7ffc74b382b0) at kernel/qapplication.cpp:3722
#19 0x00007efc15bdf5a7 in QApplication::notify (this=0x7ffc74b38620, receiver=0x1ea42f0, e=0x7ffc74b382b0) at kernel/qapplication.cpp:3481
#20 0x00007efc14e79df8 in QCoreApplication::notifyInternal2 (receiver=0x1ea42f0, event=event@entry=0x7ffc74b382b0) at kernel/qcoreapplication.cpp:1018
#21 0x00007efc14ecea7e in QCoreApplication::sendEvent (event=0x7ffc74b382b0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:233
#22 QTimerInfoList::activateTimers (this=0x9b7020) at kernel/qtimerinfo_unix.cpp:643
#23 0x00007efc14ecf301 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:182
#24 0x00007efc0d50e197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007efc0d50e3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007efc0d50e49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007efc14ecf6af in QEventDispatcherGlib::processEvents (this=0x9b50c0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#28 0x00007efc14e77e2a in QEventLoop::exec (this=this@entry=0x7ffc74b38500, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#29 0x00007efc14e80d64 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1291
#30 0x000000000041558d in ?? ()
#31 0x00007efc144cd830 in __libc_start_main (main=0x4138d0, argc=3, argv=0x7ffc74b38778, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc74b38768) at ../csu/libc-start.c:291
#32 0x0000000000415609 in _start ()

Reported using DrKonqi
Comment 1 Vovochka 2019-06-14 04:44:25 UTC
Having exact the same problem on opensuse 15.1 with kopete 1.13
KDE Frameworks 5.55.0
Qt 5.9.7
Comment 2 Fabio 2021-02-08 11:29:50 UTC
SOFTWARE/OS VERSIONS
Operating System: Slackware Linux -current
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.14
OS Type: 64-bit
Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics
Memory: 15,0 GiB of RAM
Graphics Processor: AMD RENOIR

I can reproduce this issue every time a chat window gets closed.
It only happens on a plasma wayland session; no crash under x11.
The crash signature is the same:

#4  0x00007f0fecb35c50 in QScrollArea::widget() const () from /usr/lib64/libQt5Widgets.so.5
#5  0x00007f0fc325bf79 in KHTMLView::contentsHeight() const () from /usr/lib64/libKF5KHtml.so.5
#6  0x00007f0fd40989d3 in ChatMessagePart::slotScrollView() () from /usr/lib64/libkopetechatwindow_shared.so.1
Comment 3 Fabio 2021-02-08 15:43:59 UTC
I debugged this issue a bit.
There's a workaround, just disabling "Input auto-resize" from the "Format" menu avoids the crash when closing the chat window.

The crash is due to KopeteRichTextWidget triggering a size recalc on the chatview of the window that has just been closed; this leads to a call to ChatMessagePart::keepScrolledDown() to ensure the view is scrolled down to the last message. Here's the backtrace up to the method emitting the signal:

#0  ChatMessagePart::keepScrolledDown (this=0xd76ba0) at /home/fabio/prj/kopete/kopete/chatwindow/chatmessagepart.cpp:650
#1  0x00007fffd81c4324 in ChatView::slotRecalculateSize (this=0x10bda20, difference=0) at /home/fabio/prj/kopete/kopete/chatwindow/chatview.cpp:488
#2  0x00007fffd81bf0ab in ChatView::qt_static_metacall (_o=0x10bda20, _c=QMetaObject::InvokeMetaMethod, _id=25, _a=0x7fffffffbf30)
    at /home/fabio/prj/kopete/buid/kopete/chatwindow/kopete_chatwindow_autogen/EWIEGA46WW/moc_chatview.cpp:275
#3  0x00007ffff55d4845 in ?? () from /usr/lib64/libQt5Core.so.5
#4  0x00007fffd81641b4 in KopeteRichTextWidget::documentSizeUpdated (this=0xf474c0, _t1=0)
    at /home/fabio/prj/kopete/buid/kopete/chatwindow/kopetechatwindow_shared_autogen/EWIEGA46WW/moc_kopeterichtextwidget.cpp:250
#5  0x00007fffd817c093 in KopeteRichTextWidget::slotDocumentSizeUpdated (this=0xf474c0) at /home/fabio/prj/kopete/kopete/chatwindow/kopeterichtextwidget.cpp:152
#6  0x00007fffd8163e6d in KopeteRichTextWidget::qt_static_metacall (_o=0xf474c0, _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0x7fffffffc070)
    at /home/fabio/prj/kopete/buid/kopete/chatwindow/kopetechatwindow_shared_autogen/EWIEGA46WW/moc_kopeterichtextwidget.cpp:163
#7  0x00007ffff55d4845 in ?? () from /usr/lib64/libQt5Core.so.5
#8  0x00007ffff55d4845 in ?? () from /usr/lib64/libQt5Core.so.5
#9  0x00007ffff6294a83 in QWidgetTextControl::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007ffff55d455d in ?? () from /usr/lib64/libQt5Core.so.5
#11 0x00007ffff5aa8a1c in QTextDocumentPrivate::finishEdit() () from /usr/lib64/libQt5Gui.so.5
#12 0x00007ffff6292401 in ?? () from /usr/lib64/libQt5Widgets.so.5
#13 0x00007ffff628a32a in QWidgetTextControl::processEvent(QEvent*, QPointF const&, QWidget*) () from /usr/lib64/libQt5Widgets.so.5
#14 0x00007ffff626e219 in QTextEdit::inputMethodEvent(QInputMethodEvent*) () from /usr/lib64/libQt5Widgets.so.5
#15 0x00007ffff60fdace in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#16 0x00007ffff61a204e in QFrame::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#17 0x00007fffd817dd27 in KopeteRichTextWidget::event (this=0xf474c0, event=0x7fffffffc6d0) at /home/fabio/prj/kopete/kopete/chatwindow/kopeterichtextwidget.cpp:463
#18 0x00007ffff60c126f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#19 0x00007ffff55a034a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#20 0x00007ffff372051f in ?? () from /usr/lib64/libQt5WaylandClient.so.5
#21 0x00007ffff60c4f6d in QApplication::setActiveWindow(QWidget*) () from /usr/lib64/libQt5Widgets.so.5
#22 0x00007ffff60e69e7 in QWidgetPrivate::deactivateWidgetCleanup() () from /usr/lib64/libQt5Widgets.so.5
#23 0x00007ffff60f2be5 in QWidgetPrivate::hide_sys() () from /usr/lib64/libQt5Widgets.so.5
#24 0x00007ffff60f9470 in QWidgetPrivate::hide_helper() () from /usr/lib64/libQt5Widgets.so.5
#25 0x00007ffff60fd868 in QWidgetPrivate::setVisible(bool) () from /usr/lib64/libQt5Widgets.so.5
#26 0x00007ffff60f98b2 in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) () from /usr/lib64/libQt5Widgets.so.5
#27 0x00007ffff6118267 in ?? () from /usr/lib64/libQt5Widgets.so.5
#28 0x00007ffff60c126f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#29 0x00007ffff55a034a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#30 0x00007ffff5980a57 in QGuiApplicationPrivate::processCloseEvent(QWindowSystemInterfacePrivate::CloseEvent*) () from /usr/lib64/libQt5Gui.so.5
#31 0x00007ffff595b9d5 in bool QWindowSystemInterfacePrivate::handleWindowSystemEvent<QWindowSystemInterface::SynchronousDelivery>(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
   from /usr/lib64/libQt5Gui.so.5
#32 0x00007ffff0e4094d in ?? () from /usr/lib64/libffi.so.7
#33 0x00007ffff0e3ff48 in ?? () from /usr/lib64/libffi.so.7
#34 0x00007ffff368deb2 in ?? () from /usr/lib64/libwayland-client.so.0
#35 0x00007ffff368a91a in ?? () from /usr/lib64/libwayland-client.so.0
#36 0x00007ffff368be6c in wl_display_dispatch_queue_pending () from /usr/lib64/libwayland-client.so.0
#37 0x00007ffff370d0c3 in QtWaylandClient::QWaylandDisplay::flushRequests() () from /usr/lib64/libQt5WaylandClient.so.5
#38 0x00007ffff55d4845 in ?? () from /usr/lib64/libQt5Core.so.5
#39 0x00007ffff55d7a6f in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) () from /usr/lib64/libQt5Core.so.5
#40 0x00007ffff55d816b in QSocketNotifier::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#41 0x00007ffff60c126f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#42 0x00007ffff55a034a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
--Type <RET> for more, q to quit, c to continue without paging--c
#43 0x00007ffff55f4d25 in ?? () from /usr/lib64/libQt5Core.so.5
#44 0x00007ffff13d472b in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#45 0x00007ffff13d49a8 in ?? () from /usr/lib64/libglib-2.0.so.0
#46 0x00007ffff13d4a4f in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#47 0x00007ffff55f41ff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#48 0x00007ffff559ee8b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#49 0x00007ffff55a6aac in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#50 0x000000000041d3c2 in main (argc=1, argv=0x7fffffffdd48) at /home/fabio/prj/kopete/kopete/main.cpp:121


ChatMessagePart::keepScrolledDown will run a singleshot timer calling the ChatMessagePart::slotScrollView() slot that crashes Kopete because that object instance has already been deleted.