Bug 308457 - words crashes when I insert a page break
Summary: words crashes when I insert a page break
Status: RESOLVED DUPLICATE of bug 305006
Alias: None
Product: calligrawords
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Compiled Sources Linux
: NOR critical
Target Milestone: ---
Assignee: Calligra Words Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-15 20:07 UTC by Michael Giesler
Modified: 2012-11-04 21:40 UTC (History)
3 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 Michael Giesler 2012-10-15 20:07:03 UTC
Every time I try to insert a page break, calligrawords crashes. It happens with newly created (empty) documents and with opened existing documents.

Here is the backtrace:

Application: Calligra Words (calligrawords), signal: Segmentation fault
[Current thread is 1 (Thread 0xb414c710 (LWP 12714))]

Thread 2 (Thread 0xb020eb70 (LWP 12717)):
#0  0xb4ff4bb4 in poll () from /lib/libc.so.6
#1  0xb4605f9b in g_poll () from /usr/lib/libglib-2.0.so.0
#2  0xb45f7486 in ?? () from /usr/lib/libglib-2.0.so.0
#3  0xb45f781a in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0xb54a1097 in QEventDispatcherGlib::processEvents (this=0xaf900468, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0xb546cd1d in QEventLoop::processEvents (this=0xb020e280, flags=...) at kernel/qeventloop.cpp:149
#6  0xb546cfb9 in QEventLoop::exec (this=0xb020e280, flags=...) at kernel/qeventloop.cpp:204
#7  0xb5354e1c in QThread::exec (this=0x8435270) at thread/qthread.cpp:501
#8  0xb5449f3d in QInotifyFileSystemWatcherEngine::run (this=0x8435270) at io/qfilesystemwatcher_inotify.cpp:248
#9  0xb5358348 in QThreadPrivate::start (arg=0x8435270) at thread/qthread_unix.cpp:338
#10 0xb52d5a7d in start_thread () from /lib/libpthread.so.0
#11 0xb4fffabe in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb414c710 (LWP 12714)):
[KCrash Handler]
#6  0xb2ddb711 in operator+ (p2=<synthetic pointer>, p1=<synthetic pointer>) at /usr/include/QtCore/qpoint.h:341
#7  KWViewModeNormal::documentToView (this=0xccb9480, point=..., viewConverter=0x9d524bc) at /home/michael/kde4/src/calligra/words/part/KWViewModeNormal.cpp:207
#8  0xb2ddb255 in KWViewMode::documentToView (this=0xccb9480, rect=..., viewConverter=0x9d524bc) at /home/michael/kde4/src/calligra/words/part/KWViewMode.cpp:40
#9  0xb2db5123 in KWCanvasBase::updateCanvas (this=0xc8515bc, rc=...) at /home/michael/kde4/src/calligra/words/part/KWCanvasBase.cpp:697
#10 0xb725d009 in KoShapeManager::update (this=0xca6dbc8, rect=..., shape=0xca1e5c8, selectionHandles=true) at /home/michael/kde4/src/calligra/libs/flake/KoShapeManager.cpp:569
#11 0xb725742b in KoShape::update (this=0xca1e5c8) at /home/michael/kde4/src/calligra/libs/flake/KoShape.cpp:586
#12 0xb7259c30 in KoShapeContainer::update (this=0xca1e5c8) at /home/michael/kde4/src/calligra/libs/flake/KoShapeContainer.cpp:232
#13 0xb2220c0b in TextShape::update (this=0xca1e5c8) at /home/michael/kde4/src/calligra/plugins/textshape/TextShape.cpp:389
#14 0xb725feac in KoShapeManager::addShape (this=0xca6dbc8, shape=0xca1e5c8, repaint=KoShapeManager::PaintShapeOnAdd) at /home/michael/kde4/src/calligra/libs/flake/KoShapeManager.cpp:230
#15 0xb7261451 in qt_static_metacall (_a=0xbf8e3394, _id=4, _o=0xca6dbc8, _c=<optimized out>) at /home/michael/kde4/build/calligra/libs/flake/KoShapeManager.moc:68
#16 KoShapeManager::qt_static_metacall (_o=0xca6dbc8, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbf8e3394) at /home/michael/kde4/build/calligra/libs/flake/KoShapeManager.moc:58
#17 0xb5484cdf in QMetaObject::activate (sender=0x85b0350, m=0xb2e3a524, local_signal_index=1, argv=0xbf8e3394) at kernel/qobject.cpp:3556
#18 0xb2dad51d in KWDocument::shapeAdded (this=0x85b0350, _t1=0xca1e5c8, _t2=KoShapeManager::AddWithoutRepaint) at /home/michael/kde4/build/calligra/words/part/moc_KWDocument.cpp:153
#19 0xb2dbb35a in KWDocument::addFrame (this=0x85b0350, frame=0xc2cf5c8) at /home/michael/kde4/src/calligra/words/part/KWDocument.cpp:412
#20 0xb2dadad9 in qt_static_metacall (_a=0xbf8e3518, _id=9, _o=0x85b0350, _c=<optimized out>) at /home/michael/kde4/build/calligra/words/part/moc_KWDocument.cpp:88
#21 KWDocument::qt_static_metacall (_o=0x85b0350, _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0xbf8e3518) at /home/michael/kde4/build/calligra/words/part/moc_KWDocument.cpp:73
#22 0xb5484cdf in QMetaObject::activate (sender=0x9ce64b0, m=0xb2e3a50c, local_signal_index=0, argv=0xbf8e3518) at kernel/qobject.cpp:3556
#23 0xb2dad625 in KWFrameSet::frameAdded (this=0x9ce64b0, _t1=0xc2cf5c8) at /home/michael/kde4/build/calligra/words/part/moc_KWFrameSet.cpp:101
#24 0xb2df93da in KWFrameSet::addFrame (this=0x9ce64b0, frame=0xc2cf5c8) at /home/michael/kde4/src/calligra/words/part/frames/KWFrameSet.cpp:68
#25 0xb2df8043 in KWFrame::KWFrame (this=0xc2cf5c8, shape=0xca1e5c8, parent=0x9ce64b0, anchor=0x0) at /home/michael/kde4/src/calligra/words/part/frames/KWFrame.cpp:49
#26 0xb2df6764 in KWFrameLayout::createNewFramesForPage (this=0x85b0374, pageNumber=2) at /home/michael/kde4/src/calligra/words/part/frames/KWFrameLayout.cpp:210
#27 0xb2e15a40 in KWPageInsertCommand::redo (this=0xca1e360) at /home/michael/kde4/src/calligra/words/part/commands/KWPageInsertCommand.cpp:108
#28 0xb2dbad54 in KWDocument::insertPage (this=0x85b0350, afterPageNum=1, masterPageName=..., addUndoRedoCommand=false) at /home/michael/kde4/src/calligra/words/part/KWDocument.cpp:234
#29 0xb2dbaeb4 in KWDocument::appendPage (this=0x85b0350, masterPageName=..., addUndoRedoCommand=false) at /home/michael/kde4/src/calligra/words/part/KWDocument.cpp:248
#30 0xb2defc60 in KWRootAreaProvider::provideNext (this=0x9ce6570, documentLayout=0x9408d78) at /home/michael/kde4/src/calligra/words/part/KWRootAreaProvider.cpp:193
#31 0xb2df027d in KWRootAreaProvider::provide (this=0x9ce6570, documentLayout=0x9408d78) at /home/michael/kde4/src/calligra/words/part/KWRootAreaProvider.cpp:300
#32 0xb4e5e7e7 in KoTextDocumentLayout::doLayout (this=0x9408d78) at /home/michael/kde4/src/calligra/libs/textlayout/KoTextDocumentLayout.cpp:732
#33 0xb4e5f138 in layout (this=0x9408d78) at /home/michael/kde4/src/calligra/libs/textlayout/KoTextDocumentLayout.cpp:608
#34 KoTextDocumentLayout::layout (this=0x9408d78) at /home/michael/kde4/src/calligra/libs/textlayout/KoTextDocumentLayout.cpp:591
#35 0xb4e5c648 in KoTextDocumentLayout::executeScheduledLayout (this=0x9408d78) at /home/michael/kde4/src/calligra/libs/textlayout/KoTextDocumentLayout.cpp:819
#36 0xb4e5ca48 in KoTextDocumentLayout::qt_static_metacall (_o=0x9408d78, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xa0e4090) at /home/michael/kde4/build/calligra/libs/textlayout/KoTextDocumentLayout.moc:66
#37 0xb5480201 in QMetaCallEvent::placeMetaCall (this=0xc8aee80, object=0x9408d78) at kernel/qobject.cpp:525
#38 0xb548936b in QObject::event (this=0x9408d78, e=0xc8aee80) at kernel/qobject.cpp:1204
#39 0xb5ad44e4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#40 0xb5ad9823 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#41 0xb75e6c6a in KoApplication::notify (this=0x1c3870e2, receiver=0x9408d78, event=0xc8aee80) at /home/michael/kde4/src/calligra/libs/main/KoApplication.cpp:504
#42 0xb546e49e in QCoreApplication::notifyInternal (this=0xbf8e45ec, receiver=0x9408d78, event=0xc8aee80) at kernel/qcoreapplication.cpp:915
#43 0xb5472118 in sendEvent (event=<optimized out>, receiver=<optimized out>) at kernel/qcoreapplication.h:231
#44 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x804f090) at kernel/qcoreapplication.cpp:1539
#45 0xb547244c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1432
#46 0xb54a0c44 in sendPostedEvents () at kernel/qcoreapplication.h:236
#47 postEventSourceDispatch (s=0x80a1a80) at kernel/qeventdispatcher_glib.cpp:279
#48 0xb45f6e4f in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#49 0xb45f7580 in ?? () from /usr/lib/libglib-2.0.so.0
#50 0xb45f781a in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#51 0xb54a1037 in QEventDispatcherGlib::processEvents (this=0x804ecc0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#52 0xb5b8867a in ?? () from /usr/lib/libQtGui.so.4
#53 0xb546cd1d in QEventLoop::processEvents (this=0xbf8e4574, flags=...) at kernel/qeventloop.cpp:149
#54 0xb546cfb9 in QEventLoop::exec (this=0xbf8e4574, flags=...) at kernel/qeventloop.cpp:204
#55 0xb54724fa in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#56 0xb5ad2384 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#57 0xb775937d in kdemain (argc=1, argv=0xbf8e46f4) at /home/michael/kde4/src/calligra/words/part/main.cpp:43
#58 0x0804871b in main (argc=1, argv=0xbf8e46f4) at /home/michael/kde4/build/calligra/words/part/calligrawords_dummy.cpp:3


Reproducible: Always

Steps to Reproduce:
1. start calligrawords
2. open a blank document
3. insert a page break by using the text editing docker
Actual Results:  
calligrawords crashes

Expected Results:  
no crash, a new page should be inserted instead.
Comment 1 Shlomi Fish 2012-10-18 14:04:56 UTC
Just for the record:

<rindolf> Hi all. How can I insert a page break in calligrawords? I'm trying to reproduce https://bugs.kde.org/show_bug.cgi?id=308457 .
<frinring> rindolf: see the "Text editing" box on the right, at the bottom to the right there is a button for it
<frinring> in the "Insert" section

Anyway, it does not crash here with calligra-words-2.5.90-2.mga3 on Mageia Linux 3/Cauldron. Does it happen in a new UNIX user account?
Comment 2 Michael Giesler 2012-10-22 20:15:39 UTC
Yes, it does also happen with a newly created account.
Comment 3 Michael Giesler 2012-11-04 09:14:55 UTC
As recommended by boemann in irc I did a git bisect and found out, that the revision f1c3463fb951dc0dbb8387212ffd047e7fc0c34b ("Ok so this is the big one that splits KoDocument into KoPart and KoDocument.") invented the crash.

At least this revision is the most likely:
ea17c9d5108aad1b5c5897202bde1e5feac34330 => works fine
f1c3463fb951dc0dbb8387212ffd047e7fc0c34b  => build failed
3befdcc7d3f51d4814f4d45fa488a9c350afc1e0 => build failed
aa50cbb361df0819ecdf5ce4d277cc03536bc4f8 => crash occurs
Comment 4 Gopalakrishna Bhat 2012-11-04 09:30:02 UTC
https://git.reviewboard.kde.org/r/106299/
Comment 5 Gopalakrishna Bhat 2012-11-04 09:30:55 UTC

*** This bug has been marked as a duplicate of bug 305006 ***
Comment 6 Camilla Boemann 2012-11-04 11:31:58 UTC
Gopalakrishna, the bisect seems to indicate your fix is wrong (although Michael Giesler also proposed a similar fix)
Comment 7 Camilla Boemann 2012-11-04 21:40:18 UTC
Thanks a lot for bisecting

I have found the bug and have just created a fix