Bug 455644 - Crashes on exit: [~TextEdit → TextEdit::updateRemainingCharsCount]
Summary: Crashes on exit: [~TextEdit → TextEdit::updateRemainingCharsCount]
Status: RESOLVED FIXED
Alias: None
Product: choqok
Classification: Applications
Component: general (show other bugs)
Version: 1.7.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Andrea Scarpino
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-06-20 10:33 UTC by Mathias Homann
Modified: 2022-06-21 14:07 UTC (History)
1 user (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 Mathias Homann 2022-06-20 10:33:34 UTC
Application: choqok (1.7.0)

Qt Version: 5.15.2
Frameworks Version: 5.95.0
Operating System: Linux 5.18.4-1-default x86_64
Windowing System: X11
Distribution: "openSUSE Tumbleweed"
DrKonqi: 5.25.0 [KCrashBackend]

-- Information about the crash:
reproduce: run choqok, press ctrl-q - it will segfault on exit.

The crash can be reproduced every time.

-- Backtrace:
Application: Choqok (choqok), signal: Segmentation fault

[KCrash Handler]
#4  0xfffffffffffffff0 in ?? ()
#5  0x00007f938a712b3f in QtPrivate::QSlotObjectBase::call (a=0x7ffdf4f82c40, r=0x55ddcc0257f0, this=0x55ddcc1788d0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#6  doActivate<false> (sender=0x55ddcc0257f0, signal_index=7, argv=0x7ffdf4f82c40) at kernel/qobject.cpp:3886
#7  0x00007f938a712b6c in doActivate<false> (sender=0x55ddcc048660, signal_index=3, argv=0x7ffdf4f82d00) at kernel/qobject.cpp:3898
#8  0x00007f938b59ef83 in QWidgetTextControl::qt_metacall (this=0x55ddcc048660, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffdf4f82df0) at .moc/moc_qwidgettextcontrol_p.cpp:489
#9  0x00007f938a7128aa in doActivate<false> (sender=0x55ddcc0485f0, signal_index=4, argv=0x7ffdf4f82df0) at kernel/qobject.cpp:3912
#10 0x00007f938a70beff in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f938b109820 <QTextDocument::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x0) at kernel/qobject.cpp:3946
#11 0x00007f938aff7f33 in QTextDocument::contentsChanged (this=<optimized out>) at .moc/moc_qtextdocument.cpp:427
#12 0x00007f938aca931c in QTextDocumentPrivate::finishEdit (this=0x55ddcb7d5d60) at text/qtextdocument_p.cpp:1247
#13 0x00007f938aca96f5 in QTextDocumentPrivate::endEditBlock (this=<optimized out>) at text/qtextdocument_p.cpp:1203
#14 0x00007f938acf4951 in QSyntaxHighlighter::setDocument (this=0x55ddcf941ab0, doc=0x0) at text/qsyntaxhighlighter.cpp:342
#15 0x00007f938acf4b89 in QSyntaxHighlighter::~QSyntaxHighlighter (this=0x55ddcf941ab0, __in_chrg=<optimized out>) at text/qsyntaxhighlighter.cpp:324
#16 0x00007f9387ffa469 in Sonnet::Highlighter::~Highlighter (this=<optimized out>, this=<optimized out>) at /usr/src/debug/sonnet-5.95.0-1.1.x86_64/src/ui/highlighter.cpp:165
#17 0x00007f938a70505e in QObjectPrivate::deleteChildren (this=0x55ddcf946b40) at kernel/qobject.cpp:2104
#18 0x00007f938a710bc0 in QObject::~QObject (this=this@entry=0x55ddcacf79c0, __in_chrg=<optimized out>) at kernel/qobject.cpp:1082
#19 0x00007f9387ffaaae in Sonnet::SpellCheckDecorator::~SpellCheckDecorator (this=<optimized out>, this=<optimized out>) at /usr/src/debug/sonnet-5.95.0-1.1.x86_64/src/ui/spellcheckdecorator.cpp:225
#20 0x00007f938b925de3 in KTextDecorator::~KTextDecorator (this=<optimized out>, this=<optimized out>) at /usr/src/debug/ktextwidgets-5.95.0-1.1.x86_64/src/widgets/ktextedit.cpp:32
#21 KTextDecorator::~KTextDecorator (this=<optimized out>, this=<optimized out>) at /usr/src/debug/ktextwidgets-5.95.0-1.1.x86_64/src/widgets/ktextedit.cpp:32
#22 0x00007f938b91bb02 in KTextEditPrivate::~KTextEditPrivate (this=<optimized out>, this=<optimized out>) at /usr/src/debug/ktextwidgets-5.95.0-1.1.x86_64/src/widgets/ktextedit_p.h:47
#23 0x00007f938b91bc29 in KTextEditPrivate::~KTextEditPrivate (this=<optimized out>, this=<optimized out>) at /usr/src/debug/ktextwidgets-5.95.0-1.1.x86_64/src/widgets/ktextedit_p.h:56
#24 0x00007f938b92196b in std::default_delete<KTextEditPrivate>::operator() (__ptr=<optimized out>, this=<optimized out>) at /usr/include/c++/12/bits/unique_ptr.h:95
#25 std::unique_ptr<KTextEditPrivate, std::default_delete<KTextEditPrivate> >::~unique_ptr (this=<optimized out>, this=<optimized out>) at /usr/include/c++/12/bits/unique_ptr.h:396
#26 KTextEdit::~KTextEdit (this=<optimized out>, this=<optimized out>) at /usr/src/debug/ktextwidgets-5.95.0-1.1.x86_64/src/widgets/ktextedit.cpp:258
#27 0x00007f938bfc0538 in Choqok::UI::TextEdit::~TextEdit (this=<optimized out>, this=<optimized out>) at /usr/src/debug/choqok-1.7.0-47.2.x86_64/libchoqok/ui/choqoktextedit.cpp:98
#28 0x00007f937c13fb63 in TwitterApiTextEdit::~TwitterApiTextEdit (this=<optimized out>, this=<optimized out>) at /usr/src/debug/choqok-1.7.0-47.2.x86_64/helperlibs/twitterapihelper/twitterapitextedit.cpp:57
#29 0x00007f937c4cbf8e in TwitterTextEdit::~TwitterTextEdit (this=<optimized out>, this=<optimized out>) at /usr/src/debug/choqok-1.7.0-47.2.x86_64/microblogs/twitter/twittertextedit.cpp:58
#30 TwitterTextEdit::~TwitterTextEdit (this=<optimized out>, this=<optimized out>) at /usr/src/debug/choqok-1.7.0-47.2.x86_64/microblogs/twitter/twittertextedit.cpp:58
#31 0x00007f938a70505e in QObjectPrivate::deleteChildren (this=this@entry=0x55ddcc534bf0) at kernel/qobject.cpp:2104
#32 0x00007f938b3e24b6 in QWidget::~QWidget (this=0x55ddcc5277d0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1522
#33 0x00007f938b3e27f9 in QWidget::~QWidget (this=0x55ddcc5277d0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1546
#34 0x00007f938a70505e in QObjectPrivate::deleteChildren (this=this@entry=0x55ddcc406390) at kernel/qobject.cpp:2104
#35 0x00007f938b3e24b6 in QWidget::~QWidget (this=0x55ddcc536f80, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1522
#36 0x00007f937c1184f3 in TwitterApiComposerWidget::~TwitterApiComposerWidget (this=<optimized out>, this=<optimized out>) at /usr/src/debug/choqok-1.7.0-47.2.x86_64/helperlibs/twitterapihelper/twitterapicomposerwidget.cpp:65
#37 0x00007f937c4be7f0 in TwitterComposerWidget::~TwitterComposerWidget (this=<optimized out>, this=<optimized out>) at /usr/src/debug/choqok-1.7.0-47.2.x86_64/microblogs/twitter/twittercomposerwidget.cpp:85
#38 TwitterComposerWidget::~TwitterComposerWidget (this=<optimized out>, this=<optimized out>) at /usr/src/debug/choqok-1.7.0-47.2.x86_64/microblogs/twitter/twittercomposerwidget.cpp:85
#39 0x00007f938a70505e in QObjectPrivate::deleteChildren (this=this@entry=0x55ddcbc72c90) at kernel/qobject.cpp:2104
#40 0x00007f938b3e24b6 in QWidget::~QWidget (this=0x55ddcc523a30, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1522
#41 0x00007f938b4916b9 in QFrame::~QFrame (this=0x55ddcc523a30, __in_chrg=<optimized out>) at widgets/qframe.cpp:264
#42 0x00007f938a70505e in QObjectPrivate::deleteChildren (this=this@entry=0x55ddcc53bba0) at kernel/qobject.cpp:2104
#43 0x00007f938b3e24b6 in QWidget::~QWidget (this=0x55ddcc03caf0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1522
#44 0x00007f938bfd1509 in Choqok::UI::ChoqokTabBar::~ChoqokTabBar (this=<optimized out>, this=<optimized out>) at /usr/src/debug/choqok-1.7.0-47.2.x86_64/libchoqok/ui/choqoktabbar.cpp:876
#45 0x00007f938a70505e in QObjectPrivate::deleteChildren (this=this@entry=0x55ddcc4caff0) at kernel/qobject.cpp:2104
#46 0x00007f938b3e24b6 in QWidget::~QWidget (this=0x55ddcc051390, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1522
#47 0x00007f937c137759 in TwitterApiMicroBlogWidget::~TwitterApiMicroBlogWidget (this=<optimized out>, this=<optimized out>) at /usr/src/debug/choqok-1.7.0-47.2.x86_64/helperlibs/twitterapihelper/twitterapimicroblogwidget.cpp:114
#48 0x00007f938a70505e in QObjectPrivate::deleteChildren (this=this@entry=0x55ddcad780b0) at kernel/qobject.cpp:2104
#49 0x00007f938b3e24b6 in QWidget::~QWidget (this=0x55ddcad747f0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1522
#50 0x00007f938b558509 in QStackedWidget::~QStackedWidget (this=0x55ddcad747f0, __in_chrg=<optimized out>) at widgets/qstackedwidget.cpp:147
#51 0x00007f938a70505e in QObjectPrivate::deleteChildren (this=this@entry=0x55ddcad6c970) at kernel/qobject.cpp:2104
#52 0x00007f938b3e24b6 in QWidget::~QWidget (this=0x55ddcad47680, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1522
#53 0x00007f938b57b3f9 in QTabWidget::~QTabWidget (this=0x55ddcad47680, __in_chrg=<optimized out>) at widgets/qtabwidget.cpp:374
#54 0x00007f938a70505e in QObjectPrivate::deleteChildren (this=this@entry=0x55ddcab472d0) at kernel/qobject.cpp:2104
#55 0x00007f938b3e24b6 in QWidget::~QWidget (this=0x55ddcad094b0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1522
#56 0x000055ddc914a230 in MainWindow::~MainWindow (this=<optimized out>, this=<optimized out>) at /usr/src/debug/choqok-1.7.0-47.2.x86_64/choqok/mainwindow.cpp:119
#57 0x000055ddc914a2e9 in MainWindow::~MainWindow (this=<optimized out>, this=<optimized out>) at /usr/src/debug/choqok-1.7.0-47.2.x86_64/choqok/mainwindow.cpp:119
#58 0x00007f938a70725f in QObject::event (this=0x55ddcad094b0, e=0x55ddcc496c50) at kernel/qobject.cpp:1301
#59 0x00007f938be7f6a9 in KXmlGuiWindow::event (this=0x55ddcad094b0, ev=0x55ddcc496c50) at /usr/src/debug/kxmlgui-5.95.0-1.1.x86_64/src/kxmlguiwindow.cpp:220
#60 0x00007f938b3a53ce in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55ddcad094b0, e=0x55ddcc496c50) at kernel/qapplication.cpp:3632
#61 0x00007f938a6dbce8 in QCoreApplication::notifyInternal2 (receiver=0x55ddcad094b0, event=0x55ddcc496c50) at kernel/qcoreapplication.cpp:1064
#62 0x00007f938a6dec81 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=52, data=0x55ddcab474b0) at kernel/qcoreapplication.cpp:1821
#63 0x00007f938a6e28e0 in QCoreApplication::exec () at kernel/qcoreapplication.h:86
#64 0x00007f938ab6da2c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1867
#65 0x00007f938b3a5345 in QApplication::exec () at kernel/qapplication.cpp:2824
#66 0x000055ddc9148ddf in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/choqok-1.7.0-47.2.x86_64/choqok/main.cpp:103
[Inferior 1 (process 3296) detached]

Reported using DrKonqi
Comment 1 Frédéric Brière 2022-06-20 10:43:21 UTC
FYI, you can currently work around this bug by disabling the automatic spellchecking option.
Comment 2 Mathias Homann 2022-06-20 10:57:53 UTC
(In reply to Frédéric Brière from comment #1)
> FYI, you can currently work around this bug by disabling the automatic
> spellchecking option.

that actually worked!
Comment 3 Bug Janitor Service 2022-06-20 11:44:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/choqok/-/merge_requests/15
Comment 4 Frédéric Brière 2022-06-21 14:07:19 UTC
Git commit 27fd8ef86b98b0062f3488a3563091ac9afdfe70 by Frédéric Brière.
Committed on 21/06/2022 at 13:59.
Pushed by scarpino into branch 'master'.

Disconnect self-connected signals emitted from a parent class

Signals connected from an object to itself should be disconnected in the
dtor if said signal is emitted from the parent class.  Otherwise, if
that signal ends up being emitted in the parent dtor, it will attempt to
invoke a method on the now-destroyed child object.

(In all fairness, only one of these connections, namely the one to
TextEdit::textChanged(), is actually problematic, as all others fall
into the "you can no longer click on stuff at this point anyway"
category.  Still, better safe than sorry.)

M  +2    -0    choqok/mainwindow.cpp
M  +4    -0    libchoqok/ui/choqoktextedit.cpp
M  +1    -0    plugins/betternotify/dummynotification.cpp

https://invent.kde.org/network/choqok/commit/27fd8ef86b98b0062f3488a3563091ac9afdfe70