Bug 408742 - Ktouch crashes when closing the Course and Keyboard Layout Editor
Summary: Ktouch crashes when closing the Course and Keyboard Layout Editor
Status: RESOLVED FIXED
Alias: None
Product: ktouch
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: HI crash
Target Milestone: ---
Assignee: Sebastian Gottfried
URL:
Keywords: drkonqi
: 408515 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-06-15 16:02 UTC by 1238tal
Modified: 2019-06-20 18:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.04.3


Attachments
attachment-11902-0.html (1.15 KB, text/html)
2019-06-20 15:41 UTC, 1238tal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 1238tal 2019-06-15 16:02:16 UTC
Application: ktouch (19.04.2)

Qt Version: 5.12.3
Frameworks Version: 5.59.0
Operating System: Linux 5.1.9-arch1-1-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
- What I was doing when the application crashed:

I use colemak-dh, a custom keyboard layout. Ktouch doesn't recognise it and defaults to English (US). I open the settings to try and change/select a different course but it always crashes the application when I close said settings window.

The crash can be reproduced every time.

-- Backtrace:
Application: Typewriting Trainer (ktouch), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fe4df470040 (LWP 17372))]

Thread 5 (Thread 0x7fe4caf4c700 (LWP 17379)):
#0  0x00007fe4e3339bac in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fe4e38ae91c in QWaitConditionPrivate::wait (deadline=..., this=0x55f48dd55320) at thread/qwaitcondition_unix.cpp:146
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x55f48dd707a0, deadline=...) at thread/qwaitcondition_unix.cpp:225
#3  0x00007fe4e38aea0a in QWaitCondition::wait (this=0x55f48dd707a8, mutex=0x55f48dd707a0, time=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qdeadlinetimer.h:68
#4  0x00007fe4e4b106ed in ?? () from /usr/lib/libQt5Quick.so.5
#5  0x00007fe4e4b1095c in ?? () from /usr/lib/libQt5Quick.so.5
#6  0x00007fe4e38a863c in QThreadPrivate::start (arg=0x55f48dd70720) at thread/qthread_unix.cpp:361
#7  0x00007fe4e3333a92 in start_thread () from /usr/lib/libpthread.so.0
#8  0x00007fe4e3447cd3 in clone () from /usr/lib/libc.so.6

Thread 4 (Thread 0x7fe4d495e700 (LWP 17376)):
#0  0x00007fe4e343d0d1 in poll () from /usr/lib/libc.so.6
#1  0x00007fe4e07417c0 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fe4e07418ae in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007fe4e3ab8984 in QEventDispatcherGlib::processEvents (this=0x7fe4c4000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fe4e3a624dc in QEventLoop::exec (this=this@entry=0x7fe4d495dd80, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#5  0x00007fe4e38a7239 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#6  0x00007fe4e47bd059 in ?? () from /usr/lib/libQt5Qml.so.5
#7  0x00007fe4e38a863c in QThreadPrivate::start (arg=0x55f48d285b90) at thread/qthread_unix.cpp:361
#8  0x00007fe4e3333a92 in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007fe4e3447cd3 in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7fe4d7fff700 (LWP 17375)):
#0  0x00007fe4e3438c54 in read () from /usr/lib/libc.so.6
#1  0x00007fe4e06ef961 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fe4e073ff70 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#3  0x00007fe4e0741766 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007fe4e07418ae in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0x00007fe4e3ab8984 in QEventDispatcherGlib::processEvents (this=0x7fe4cc000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0x00007fe4e3a624dc in QEventLoop::exec (this=this@entry=0x7fe4d7ffeda0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#7  0x00007fe4e38a7239 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#8  0x00007fe4e38a863c in QThreadPrivate::start (arg=0x55f48d2491d0) at thread/qthread_unix.cpp:361
#9  0x00007fe4e3333a92 in start_thread () from /usr/lib/libpthread.so.0
#10 0x00007fe4e3447cd3 in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fe4dcd1d700 (LWP 17374)):
#0  0x00007fe4e3438c54 in read () from /usr/lib/libc.so.6
#1  0x00007fe4e06ef961 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fe4e073ff70 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#3  0x00007fe4e0741766 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007fe4e07418ae in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0x00007fe4e3ab8984 in QEventDispatcherGlib::processEvents (this=0x7fe4d0000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0x00007fe4e3a624dc in QEventLoop::exec (this=this@entry=0x7fe4dcd1cd70, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#7  0x00007fe4e38a7239 in QThread::exec (this=this@entry=0x7fe4e30e1080 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#8  0x00007fe4e305fba6 in QDBusConnectionManager::run (this=0x7fe4e30e1080 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#9  0x00007fe4e38a863c in QThreadPrivate::start (arg=0x7fe4e30e1080 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:361
#10 0x00007fe4e3333a92 in start_thread () from /usr/lib/libpthread.so.0
#11 0x00007fe4e3447cd3 in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7fe4df470040 (LWP 17372)):
[KCrash Handler]
#6  std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=0xd0) at /usr/include/c++/8.3.0/bits/atomic_base.h:390
#7  QAtomicOps<int>::load<int> (_q_value=...) at /usr/include/qt/QtCore/qatomic_cxx11.h:227
#8  QBasicAtomicInteger<int>::load (this=0xd0) at /usr/include/qt/QtCore/qbasicatomic.h:103
#9  QtPrivate::RefCount::ref (this=0xd0) at /usr/include/qt/QtCore/qrefcount.h:55
#10 QString::QString (other=..., this=this@entry=0x7ffd68158870) at /usr/include/qt/QtCore/qstring.h:958
#11 Lesson::text (this=0x55f48e4e1090) at /usr/src/debug/ktouch-19.04.2/src/core/lesson.cpp:83
#12 0x000055f48b70f11c in CourseEditor::onLessonTextChanged (this=0x55f48dd59540) at /usr/src/debug/ktouch-19.04.2/src/editor/courseeditor.cpp:340
#13 CourseEditor::onLessonTextChanged (this=0x55f48dd59540) at /usr/src/debug/ktouch-19.04.2/src/editor/courseeditor.cpp:333
#14 0x00007fe4e3a8e31b in QtPrivate::QSlotObjectBase::call (a=0x7ffd68158940, r=0x55f48dd59540, this=0x55f48e2a72d0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#15 QMetaObject::activate (sender=0x55f48e29a100, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3776
#16 0x00007fe4e51eddf6 in QTextEdit::qt_static_metacall (_o=0x55f48e29a100, _c=<optimized out>, _id=<optimized out>, _a=0x7ffd68158a90) at .moc/moc_qtextedit.cpp:325
#17 0x00007fe4e3a8e1d7 in QMetaObject::activate (sender=0x55f48e29ea70, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3795
#18 0x00007fe4e5213ece in QWidgetTextControl::qt_static_metacall (_o=_o@entry=0x55f48e29ea70, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=0, _a=_a@entry=0x7ffd68158c10) at .moc/moc_qwidgettextcontrol_p.cpp:256
#19 0x00007fe4e52141a3 in QWidgetTextControl::qt_metacall (this=0x55f48e29ea70, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffd68158c10) at .moc/moc_qwidgettextcontrol_p.cpp:471
#20 0x00007fe4e3a8e298 in QMetaObject::activate (sender=0x55f48e29eac0, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3812
#21 0x00007fe4e4005f26 in QTextDocumentPrivate::finishEdit (this=0x55f48e29eb20) at text/qtextdocument_p.cpp:1246
#22 0x00007fe4e40062f3 in QTextDocumentPrivate::endEditBlock (this=<optimized out>) at text/qtextdocument_p.cpp:1201
#23 QTextDocumentPrivate::endEditBlock (this=<optimized out>) at text/qtextdocument_p.cpp:1184
#24 0x00007fe4e404a15e in QSyntaxHighlighter::setDocument (this=this@entry=0x55f48e297e20, doc=doc@entry=0x0) at text/qsyntaxhighlighter.cpp:341
#25 0x00007fe4e404a38a in QSyntaxHighlighter::~QSyntaxHighlighter (this=0x55f48e297e20, __in_chrg=<optimized out>) at text/qsyntaxhighlighter.cpp:323
#26 0x000055f48b6c9615 in LessonTextHighlighter::~LessonTextHighlighter (this=0x55f48e297e20, __in_chrg=<optimized out>) at /usr/include/qt/QtGui/qtextformat.h:391
#27 LessonTextHighlighter::~LessonTextHighlighter (this=0x55f48e297e20, __in_chrg=<optimized out>) at /usr/src/debug/build/src/ktouch_autogen/3HAKN7MTYQ/../../../../ktouch-19.04.2/src/editor/lessontexthighlighter.h:25
#28 0x00007fe4e3a8c08b in QObjectPrivate::deleteChildren (this=this@entry=0x55f48e297be0) at kernel/qobject.cpp:2010
#29 0x00007fe4e506422f in QWidget::~QWidget (this=0x55f48e297b60, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#30 0x000055f48b6c8a2e in LessonTextEditor::~LessonTextEditor (this=0x55f48e297b60, __in_chrg=<optimized out>) at /usr/src/debug/ktouch-19.04.2/src/editor/lessontexteditor.h:26
#31 LessonTextEditor::~LessonTextEditor (this=0x55f48e297b60, __in_chrg=<optimized out>) at /usr/src/debug/ktouch-19.04.2/src/editor/lessontexteditor.h:26
#32 0x00007fe4e3a8c08b in QObjectPrivate::deleteChildren (this=this@entry=0x55f48e292df0) at kernel/qobject.cpp:2010
#33 0x00007fe4e506422f in QWidget::~QWidget (this=0x55f48e292db0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#34 0x00007fe4e506444a in QWidget::~QWidget (this=0x55f48e292db0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1570
#35 0x00007fe4e3a8c08b in QObjectPrivate::deleteChildren (this=this@entry=0x55f48e281b20) at kernel/qobject.cpp:2010
#36 0x00007fe4e506422f in QWidget::~QWidget (this=0x55f48e281ae0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#37 0x00007fe4e51cfaea in QSplitter::~QSplitter (this=0x55f48e281ae0, __in_chrg=<optimized out>) at widgets/qsplitter.cpp:972
#38 0x00007fe4e3a8c08b in QObjectPrivate::deleteChildren (this=this@entry=0x55f48e284270) at kernel/qobject.cpp:2010
#39 0x00007fe4e506422f in QWidget::~QWidget (this=0x55f48e2818f0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#40 0x00007fe4e515686a in QGroupBox::~QGroupBox (this=0x55f48e2818f0, __in_chrg=<optimized out>) at widgets/qgroupbox.cpp:201
#41 0x00007fe4e3a8c08b in QObjectPrivate::deleteChildren (this=this@entry=0x55f48e26f480) at kernel/qobject.cpp:2010
#42 0x00007fe4e506422f in QWidget::~QWidget (this=0x55f48dd59540, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#43 0x000055f48b6c8e8e in CourseEditor::~CourseEditor (this=0x55f48dd59540, __in_chrg=<optimized out>) at /usr/src/debug/build/src/ktouch_autogen/3HAKN7MTYQ/../../../../ktouch-19.04.2/src/editor/courseeditor.h:34
#44 CourseEditor::~CourseEditor (this=0x55f48dd59540, __in_chrg=<optimized out>) at /usr/src/debug/build/src/ktouch_autogen/3HAKN7MTYQ/../../../../ktouch-19.04.2/src/editor/courseeditor.h:34
#45 0x00007fe4e3a8c08b in QObjectPrivate::deleteChildren (this=this@entry=0x55f48ddbbfa0) at kernel/qobject.cpp:2010
#46 0x00007fe4e506422f in QWidget::~QWidget (this=0x55f48e26e500, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#47 0x00007fe4e51d08fa in QStackedWidget::~QStackedWidget (this=0x55f48e26e500, __in_chrg=<optimized out>) at widgets/qstackedwidget.cpp:145
#48 0x00007fe4e3a8c08b in QObjectPrivate::deleteChildren (this=this@entry=0x55f48e268ab0) at kernel/qobject.cpp:2010
#49 0x00007fe4e506422f in QWidget::~QWidget (this=0x55f48e268a70, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#50 0x00007fe4e51cfaea in QSplitter::~QSplitter (this=0x55f48e268a70, __in_chrg=<optimized out>) at widgets/qsplitter.cpp:972
#51 0x00007fe4e3a8c08b in QObjectPrivate::deleteChildren (this=this@entry=0x55f48dde1b80) at kernel/qobject.cpp:2010
#52 0x00007fe4e506422f in QWidget::~QWidget (this=0x55f48e2423d0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#53 0x000055f48b6c884e in ResourceEditorWidget::~ResourceEditorWidget (this=0x55f48e2423d0, __in_chrg=<optimized out>) at /usr/src/debug/build/src/ktouch_autogen/3HAKN7MTYQ/../../../../ktouch-19.04.2/src/editor/resourceeditorwidget.h:32
#54 ResourceEditorWidget::~ResourceEditorWidget (this=0x55f48e2423d0, __in_chrg=<optimized out>) at /usr/src/debug/build/src/ktouch_autogen/3HAKN7MTYQ/../../../../ktouch-19.04.2/src/editor/resourceeditorwidget.h:32
#55 0x00007fe4e3a8c08b in QObjectPrivate::deleteChildren (this=this@entry=0x55f48e240f30) at kernel/qobject.cpp:2010
#56 0x00007fe4e506422f in QWidget::~QWidget (this=0x55f48e240230, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#57 0x00007fe4e582c6a5 in KMainWindow::~KMainWindow (this=0x55f48e240230, __in_chrg=<optimized out>) at /usr/src/debug/kxmlgui-5.59.0/src/kmainwindow.cpp:405
#58 0x000055f48b702119 in ResourceEditor::~ResourceEditor (this=0x55f48e240230, __in_chrg=<optimized out>) at /usr/src/debug/ktouch-19.04.2/src/editor/resourceeditor.cpp:122
#59 0x00007fe4e3a8eaa1 in QObject::event (this=this@entry=0x55f48e240230, e=e@entry=0x55f48e334440) at kernel/qobject.cpp:1251
#60 0x00007fe4e5068fac in QWidget::event (this=this@entry=0x55f48e240230, event=event@entry=0x55f48e334440) at kernel/qwidget.cpp:9388
#61 0x00007fe4e5176405 in QMainWindow::event (this=this@entry=0x55f48e240230, event=event@entry=0x55f48e334440) at widgets/qmainwindow.cpp:1339
#62 0x00007fe4e582ec2c in KMainWindow::event (this=0x55f48e240230, ev=0x55f48e334440) at /usr/src/debug/kxmlgui-5.59.0/src/kmainwindow.cpp:877
#63 0x00007fe4e5027da4 in QApplicationPrivate::notify_helper (this=this@entry=0x55f48d1ab2f0, receiver=receiver@entry=0x55f48e240230, e=e@entry=0x55f48e334440) at kernel/qapplication.cpp:3736
#64 0x00007fe4e502f3c1 in QApplication::notify (this=0x7ffd68159bd0, receiver=0x55f48e240230, e=0x55f48e334440) at kernel/qapplication.cpp:3483
#65 0x00007fe4e3a63849 in QCoreApplication::notifyInternal2 (receiver=0x55f48e240230, event=0x55f48e334440) at ../../include/QtCore/5.12.3/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:322
#66 0x00007fe4e3a66928 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55f48d1a6250) at kernel/qcoreapplication.cpp:1799
#67 0x00007fe4e3ab9394 in postEventSourceDispatch (s=0x55f48d20b110) at kernel/qeventdispatcher_glib.cpp:276
#68 0x00007fe4e073f90f in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#69 0x00007fe4e0741869 in ?? () from /usr/lib/libglib-2.0.so.0
#70 0x00007fe4e07418ae in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#71 0x00007fe4e3ab8969 in QEventDispatcherGlib::processEvents (this=0x55f48d21bda0, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#72 0x00007fe4e3a624dc in QEventLoop::exec (this=this@entry=0x7ffd68159ac0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#73 0x00007fe4e3a6a596 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#74 0x000055f48b6bc9d3 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/ktouch-19.04.2/src/main.cpp:130
[Inferior 1 (process 17372) detached]

Possible duplicates by query: bug 384419.

Reported using DrKonqi
Comment 1 Antonio Rojas 2019-06-15 16:33:21 UTC
This is caused by 0631c779a3348bfc48325c0c088be3da668492e3
Comment 2 Antonio Rojas 2019-06-15 16:34:14 UTC
*** Bug 408515 has been marked as a duplicate of this bug. ***
Comment 3 Sebastian Gottfried 2019-06-19 14:46:16 UTC
Git commit 0ad223458ca9170d82a861cd882116d0c4f731d1 by Sebastian Gottfried.
Committed on 19/06/2019 at 14:45.
Pushed by gottfried into branch 'master'.

Fix Crash when Closing Resource Editor

We need to clear our pointer to the selected lesson before we delete
the course containing it.
FIXED-IN: 19.08.0

M  +7    -2    src/editor/courseeditor.cpp
M  +1    -0    src/editor/courseeditor.h

https://commits.kde.org/ktouch/0ad223458ca9170d82a861cd882116d0c4f731d1
Comment 4 Antonio Rojas 2019-06-19 15:28:46 UTC
what about 19.04 branch?
Comment 5 1238tal 2019-06-19 23:31:24 UTC
(In reply to Sebastian Gottfried from comment #3)
> Git commit 0ad223458ca9170d82a861cd882116d0c4f731d1 by Sebastian Gottfried.
> Committed on 19/06/2019 at 14:45.
> Pushed by gottfried into branch 'master'.
> 
> Fix Crash when Closing Resource Editor
> 
> We need to clear our pointer to the selected lesson before we delete
> the course containing it.
> FIXED-IN: 19.08.0
> 
> M  +7    -2    src/editor/courseeditor.cpp
> M  +1    -0    src/editor/courseeditor.h
> 
> https://commits.kde.org/ktouch/0ad223458ca9170d82a861cd882116d0c4f731d1

Thanks for the fix. I noticed a second crash when:
1. Create a custom Course, e.g. "My testing words."
2. Click on the Title, Description, etc. Anything that involves editing a text field, after the course has been created and is in the list with the default courses.
3. While cursor is in text box, close the Course and Keyboard Layout Editor Window.
4. Crashes similar to this.
Comment 6 Sebastian Gottfried 2019-06-20 07:35:59 UTC
Git commit d8a8882dae75307e8f49820fa73e729516a4d195 by Sebastian Gottfried.
Committed on 20/06/2019 at 07:35.
Pushed by gottfried into branch 'Applications/19.04'.

Fix Crash when Closing Resource Editor

We need to clear our pointer to the selected lesson before we delete
the course containing it.
FIXED-IN: 19.04.3

M  +7    -2    src/editor/courseeditor.cpp
M  +1    -0    src/editor/courseeditor.h

https://commits.kde.org/ktouch/d8a8882dae75307e8f49820fa73e729516a4d195
Comment 7 Sebastian Gottfried 2019-06-20 07:42:19 UTC
(In reply to 1238tal from comment #5)
> (In reply to Sebastian Gottfried from comment #3)
> > Git commit 0ad223458ca9170d82a861cd882116d0c4f731d1 by Sebastian Gottfried.
> > Committed on 19/06/2019 at 14:45.
> > Pushed by gottfried into branch 'master'.
> > 
> > Fix Crash when Closing Resource Editor
> > 
> > We need to clear our pointer to the selected lesson before we delete
> > the course containing it.
> > FIXED-IN: 19.08.0
> > 
> > M  +7    -2    src/editor/courseeditor.cpp
> > M  +1    -0    src/editor/courseeditor.h
> > 
> > https://commits.kde.org/ktouch/0ad223458ca9170d82a861cd882116d0c4f731d1
> 
> Thanks for the fix. I noticed a second crash when:
> 1. Create a custom Course, e.g. "My testing words."
> 2. Click on the Title, Description, etc. Anything that involves editing a
> text field, after the course has been created and is in the list with the
> default courses.
> 3. While cursor is in text box, close the Course and Keyboard Layout Editor
> Window.
> 4. Crashes similar to this.
With the fix for the first crash, KTouch doesn't crash with the steps above.
Comment 8 1238tal 2019-06-20 12:39:44 UTC
Here is the backtrace for the crash. I notice it happens more regularly it editing the lesson Description field.

Application: Typewriting Trainer (ktouch), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f873eff3040 (LWP 6350))]

Thread 5 (Thread 0x7f872aac8700 (LWP 6357)):
#0  0x00007f8742ec63c5 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007f874348fcf0 in QWaitConditionPrivate::wait (deadline=..., this=0x55a63b07afd0) at thread/qwaitcondition_unix.cpp:146
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x55a63b07c2c0, deadline=...) at thread/qwaitcondition_unix.cpp:225
#3  0x00007f874348fde2 in QWaitCondition::wait (this=0x55a63b07c2c8, mutex=0x55a63b07c2c0, time=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qdeadlinetimer.h:68
#4  0x00007f874472f4cd in ?? () from /usr/lib/libQt5Quick.so.5
#5  0x00007f874472f73c in ?? () from /usr/lib/libQt5Quick.so.5
#6  0x00007f8743489bf0 in QThreadPrivate::start (arg=0x55a63b07c240) at thread/qthread_unix.cpp:361
#7  0x00007f8742ec057f in start_thread () from /usr/lib/libpthread.so.0
#8  0x00007f8742fd3f13 in clone () from /usr/lib/libc.so.6

Thread 4 (Thread 0x7f872bfff700 (LWP 6355)):
#0  0x00007f87402c3bb7 in ?? () from /usr/lib/libglib-2.0.so.0
#1  0x00007f87402c3d9f in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#2  0x00007f87402c5766 in ?? () from /usr/lib/libglib-2.0.so.0
#3  0x00007f87402c58ae in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0x00007f87436a627c in QEventDispatcherGlib::processEvents (this=0x7f8724000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007f874364d3ac in QEventLoop::exec (this=this@entry=0x7f872bffed80, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#6  0x00007f87434889c5 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#7  0x00007f87443da969 in ?? () from /usr/lib/libQt5Qml.so.5
#8  0x00007f8743489bf0 in QThreadPrivate::start (arg=0x55a63a6a2d80) at thread/qthread_unix.cpp:361
#9  0x00007f8742ec057f in start_thread () from /usr/lib/libpthread.so.0
#10 0x00007f8742fd3f13 in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7f8737fff700 (LWP 6354)):
#0  0x00007f87402733a9 in g_mutex_lock () from /usr/lib/libglib-2.0.so.0
#1  0x00007f87402c4ee8 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#2  0x00007f87402c56e6 in ?? () from /usr/lib/libglib-2.0.so.0
#3  0x00007f87402c58ae in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0x00007f87436a627c in QEventDispatcherGlib::processEvents (this=0x7f872c000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007f874364d3ac in QEventLoop::exec (this=this@entry=0x7f8737ffeda0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#6  0x00007f87434889c5 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#7  0x00007f8743489bf0 in QThreadPrivate::start (arg=0x55a63a681ec0) at thread/qthread_unix.cpp:361
#8  0x00007f8742ec057f in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007f8742fd3f13 in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7f873c89d700 (LWP 6353)):
#0  0x00007f8740273414 in g_mutex_unlock () from /usr/lib/libglib-2.0.so.0
#1  0x00007f87402c58b9 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#2  0x00007f87436a627c in QEventDispatcherGlib::processEvents (this=0x7f8730000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#3  0x00007f874364d3ac in QEventLoop::exec (this=this@entry=0x7f873c89cd70, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#4  0x00007f87434889c5 in QThread::exec (this=this@entry=0x7f8742c67080 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#5  0x00007f8742be3b37 in QDBusConnectionManager::run (this=0x7f8742c67080 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#6  0x00007f8743489bf0 in QThreadPrivate::start (arg=0x7f8742c67080 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:361
#7  0x00007f8742ec057f in start_thread () from /usr/lib/libpthread.so.0
#8  0x00007f8742fd3f13 in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7f873eff3040 (LWP 6350)):
[KCrash Handler]
#6  0x00007f8744327702 in QQmlData::isSignalConnected(QAbstractDeclarativeData*, QObject const*, int) () from /usr/lib/libQt5Qml.so.5
#7  0x00007f8743679b9a in QObjectPrivate::isDeclarativeSignalConnected (signal_index=7, this=<optimized out>) at kernel/qobject_p.h:110
#8  QMetaObject::activate (sender=0x55a63b83d5f0, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3669
#9  0x000055a63a1dd6e7 in CourseEditor::setLessonText (this=this@entry=0x55a63b129580, newText=...) at /usr/src/debug/ktouch-19.04.2/src/editor/courseeditor.cpp:233
#10 0x000055a63a1dd85f in CourseEditor::onLessonTextChanged (this=0x55a63b129580) at /usr/src/debug/ktouch-19.04.2/src/editor/courseeditor.cpp:342
#11 CourseEditor::onLessonTextChanged (this=0x55a63b129580) at /usr/src/debug/ktouch-19.04.2/src/editor/courseeditor.cpp:333
#12 0x00007f874367a460 in QtPrivate::QSlotObjectBase::call (a=0x7ffc77b70b10, r=0x55a63b129580, this=0x55a63b6976c0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#13 QMetaObject::activate (sender=0x55a63b67b380, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3781
#14 0x00007f8744e1da25 in QTextEdit::qt_static_metacall (_o=0x55a63b67b380, _c=<optimized out>, _id=<optimized out>, _a=0x7ffc77b70c60) at .moc/moc_qtextedit.cpp:325
#15 0x00007f874367a2f9 in QMetaObject::activate (sender=0x55a63b67fec0, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3801
#16 0x00007f8744e444f1 in QWidgetTextControl::qt_static_metacall (_o=_o@entry=0x55a63b67fec0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=0, _a=_a@entry=0x7ffc77b70de0) at .moc/moc_qwidgettextcontrol_p.cpp:256
#17 0x00007f8744e448e3 in QWidgetTextControl::qt_metacall (this=0x55a63b67fec0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffc77b70de0) at .moc/moc_qwidgettextcontrol_p.cpp:471
#18 0x00007f874367a3bd in QMetaObject::activate (sender=0x55a63b67ff10, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3819
#19 0x00007f8743c045fe in QTextDocumentPrivate::finishEdit (this=0x55a63b67ff70) at text/qtextdocument_p.cpp:1246
#20 0x00007f8743c049c8 in QTextDocumentPrivate::endEditBlock (this=<optimized out>) at text/qtextdocument_p.cpp:1201
#21 QTextDocumentPrivate::endEditBlock (this=<optimized out>) at text/qtextdocument_p.cpp:1184
#22 0x00007f8743c4aa4e in QSyntaxHighlighter::setDocument (this=this@entry=0x55a63b6790a0, doc=doc@entry=0x0) at text/qsyntaxhighlighter.cpp:341
#23 0x00007f8743c4ac7a in QSyntaxHighlighter::~QSyntaxHighlighter (this=0x55a63b6790a0, __in_chrg=<optimized out>) at text/qsyntaxhighlighter.cpp:323
#24 0x000055a63a192e11 in LessonTextHighlighter::~LessonTextHighlighter (this=0x55a63b6790a0, __in_chrg=<optimized out>) at /usr/include/c++/9.1.0/bits/atomic_base.h:326
#25 LessonTextHighlighter::~LessonTextHighlighter (this=0x55a63b6790a0, __in_chrg=<optimized out>) at /usr/src/debug/build/src/ktouch_autogen/3HAKN7MTYQ/../../../../ktouch-19.04.2/src/editor/lessontexthighlighter.h:25
#26 0x00007f874367803e in QObjectPrivate::deleteChildren (this=this@entry=0x55a63b678e60) at kernel/qobject.cpp:2016
#27 0x00007f8744c87ae3 in QWidget::~QWidget (this=0x55a63b678de0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#28 0x000055a63a191eee in LessonTextEditor::~LessonTextEditor (this=0x55a63b678de0, __in_chrg=<optimized out>) at /usr/src/debug/ktouch-19.04.2/src/editor/lessontexteditor.h:26
#29 LessonTextEditor::~LessonTextEditor (this=0x55a63b678de0, __in_chrg=<optimized out>) at /usr/src/debug/ktouch-19.04.2/src/editor/lessontexteditor.h:26
#30 0x00007f874367803e in QObjectPrivate::deleteChildren (this=this@entry=0x55a63b673bb0) at kernel/qobject.cpp:2016
#31 0x00007f8744c87ae3 in QWidget::~QWidget (this=0x55a63b673b70, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#32 0x00007f8744c87cea in QWidget::~QWidget (this=0x55a63b673b70, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1570
#33 0x00007f874367803e in QObjectPrivate::deleteChildren (this=this@entry=0x55a63b662460) at kernel/qobject.cpp:2016
#34 0x00007f8744c87ae3 in QWidget::~QWidget (this=0x55a63b662420, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#35 0x00007f8744dff7ea in QSplitter::~QSplitter (this=0x55a63b662420, __in_chrg=<optimized out>) at widgets/qsplitter.cpp:972
#36 0x00007f874367803e in QObjectPrivate::deleteChildren (this=this@entry=0x55a63b664bb0) at kernel/qobject.cpp:2016
#37 0x00007f8744c87ae3 in QWidget::~QWidget (this=0x55a63b662230, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#38 0x00007f8744d8326a in QGroupBox::~QGroupBox (this=0x55a63b662230, __in_chrg=<optimized out>) at widgets/qgroupbox.cpp:201
#39 0x00007f874367803e in QObjectPrivate::deleteChildren (this=this@entry=0x55a63b64f8e0) at kernel/qobject.cpp:2016
#40 0x00007f8744c87ae3 in QWidget::~QWidget (this=0x55a63b129580, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#41 0x000055a63a19234e in CourseEditor::~CourseEditor (this=0x55a63b129580, __in_chrg=<optimized out>) at /usr/src/debug/build/src/ktouch_autogen/3HAKN7MTYQ/../../../../ktouch-19.04.2/src/editor/courseeditor.h:34
#42 CourseEditor::~CourseEditor (this=0x55a63b129580, __in_chrg=<optimized out>) at /usr/src/debug/build/src/ktouch_autogen/3HAKN7MTYQ/../../../../ktouch-19.04.2/src/editor/courseeditor.h:34
#43 0x00007f874367803e in QObjectPrivate::deleteChildren (this=this@entry=0x55a63a75b3b0) at kernel/qobject.cpp:2016
#44 0x00007f8744c87ae3 in QWidget::~QWidget (this=0x55a63b64e960, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#45 0x00007f8744e0062a in QStackedWidget::~QStackedWidget (this=0x55a63b64e960, __in_chrg=<optimized out>) at widgets/qstackedwidget.cpp:145
#46 0x00007f874367803e in QObjectPrivate::deleteChildren (this=this@entry=0x55a63b21f830) at kernel/qobject.cpp:2016
#47 0x00007f8744c87ae3 in QWidget::~QWidget (this=0x55a63b648aa0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#48 0x00007f8744dff7ea in QSplitter::~QSplitter (this=0x55a63b648aa0, __in_chrg=<optimized out>) at widgets/qsplitter.cpp:972
#49 0x00007f874367803e in QObjectPrivate::deleteChildren (this=this@entry=0x55a63b435d70) at kernel/qobject.cpp:2016
#50 0x00007f8744c87ae3 in QWidget::~QWidget (this=0x55a63b622800, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#51 0x000055a63a191d0e in ResourceEditorWidget::~ResourceEditorWidget (this=0x55a63b622800, __in_chrg=<optimized out>) at /usr/src/debug/build/src/ktouch_autogen/3HAKN7MTYQ/../../../../ktouch-19.04.2/src/editor/resourceeditorwidget.h:32
#52 ResourceEditorWidget::~ResourceEditorWidget (this=0x55a63b622800, __in_chrg=<optimized out>) at /usr/src/debug/build/src/ktouch_autogen/3HAKN7MTYQ/../../../../ktouch-19.04.2/src/editor/resourceeditorwidget.h:32
#53 0x00007f874367803e in QObjectPrivate::deleteChildren (this=this@entry=0x55a63b620f00) at kernel/qobject.cpp:2016
#54 0x00007f8744c87ae3 in QWidget::~QWidget (this=0x55a63b620240, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1708
#55 0x00007f874546e6a5 in KMainWindow::~KMainWindow() () from /usr/lib/libKF5XmlGui.so.5
#56 0x000055a63a1d0749 in ResourceEditor::~ResourceEditor (this=0x55a63b620240, __in_chrg=<optimized out>) at /usr/src/debug/ktouch-19.04.2/src/editor/resourceeditor.cpp:122
#57 0x00007f874367ab51 in QObject::event (this=this@entry=0x55a63b620240, e=e@entry=0x55a63c213be0) at kernel/qobject.cpp:1251
#58 0x00007f8744c8c3cf in QWidget::event (this=this@entry=0x55a63b620240, event=event@entry=0x55a63c213be0) at kernel/qwidget.cpp:9397
#59 0x00007f8744da31c5 in QMainWindow::event (this=0x55a63b620240, event=0x55a63c213be0) at widgets/qmainwindow.cpp:1339
#60 0x00007f8745470c2c in KMainWindow::event(QEvent*) () from /usr/lib/libKF5XmlGui.so.5
#61 0x00007f8744c49485 in QApplicationPrivate::notify_helper (this=this@entry=0x55a63a5e42f0, receiver=receiver@entry=0x55a63b620240, e=e@entry=0x55a63c213be0) at kernel/qapplication.cpp:3737
#62 0x00007f8744c529b1 in QApplication::notify (this=0x7ffc77b71d60, receiver=0x55a63b620240, e=0x55a63c213be0) at kernel/qapplication.cpp:3483
#63 0x00007f874364e782 in QCoreApplication::notifyInternal2 (receiver=0x55a63b620240, event=0x55a63c213be0) at ../../include/QtCore/../../src/corelib/kernel/qobject.h:142
#64 0x00007f8743651459 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55a63a5df250) at kernel/qcoreapplication.cpp:1821
#65 0x00007f87436a6c64 in postEventSourceDispatch (s=0x55a63a653ae0) at kernel/qeventdispatcher_glib.cpp:276
#66 0x00007f87402c390f in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#67 0x00007f87402c5869 in ?? () from /usr/lib/libglib-2.0.so.0
#68 0x00007f87402c58ae in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#69 0x00007f87436a6263 in QEventDispatcherGlib::processEvents (this=0x55a63a654df0, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#70 0x00007f874364d3ac in QEventLoop::exec (this=this@entry=0x7ffc77b71c60, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#71 0x00007f8743655056 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#72 0x000055a63a1859cc in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/ktouch-19.04.2/src/main.cpp:130
[Inferior 1 (process 6350) detached]
Comment 9 Sebastian Gottfried 2019-06-20 14:16:01 UTC
> Here is the backtrace for the crash. I notice it happens more regularly it
> editing the lesson Description field.
Are you running the released version of KTouch (19.04.2) or the latest commit from the branch Application/19.04?
Comment 10 1238tal 2019-06-20 15:41:36 UTC
Created attachment 121035 [details]
attachment-11902-0.html

ktouch 19.04.2-2 as per
https://www.archlinux.org/packages/extra/x86_64/ktouch/

On Thu., Jun. 20, 2019, 07:16 Sebastian Gottfried, <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=408742
>
> --- Comment #9 from Sebastian Gottfried <sebastian.gottfried@posteo.de>
> ---
> > Here is the backtrace for the crash. I notice it happens more regularly
> it
> > editing the lesson Description field.
> Are you running the released version of KTouch (19.04.2) or the latest
> commit
> from the branch Application/19.04?
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 11 Krisztián Hordósi 2019-06-20 18:26:31 UTC
I'm running the latest Arch package from the extra repository versioned 19.04.2-2.
So I guess I'll be waiting until the .3 release.

Thanks for the effort! :)