Bug 402788 - KWrite crashed while searching
Summary: KWrite crashed while searching
Status: RESOLVED UPSTREAM
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2019-01-02 14:48 UTC by Alex Fiestas
Modified: 2019-06-08 15:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Fiestas 2019-01-02 14:48:12 UTC
Application: kwrite (19.03.70)
 (Compiled from sources)
Qt Version: 5.12.0
Frameworks Version: 5.54.0
Operating System: Linux 4.20.0-arch1-1-ARCH x86_64
Distribution: "Arch Linux"

-- Information about the crash:
- What I was doing when the application crashed:
I was searching some text via Ctrl+F, it worked a few times and then crashed.

This has happend many times.

The crash can be reproduced every time.

-- Backtrace:
Application: KWrite (kwrite), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f94a1f97880 (LWP 3138))]

Thread 4 (Thread 0x7f94935ae700 (LWP 3143)):
#0  0x00007f94a70b8afc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007f94937ffc24 in ?? () from /usr/lib/dri/i965_dri.so
#2  0x00007f94937ff948 in ?? () from /usr/lib/dri/i965_dri.so
#3  0x00007f94a70b2a9d in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007f94a84f5b23 in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7f949ae60700 (LWP 3142)):
#0  0x00007f94a451b424 in g_mutex_unlock () from /usr/lib/libglib-2.0.so.0
#1  0x00007f94a456d535 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007f94a456d62e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f94a8bb886b in QEventDispatcherGlib::processEvents (this=0x7f9494000b20, flags=...) at /home/afiestas/Projects/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:424
#4  0x00007f94a8b62c4b in QEventLoop::exec (this=this@entry=0x7f949ae5fcf0, flags=..., flags@entry=...) at ../../include/QtCore/../../../../qtbase/src/corelib/global/qflags.h:140
#5  0x00007f94a89ac3f6 in QThread::exec (this=this@entry=0x7f94a8ea7d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../../../qtbase/src/corelib/global/qflags.h:120
#6  0x00007f94a8e2d565 in QDBusConnectionManager::run (this=0x7f94a8ea7d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at /home/afiestas/Projects/qt5/qtbase/src/dbus/qdbusconnection.cpp:178
#7  0x00007f94a89ad742 in QThreadPrivate::start (arg=0x7f94a8ea7d80 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at /home/afiestas/Projects/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:361
#8  0x00007f94a70b2a9d in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007f94a84f5b23 in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7f94a0b41700 (LWP 3141)):
#0  0x00007f94a84eac21 in poll () from /usr/lib/libc.so.6
#1  0x00007f94a4102630 in ?? () from /usr/lib/libxcb.so.1
#2  0x00007f94a41042db in xcb_wait_for_event () from /usr/lib/libxcb.so.1
#3  0x00007f94a191d4b8 in QXcbEventQueue::run (this=0x561546efbab0) at /home/afiestas/Projects/qt5/qtbase/src/plugins/platforms/xcb/qxcbeventqueue.cpp:228
#4  0x00007f94a89ad742 in QThreadPrivate::start (arg=0x561546efbab0) at /home/afiestas/Projects/qt5/qtbase/src/corelib/thread/qthread_unix.cpp:361
#5  0x00007f94a70b2a9d in start_thread () from /usr/lib/libpthread.so.0
#6  0x00007f94a84f5b23 in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7f94a1f97880 (LWP 3138)):
[KCrash Handler]
#6  0x00007f94a90b10ac in QTextEngine::shape (this=0x5615478ed0c0, item=item@entry=0) at /home/afiestas/Projects/qt5/qtbase/src/gui/text/qtextengine.cpp:1982
#7  0x00007f94a90c5e5b in QTextLine::xToCursor (this=0x7ffc9b666368, _x=<optimized out>, cpos=QTextLine::CursorBetweenCharacters) at /home/afiestas/Projects/qt5/qtbase/src/gui/text/qtextlayout.cpp:2885
#8  0x00007f94aaae40c0 in KateRenderer::paintTextLine (this=0x56154728ce20, paint=..., range=..., xStart=0, xEnd=1356, cursor=0x7ffc9b666628, flags=...) at /home/afiestas/Projects/kde5/source/ktexteditor/src/render/katerenderer.cpp:701
#9  0x00007f94aab4fdfd in KateViewInternal::paintEvent (this=0x5615470cdb70, e=0x7ffc9b666980) at /home/afiestas/Projects/kde5/source/ktexteditor/src/view/kateviewinternal.cpp:3032
#10 0x00007f94a9604d88 in QWidget::event (this=0x5615470cdb70, event=0x7ffc9b666980) at /home/afiestas/Projects/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8935
#11 0x00007f94a95c5601 in QApplicationPrivate::notify_helper (this=this@entry=0x561546edc540, receiver=receiver@entry=0x5615470cdb70, e=e@entry=0x7ffc9b666980) at /home/afiestas/Projects/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3753
#12 0x00007f94a95ccc40 in QApplication::notify (this=0x7ffc9b667770, receiver=0x5615470cdb70, e=0x7ffc9b666980) at /home/afiestas/Projects/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3500
#13 0x00007f94a8b63f79 in QCoreApplication::notifyInternal2 (receiver=0x5615470cdb70, event=0x7ffc9b666980) at ../../include/QtCore/5.12.0/QtCore/private/../../../../../../../qtbase/src/corelib/thread/qthread_p.h:322
#14 0x00007f94a95fd985 in QWidgetPrivate::sendPaintEvent (this=this@entry=0x5615473af2b0, toBePainted=...) at /home/afiestas/Projects/qt5/qtbase/src/widgets/kernel/qwidget.cpp:5675
#15 0x00007f94a95fe247 in QWidgetPrivate::drawWidget (this=this@entry=0x5615473af2b0, pdev=0x5615470bd640, rgn=..., offset=..., flags=4, sharedPainter=sharedPainter@entry=0x0, backingStore=<optimized out>) at /home/afiestas/Projects/qt5/qtbase/src/widgets/kernel/qwidget.cpp:5615
#16 0x00007f94a95d5127 in QWidgetBackingStore::doSync (this=0x5615474e7310) at /home/afiestas/Projects/qt5/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:1417
#17 0x00007f94a95d5339 in QWidgetBackingStore::sync (this=0x5615474e7310) at /home/afiestas/Projects/qt5/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:1204
#18 0x00007f94a95ed0f5 in QWidgetPrivate::syncBackingStore (this=0x561546fa0070) at /home/afiestas/Projects/qt5/qtbase/src/widgets/kernel/qwidget.cpp:1955
#19 0x00007f94a9604eb8 in QWidget::event (this=this@entry=0x561546fa3590, event=event@entry=0x56154794b730) at /home/afiestas/Projects/qt5/qtbase/src/widgets/kernel/qwidget.cpp:9236
#20 0x00007f94a970cad4 in QMainWindow::event (this=0x561546fa3590, event=0x56154794b730) at /home/afiestas/Projects/qt5/qtbase/src/widgets/widgets/qmainwindow.cpp:1339
#21 0x00007f94aa38187c in KMainWindow::event (this=0x561546fa3590, ev=0x56154794b730) at /home/afiestas/Projects/kde5/source/kxmlgui/src/kmainwindow.cpp:871
#22 0x00007f94aa3cbaeb in KXmlGuiWindow::event (this=0x561546fa3590, ev=0x56154794b730) at /home/afiestas/Projects/kde5/source/kxmlgui/src/kxmlguiwindow.cpp:119
#23 0x00007f94a95c5601 in QApplicationPrivate::notify_helper (this=this@entry=0x561546edc540, receiver=receiver@entry=0x561546fa3590, e=e@entry=0x56154794b730) at /home/afiestas/Projects/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3753
#24 0x00007f94a95ccc40 in QApplication::notify (this=0x7ffc9b667770, receiver=0x561546fa3590, e=0x56154794b730) at /home/afiestas/Projects/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3500
#25 0x00007f94a8b63f79 in QCoreApplication::notifyInternal2 (receiver=0x561546fa3590, event=0x56154794b730) at ../../include/QtCore/5.12.0/QtCore/private/../../../../../../../qtbase/src/corelib/thread/qthread_p.h:322
#26 0x00007f94a8b66f77 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x561546ed36d0) at /home/afiestas/Projects/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1799
#27 0x00007f94a8bb9243 in postEventSourceDispatch (s=0x561546f3fcd0) at /home/afiestas/Projects/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:276
#28 0x00007f94a456ba2f in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#29 0x00007f94a456d5e9 in ?? () from /usr/lib/libglib-2.0.so.0
#30 0x00007f94a456d62e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#31 0x00007f94a8bb8853 in QEventDispatcherGlib::processEvents (this=0x561546f4cce0, flags=...) at /home/afiestas/Projects/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:422
#32 0x00007f94a8b62c4b in QEventLoop::exec (this=this@entry=0x7ffc9b667610, flags=..., flags@entry=...) at ../../include/QtCore/../../../../qtbase/src/corelib/global/qflags.h:140
#33 0x00007f94a8b6adb2 in QCoreApplication::exec () at ../../include/QtCore/../../../../qtbase/src/corelib/global/qflags.h:120
#34 0x00005615459da71c in main (argc=<optimized out>, argv=<optimized out>) at /home/afiestas/Projects/kde5/source/kate/kwrite/main.cpp:294
[Inferior 1 (process 3138) detached]

Reported using DrKonqi
Comment 1 Lothar 2019-01-04 05:59:18 UTC
The search & replace stuff is recently heavy modified but has worked so far without trouble.

Happens this in all files or some special? 
How big was it e.g. and what kind of type C++, HTML, (which highlighting), untypical many columns, what ever.
Can you provide a test file when it is somehow special?
From master branch, last commit?
Comment 2 Dominik Haumann 2019-01-04 14:52:27 UTC
@Alex: Can you confirm this backtrace is the same as in https://bugreports.qt.io/browse/QTBUG-72754 ?

I think this is an upstream issue in Qt 5.12, and David proposed a fix there.
Comment 3 Christoph Cullmann 2019-06-08 15:26:13 UTC
This looks for me 1:1 like the backtrace in the Qt bugreport.
I consider this solved upstream, bad that we hit that with Qt <= 5.12.1...