Bug 291166 - crash in KUndo2Command while working with Words
Summary: crash in KUndo2Command while working with Words
Status: RESOLVED FIXED
Alias: None
Product: calligrawords
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Calligra Words Bugs
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2012-01-10 13:51 UTC by Camilla Boemann
Modified: 2012-01-18 21:41 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 Camilla Boemann 2012-01-10 13:51:56 UTC
Version:           2.4-snapshots (using KDE 4.6.4) 
OS:                Linux

Application: Words (calligrawords), signal: Segmentation fault
[KCrash Handler]
#6  0x00007fa1ed6c607a in QList<KUndo2Command*>::append (this=0xe9340100, t=@0x7fff220917a8) at /usr/include/qt4/QtCore/qlist.h:496
#7  0x00007fa1ed6c4022 in KUndo2Command::KUndo2Command (this=0x3329780, text=..., parent=0x332d870) at /home/cbo/devel/calligra/libs/kundo2/kundo2stack.cpp:118
#8  0x00007fa1edfe523b in KoTextEditor::Private::UndoTextCommand::UndoTextCommand (this=0x3329780, document=0x146f8c0, parent=0x332d870) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:139
#9  0x00007fa1edfe5539 in KoTextEditor::Private::documentCommandAdded (this=0x1409370) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:175
#10 0x00007fa1edff03e8 in KoTextEditor::qt_metacall (this=0x146ec20, _c=QMetaObject::InvokeMetaMethod, _id=106, _a=0x7fff22091aa0) at /home/cbo/devel/buildcalligra/libs/kotext/KoTextEditor.moc:418
#11 0x00007fa1e9f68cca in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#12 0x00007fa1eb0bbced in ?? () from /usr/lib/libQtGui.so.4
#13 0x00007fa1eb0c1490 in ?? () from /usr/lib/libQtGui.so.4
#14 0x00007fa1eb0e6402 in QTextCursor::insertText(QString const&, QTextCharFormat const&) () from /usr/lib/libQtGui.so.4
#15 0x00007fa1edfed60c in KoTextEditor::insertText (this=0x146ec20, text=...) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:1901
#16 0x00007fa1d47aa3f5 in TextTool::keyPressEvent (this=0x1a2fc40, event=0x7fff220928a0) at /home/cbo/devel/calligra/plugins/textshape/TextTool.cpp:1164
#17 0x00007fa1edc7bdac in KoToolProxy::keyPressEvent (this=0x1a01d20, event=0x7fff220928a0) at /home/cbo/devel/calligra/libs/flake/KoToolProxy.cpp:369
#18 0x00007fa1da77c67d in KWCanvas::keyPressEvent (this=0x19e2370, e=0x7fff220928a0) at /home/cbo/devel/calligra/words/part/KWCanvas.cpp:117
#19 0x00007fa1eae9c11a in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#20 0x00007fa1da77c654 in KWCanvas::event (this=0x19e2370, e=0x7fff220928a0) at /home/cbo/devel/calligra/words/part/KWCanvas.cpp:112
#21 0x00007fa1eae4b9f4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#22 0x00007fa1eae50f76 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#23 0x00007fa1ebb78b96 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#24 0x00007fa1e9f5616c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#25 0x00007fa1eaeeba59 in ?? () from /usr/lib/libQtGui.so.4
#26 0x00007fa1eaeebe9b in ?? () from /usr/lib/libQtGui.so.4
#27 0x00007fa1eaec7854 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#28 0x00007fa1eaeefdb2 in ?? () from /usr/lib/libQtGui.so.4
#29 0x00007fa1e4fd20cf in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007fa1e4fd28c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007fa1e4fd2a99 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007fa1e9f80c9f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#33 0x00007fa1eaeefa4e in ?? () from /usr/lib/libQtGui.so.4
#34 0x00007fa1e9f55372 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#35 0x00007fa1e9f5556f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#36 0x00007fa1e9f59717 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#37 0x00007fa1ee9aadbc in kdemain (argc=1, argv=0x7fff22093958) at /home/cbo/devel/calligra/words/part/main.cpp:43
#38 0x00000000004008d6 in main (argc=1, argv=0x7fff22093958) at /home/cbo/devel/buildcalligra/words/part/calligrawords_dummy.cpp:3


Reproducible: Sometimes

Steps to Reproduce:
edit text in words and after a while it happens - have not deduced a pattern yet, but it doesn't involve hitting undo

typing alone is enough


Expected Results:  
no crash
Comment 1 Camilla Boemann 2012-01-10 14:23:08 UTC
Hi Alexander

I'm getting a lot of crashes in your code
Comment 2 Camilla Boemann 2012-01-16 02:19:37 UTC
Application: Words (calligrawords), signal: Segmentation fault
[KCrash Handler]
#6  0x00007f887af8607a in QList<KUndo2Command*>::append (this=0x4032000000000000, t=@0x7fff4a330908) at /usr/include/qt4/QtCore/qlist.h:496
#7  0x00007f887af84022 in KUndo2Command::KUndo2Command (this=0x39b5a40, text=..., parent=0x38f6ae0) at /home/cbo/devel/calligra/libs/kundo2/kundo2stack.cpp:118
#8  0x00007f887b8a6783 in KoTextEditor::Private::UndoTextCommand::UndoTextCommand (this=0x39b5a40, document=0x12b5310, parent=0x38f6ae0) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:139
#9  0x00007f887b8a6a81 in KoTextEditor::Private::documentCommandAdded (this=0x12fdb40) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:175
#10 0x00007f887b8b2434 in KoTextEditor::qt_metacall (this=0x12cb1f0, _c=QMetaObject::InvokeMetaMethod, _id=107, _a=0x7fff4a330c00) at /home/cbo/devel/buildcalligra/libs/kotext/KoTextEditor.moc:420
#11 0x00007f8877879eba in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#12 0x00007f8878990e16 in ?? () from /usr/lib/libQtGui.so.4
#13 0x00007f887899136e in ?? () from /usr/lib/libQtGui.so.4
#14 0x00007f88789b48f9 in ?? () from /usr/lib/libQtGui.so.4
#15 0x00007f887b8fee8f in KoParagraphStyle::unapplyStyle (this=0x1335a50, block=...) at /home/cbo/devel/calligra/libs/kotext/styles/KoParagraphStyle.cpp:323
#16 0x00007f887b8aa965 in KoTextEditor::setStyle (this=0x12cb1f0, style=0x1318b80) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:974
#17 0x00007f8861faca77 in TextTool::setStyle (this=0x1ab0790, style=0x1318b80) at /home/cbo/devel/calligra/plugins/textshape/TextTool.cpp:1830
#18 0x00007f8861fb1d48 in TextTool::qt_metacall (this=0x1ab0790, _c=QMetaObject::InvokeMetaMethod, _id=51, _a=0x7fff4a331090) at /home/cbo/devel/buildcalligra/plugins/textshape/TextTool.moc:244
#19 0x00007f8877879eba in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#20 0x00007f8861fcbf1d in SimpleParagraphWidget::paragraphStyleSelected (this=0x257fd90, _t1=0x1318b80) at /home/cbo/devel/buildcalligra/plugins/textshape/SimpleParagraphWidget.moc:118
#21 0x00007f8861fcbba3 in SimpleParagraphWidget::styleSelected (this=0x257fd90, index=1) at /home/cbo/devel/calligra/plugins/textshape/dialogs/SimpleParagraphWidget.cpp:263
#22 0x00007f8861fcbe9f in SimpleParagraphWidget::qt_metacall (this=0x257fd90, _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x7fff4a331220) at /home/cbo/devel/buildcalligra/plugins/textshape/SimpleParagraphWidget.moc:100
#23 0x00007f8877879eba in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#24 0x00007f8861fc6802 in StylesCombo::selectionChanged (this=0x25a18d0, _t1=1) at /home/cbo/devel/buildcalligra/plugins/textshape/StylesCombo.moc:108
#25 0x00007f8861fc6201 in StylesCombo::slotItemClicked (this=0x25a18d0, index=...) at /home/cbo/devel/calligra/plugins/textshape/dialogs/StylesCombo.cpp:137
#26 0x00007f8861fc67a6 in StylesCombo::qt_metacall (this=0x25a18d0, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7fff4a3313e0) at /home/cbo/devel/buildcalligra/plugins/textshape/StylesCombo.moc:96
#27 0x00007f8877879eba in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#28 0x00007f8861f94985 in StylesDelegate::clickedInItem (this=0x25ad9f0, _t1=...) at /home/cbo/devel/buildcalligra/plugins/textshape/moc_StylesDelegate.cpp:115
#29 0x00007f8861ff1fb8 in StylesDelegate::editorEvent (this=0x25ad9f0, event=0x7fff4a331f60, model=0x259ed40, optionV1=..., index=...) at /home/cbo/devel/calligra/plugins/textshape/dialogs/StylesDelegate.cpp:180
#30 0x00007f8861fc646f in StylesCombo::eventFilter (this=0x25a18d0, object=0x25a46f0, event=0x7fff4a331f60) at /home/cbo/devel/calligra/plugins/textshape/dialogs/StylesCombo.cpp:163
#31 0x00007f8877867418 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#32 0x00007f887871ac2f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#33 0x00007f88787203eb in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#34 0x00007f887943fb96 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#35 0x00007f887786728c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#36 0x00007f887871bc32 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#37 0x00007f8878798794 in ?? () from /usr/lib/libQtGui.so.4
#38 0x00007f8878796f1a in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#39 0x00007f88787bf252 in ?? () from /usr/lib/libQtGui.so.4
#40 0x00007f88728100cf in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007f88728108c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#42 0x00007f8872810a99 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007f8877891e2f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#44 0x00007f88787beeee in ?? () from /usr/lib/libQtGui.so.4
#45 0x00007f8877866492 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#46 0x00007f887786668f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#47 0x00007f887786a837 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#48 0x00007f887c26ddbc in kdemain (argc=1, argv=0x7fff4a332c78) at /home/cbo/devel/calligra/words/part/main.cpp:43
#49 0x00000000004008d6 in main (argc=1, argv=0x7fff4a332c78) at /home/cbo/devel/buildcalligra/words/part/calligrawords_dummy.cpp:3
Comment 3 Alexander Potashev 2012-01-16 06:26:54 UTC
Did you find a way to reproduce this crash? Should I just enter some enter into a blank document?
Comment 4 Alexander Potashev 2012-01-16 06:27:25 UTC
(In reply to comment #3)
> Did you find a way to reproduce this crash? Should I just enter some enter into
> a blank document?

*[...] enter some text into [...]
Comment 5 Camilla Boemann 2012-01-16 06:30:41 UTC
No I didn't find a way to reproduce, but I thought it might be better if I start collecting backtraces. Maybe we can see some common thing in all the backtraces

But yeah it involves entering characters
Comment 6 Alexander Potashev 2012-01-16 20:57:00 UTC
The common thing is that "QList<KUndo2Command*>::append()" is called for broken objects (i.e. `this` in this function is not in the virtual address space of the process.)
Comment 7 Camilla Boemann 2012-01-17 22:59:43 UTC
Application: Words (calligrawords), signal: Segmentation fault
[KCrash Handler]
#6  0x00007f2b43e0b07a in QList<KUndo2Command*>::append (this=0x0, t=@0x7ffff926b4a8) at /usr/include/qt4/QtCore/qlist.h:496
#7  0x00007f2b43e09022 in KUndo2Command::KUndo2Command (this=0x372acd0, text=..., parent=0x4512b80) at /home/cbo/devel/calligra/libs/kundo2/kundo2stack.cpp:118
#8  0x00007f2b4472b825 in KoTextEditor::Private::UndoTextCommand::UndoTextCommand (this=0x372acd0, document=0x1c7a290, p=0x3a87c70, parent=0x4512b80) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:145
#9  0x00007f2b4472bb50 in KoTextEditor::Private::documentCommandAdded (this=0x3a87c70) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:184
#10 0x00007f2b447376a6 in KoTextEditor::qt_metacall (this=0x1c7a9e0, _c=QMetaObject::InvokeMetaMethod, _id=107, _a=0x7ffff926b7a0) at /home/cbo/devel/buildcalligra/libs/kotext/KoTextEditor.moc:420
#11 0x00007f2b406feeba in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#12 0x00007f2b41815e16 in ?? () from /usr/lib/libQtGui.so.4
#13 0x00007f2b418166e8 in ?? () from /usr/lib/libQtGui.so.4
#14 0x00007f2b41838960 in ?? () from /usr/lib/libQtGui.so.4
#15 0x00007f2b4183ca79 in QTextCursor::mergeCharFormat(QTextCharFormat const&) () from /usr/lib/libQtGui.so.4
#16 0x00007f2b4472d896 in KoTextEditor::italic (this=0x1c7a9e0, italic=true) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:590
#17 0x00007f2b2ae31056 in TextTool::italic (this=0x3b94c90, italic=true) at /home/cbo/devel/calligra/plugins/textshape/TextTool.cpp:1689
#18 0x00007f2b2ae36aef in TextTool::qt_metacall (this=0x3b94c90, _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0x7ffff926bc00) at /home/cbo/devel/buildcalligra/plugins/textshape/TextTool.moc:206
#19 0x00007f2b406feeba in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#20 0x00007f2b41599652 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#21 0x00007f2b4159983f in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#22 0x00007f2b4195364a in ?? () from /usr/lib/libQtGui.so.4
#23 0x00007f2b419538fc in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#24 0x00007f2b41a0faaa in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#25 0x00007f2b415f0346 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#26 0x00007f2b4159fc64 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#27 0x00007f2b415a53eb in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#28 0x00007f2b422c4b96 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#29 0x00007f2b406ec28c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#30 0x00007f2b415a0c32 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#31 0x00007f2b4161d118 in ?? () from /usr/lib/libQtGui.so.4
#32 0x00007f2b4161bf1a in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#33 0x00007f2b41644252 in ?? () from /usr/lib/libQtGui.so.4
#34 0x00007f2b3b6950cf in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007f2b3b6958c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007f2b3b695a99 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007f2b40716e2f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#38 0x00007f2b41643eee in ?? () from /usr/lib/libQtGui.so.4
#39 0x00007f2b406eb492 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#40 0x00007f2b406eb68f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#41 0x00007f2b406ef837 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#42 0x00007f2b450f3dbc in kdemain (argc=1, argv=0x7ffff926d378) at /home/cbo/devel/calligra/words/part/main.cpp:43
#43 0x00000000004008d6 in main (argc=1, argv=0x7ffff926d378) at /home/cbo/devel/buildcalligra/words/part/calligrawords_dummy.cpp:3

and this time I didn't do anything besides typing plain text and applying styles. no undo or redo. some newlines but that is it.
Comment 8 Camilla Boemann 2012-01-18 01:58:05 UTC
Application: Words (calligrawords), signal: Segmentation fault
[KCrash Handler]
#6  0x00007ff4114a607a in QList<KUndo2Command*>::append (this=0x1, t=@0x7fff14a9a3d8) at /usr/include/qt4/QtCore/qlist.h:496
#7  0x00007ff4114a4022 in KUndo2Command::KUndo2Command (this=0x33c9960, text=..., parent=0x28e0c00) at /home/cbo/devel/calligra/libs/kundo2/kundo2stack.cpp:118
#8  0x00007ff411dc6825 in KoTextEditor::Private::UndoTextCommand::UndoTextCommand (this=0x33c9960, document=0x2852c80, p=0x2a2b9b0, parent=0x28e0c00) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:145
#9  0x00007ff411dc6b50 in KoTextEditor::Private::documentCommandAdded (this=0x2a2b9b0) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:184
#10 0x00007ff411dd26c6 in KoTextEditor::qt_metacall (this=0x23abd50, _c=QMetaObject::InvokeMetaMethod, _id=107, _a=0x7fff14a9a6d0) at /home/cbo/devel/buildcalligra/libs/kotext/KoTextEditor.moc:420
#11 0x00007ff40dd99eba in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#12 0x00007ff40eeb0e16 in ?? () from /usr/lib/libQtGui.so.4
#13 0x00007ff40eed706f in QTextCursor::insertBlock(QTextBlockFormat const&, QTextCharFormat const&) () from /usr/lib/libQtGui.so.4
#14 0x00007ff411dc6fa9 in KoTextEditor::Private::newLine (this=0x2a2b9b0) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:311
#15 0x00007ff411dd022d in KoTextEditor::newLine (this=0x23abd50) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:2217
#16 0x00007ff3f84c9012 in TextTool::keyPressEvent (this=0x2b3a170, event=0x7fff14a9b4e0) at /home/cbo/devel/calligra/plugins/textshape/TextTool.cpp:1172
#17 0x00007ff411a5d44c in KoToolProxy::keyPressEvent (this=0x2ac6f30, event=0x7fff14a9b4e0) at /home/cbo/devel/calligra/libs/flake/KoToolProxy.cpp:374
#18 0x00007ff3fe479579 in KWCanvas::keyPressEvent (this=0x25363f0, e=0x7fff14a9b4e0) at /home/cbo/devel/calligra/words/part/KWCanvas.cpp:117
#19 0x00007ff40ec8b3ca in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#20 0x00007ff3fe479550 in KWCanvas::event (this=0x25363f0, e=0x7fff14a9b4e0) at /home/cbo/devel/calligra/words/part/KWCanvas.cpp:112
#21 0x00007ff40ec3ac64 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#22 0x00007ff40ec401e6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#23 0x00007ff40f95fb96 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#24 0x00007ff40dd8728c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#25 0x00007ff40ecdaef9 in ?? () from /usr/lib/libQtGui.so.4
#26 0x00007ff40ecdb33b in ?? () from /usr/lib/libQtGui.so.4
#27 0x00007ff40ecb6b04 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#28 0x00007ff40ecdf252 in ?? () from /usr/lib/libQtGui.so.4
#29 0x00007ff408d300cf in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007ff408d308c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007ff408d30a99 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007ff40ddb1e2f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#33 0x00007ff40ecdeeee in ?? () from /usr/lib/libQtGui.so.4
#34 0x00007ff40dd86492 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#35 0x00007ff40dd8668f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#36 0x00007ff40dd8a837 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#37 0x00007ff41278edbc in kdemain (argc=1, argv=0x7fff14a9c598) at /home/cbo/devel/calligra/words/part/main.cpp:43
#38 0x00000000004008d6 in main (argc=1, argv=0x7fff14a9c598) at /home/cbo/devel/buildcalligra/words/part/calligrawords_dummy.cpp:3

Once agin, typing text, applying styles, enter, and this time a single undo.
Comment 9 Camilla Boemann 2012-01-18 10:10:23 UTC
#6  0x00007f69c42db07a in QList<KUndo2Command*>::append (this=0x0, t=@0x7fff05a03eb8) at /usr/include/qt4/QtCore/qlist.h:496
#7  0x00007f69c42d9022 in KUndo2Command::KUndo2Command (this=0x29ba250, text=..., parent=0x316dfb0) at /home/cbo/devel/calligra/libs/kundo2/kundo2stack.cpp:118
#8  0x00007f69c4bfb1d9 in KoTextEditor::Private::UndoTextCommand::UndoTextCommand (this=0x29ba250, document=0xe4a610, p=0xe73870, parent=0x316dfb0) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:116
#9  0x00007f69c4bfb504 in KoTextEditor::Private::documentCommandAdded (this=0xe73870) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:155
#10 0x00007f69c4c06a62 in KoTextEditor::qt_metacall (this=0xe4c980, _c=QMetaObject::InvokeMetaMethod, _id=105, _a=0x7fff05a041b0) at /home/cbo/devel/buildcalligra/libs/kotext/KoTextEditor.moc:412
#11 0x00007f69c0bceeba in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#12 0x00007f69c1ce2efd in ?? () from /usr/lib/libQtGui.so.4
#13 0x00007f69c1ce8700 in ?? () from /usr/lib/libQtGui.so.4
#14 0x00007f69c1d0d752 in QTextCursor::insertText(QString const&, QTextCharFormat const&) () from /usr/lib/libQtGui.so.4
#15 0x00007f69c4c03e67 in KoTextEditor::insertText (this=0xe4c980, text=...) at /home/cbo/devel/calligra/libs/kotext/KoTextEditor.cpp:1971
#16 0x00007f69ab2fdfb7 in TextTool::keyPressEvent (this=0x1aa8fd0, event=0x7fff05a04fa0) at /home/cbo/devel/calligra/plugins/textshape/TextTool.cpp:1174
#17 0x00007f69c489244c in KoToolProxy::keyPressEvent (this=0x1a7ade0, event=0x7fff05a04fa0) at /home/cbo/devel/calligra/libs/flake/KoToolProxy.cpp:374
#18 0x00007f69b12ae499 in KWCanvas::keyPressEvent (this=0x1a7a1e0, e=0x7fff05a04fa0) at /home/cbo/devel/calligra/words/part/KWCanvas.cpp:117
#19 0x00007f69c1ac03ca in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#20 0x00007f69b12ae470 in KWCanvas::event (this=0x1a7a1e0, e=0x7fff05a04fa0) at /home/cbo/devel/calligra/words/part/KWCanvas.cpp:112
#21 0x00007f69c1a6fc64 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#22 0x00007f69c1a751e6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#23 0x00007f69c2794b96 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#24 0x00007f69c0bbc28c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#25 0x00007f69c1b0fef9 in ?? () from /usr/lib/libQtGui.so.4
#26 0x00007f69c1b1033b in ?? () from /usr/lib/libQtGui.so.4
#27 0x00007f69c1aebb04 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#28 0x00007f69c1b14252 in ?? () from /usr/lib/libQtGui.so.4
#29 0x00007f69bbb650cf in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007f69bbb658c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f69bbb65a99 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f69c0be6e2f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#33 0x00007f69c1b13eee in ?? () from /usr/lib/libQtGui.so.4
#34 0x00007f69c0bbb492 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#35 0x00007f69c0bbb68f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#36 0x00007f69c0bbf837 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#37 0x00007f69c55c2dbc in kdemain (argc=1, argv=0x7fff05a06058) at /home/cbo/devel/calligra/words/part/main.cpp:43
#38 0x00000000004008d6 in main (argc=1, argv=0x7fff05a06058) at /home/cbo/devel/buildcalligra/words/part/calligrawords_dummy.cpp:3

I had removed all the auto rtl stuff partlybecause i thought it might cause the problem, however as this bt shows that is not it. There seems to be some degree of time involved too. After having left word alone for severl hours i came back and pushed a single key and then crash. I've seen similar behaviour before. as to what i actually did it was the same as two previous bt
Comment 10 Camilla Boemann 2012-01-18 14:10:09 UTC
Ok Here is how to reproduce:

preconditions:
  changetrancking show changes = off
  changetracking format = deltaxml

Now open a blank document
 type a letter
 wait until it has autosaved (default 5 min)
 type a letter
 =>crash
Comment 11 Camilla Boemann 2012-01-18 16:52:57 UTC
Crash happens because in KoTextWriter we create a command to insert deleted changes. This command is deleted but at the same time left as headcommand

leaving it as head command is needed to scoop up the actual changes. trouble is that we don't remove ourselves as head command again
Comment 12 Camilla Boemann 2012-01-18 21:41:12 UTC
Git commit a98b2223fe4a5b4444ac923abeb2c16b316b1d43 by C. Boemann.
Committed on 18/01/2012 at 19:06.
Pushed by boemann into branch 'master'.

Fix crashes due to dangling pointer which we werent supposed to keep
around in the first place.

M  +5    -3    libs/kotext/KoTextEditor.cpp

http://commits.kde.org/calligra/a98b2223fe4a5b4444ac923abeb2c16b316b1d43