Bug 337675 - Calligra Words crashes while trying to open doc file
Summary: Calligra Words crashes while trying to open doc file
Status: RESOLVED FIXED
Alias: None
Product: calligrawords
Classification: Applications
Component: doc (show other bugs)
Version: 2.8.5
Platform: Fedora RPMs Linux
: HI crash
Target Milestone: ---
Assignee: Pierre Ducroquet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-21 15:27 UTC by Leonid Zhaldybin
Modified: 2020-09-16 16:55 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
doc file which causes the crash (2.42 MB, application/msword)
2014-07-21 15:27 UTC, Leonid Zhaldybin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonid Zhaldybin 2014-07-21 15:27:16 UTC
Created attachment 87861 [details]
doc file which causes the crash

Application: calligrawords (2.8.2)
KDE Platform Version: 4.12.5
Qt Version: 4.8.6
Operating System: Linux 3.15.6-200.fc20.x86_64 x86_64
Distribution: "Fedora release 20 (Heisenbug)"

-- Information about the crash:
Calligra Words application crashes every time when trying to open the document. I'm going to attach the file which causes the problem to this bug report.

The crash can be reproduced every time.

-- Backtrace:
Application: Calligra Words (calligrawords), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
81	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[KCrash Handler]
#6  KWFrameLayout::createNewFramesForPage (this=this@entry=0x103bfe0, pageNumber=2) at /usr/src/debug/calligra-2.8.2/words/part/frames/KWFrameLayout.cpp:169
#7  0x00007f0fa687df83 in KWDocument::insertPage (this=this@entry=0x103bf90, afterPageNum=<optimized out>, masterPageName=...) at /usr/src/debug/calligra-2.8.2/words/part/KWDocument.cpp:300
#8  0x00007f0fa687e108 in KWDocument::appendPage (this=this@entry=0x103bf90, masterPageName=...) at /usr/src/debug/calligra-2.8.2/words/part/KWDocument.cpp:314
#9  0x00007f0fa68acd39 in KWRootAreaProvider::provideNext (this=this@entry=0x137ecc0, documentLayout=documentLayout@entry=0xea5fc0) at /usr/src/debug/calligra-2.8.2/words/part/KWRootAreaProvider.cpp:193
#10 0x00007f0fa68ad2da in KWRootAreaProvider::provide (this=0x137ecc0, documentLayout=0xea5fc0) at /usr/src/debug/calligra-2.8.2/words/part/KWRootAreaProvider.cpp:313
#11 0x0000003f044407db in KoTextDocumentLayout::doLayout (this=this@entry=0xea5fc0) at /usr/src/debug/calligra-2.8.2/libs/textlayout/KoTextDocumentLayout.cpp:818
#12 0x0000003f04440fb8 in KoTextDocumentLayout::layout (this=0xea5fc0) at /usr/src/debug/calligra-2.8.2/libs/textlayout/KoTextDocumentLayout.cpp:693
#13 0x0000003ef799febe in QObject::event (this=0xea5fc0, e=<optimized out>) at kernel/qobject.cpp:1222
#14 0x0000003efc5cae7c in QApplicationPrivate::notify_helper (this=this@entry=0xe4b890, receiver=receiver@entry=0xea5fc0, e=e@entry=0x132f4c0) at kernel/qapplication.cpp:4565
#15 0x0000003efc5d17e5 in QApplication::notify (this=0x7fffcef0aae0, receiver=receiver@entry=0xea5fc0, e=e@entry=0x132f4c0) at kernel/qapplication.cpp:4351
#16 0x0000003f07860917 in KoApplication::notify (this=<optimized out>, receiver=0xea5fc0, event=0x132f4c0) at /usr/src/debug/calligra-2.8.2/libs/main/KoApplication.cpp:617
#17 0x0000003ef7986ebd in QCoreApplication::notifyInternal (this=0x7fffcef0aae0, receiver=receiver@entry=0xea5fc0, event=event@entry=0x132f4c0) at kernel/qcoreapplication.cpp:953
#18 0x0000003ef798a0d5 in sendEvent (event=0x132f4c0, receiver=0xea5fc0) at kernel/qcoreapplication.h:231
#19 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0xe08520) at kernel/qcoreapplication.cpp:1577
#20 0x0000003ef798a573 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1470
#21 0x0000003ef79b62de in sendPostedEvents () at kernel/qcoreapplication.h:236
#22 postEventSourceDispatch (s=s@entry=0xe44dc0) at kernel/qeventdispatcher_glib.cpp:300
#23 0x0000003ef1c492a6 in g_main_dispatch (context=0xe4c4f0) at gmain.c:3066
#24 g_main_context_dispatch (context=context@entry=0xe4c4f0) at gmain.c:3642
#25 0x0000003ef1c49628 in g_main_context_iterate (context=context@entry=0xe4c4f0, block=block@entry=0, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3713
#26 0x0000003ef1c496dc in g_main_context_iteration (context=0xe4c4f0, may_block=0) at gmain.c:3774
#27 0x0000003ef79b5a5e in QEventDispatcherGlib::processEvents (this=0xe09ea0, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#28 0x0000003efc66cd86 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#29 0x0000003ef798a5bf in QCoreApplication::processEvents (flags=...) at kernel/qcoreapplication.cpp:1140
#30 0x0000003f02c0b00f in KoProgressUpdater::update (this=<optimized out>) at /usr/src/debug/calligra-2.8.2/libs/widgetutils/KoProgressUpdater.cpp:166
#31 0x0000003ef799b938 in QMetaObject::activate (sender=0x13a0160, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3567
#32 0x0000003ef799b938 in QMetaObject::activate (sender=0x1508930, m=m@entry=0x3f02e12800 <KoUpdater::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffcef09a40) at kernel/qobject.cpp:3567
#33 0x0000003f02c0c421 in KoUpdater::sigProgress (this=<optimized out>, _t1=_t1@entry=100) at /usr/src/debug/calligra-2.8.2/x86_64-redhat-linux-gnu/libs/widgetutils/KoUpdater.moc:115
#34 0x0000003f02c0c483 in KoUpdater::setProgress (this=<optimized out>, percent=percent@entry=100) at /usr/src/debug/calligra-2.8.2/libs/widgetutils/KoUpdater.cpp:59
#35 0x0000003f0786afa1 in KoDocument::openFile (this=0x103bf90) at /usr/src/debug/calligra-2.8.2/libs/main/KoDocument.cpp:1637
#36 0x0000003f07871513 in openFile (this=0x10324a0) at /usr/src/debug/calligra-2.8.2/libs/main/KoDocument.cpp:276
#37 openLocalFile (this=0x10324a0) at /usr/src/debug/calligra-2.8.2/libs/main/KoDocument.cpp:298
#38 KoDocument::openUrlInternal (this=this@entry=0x103bf90, url=...) at /usr/src/debug/calligra-2.8.2/libs/main/KoDocument.cpp:2698
#39 0x0000003f07871930 in KoDocument::openUrl (this=0x103bf90, _url=...) at /usr/src/debug/calligra-2.8.2/libs/main/KoDocument.cpp:1261
#40 0x0000003f07890504 in KoMainWindow::openDocumentInternal (this=this@entry=0x1019e00, url=..., newpart=newpart@entry=0x103c9f0, newdoc=newdoc@entry=0x103bf90) at /usr/src/debug/calligra-2.8.2/libs/main/KoMainWindow.cpp:789
#41 0x0000003f078908a1 in KoMainWindow::openDocument (this=this@entry=0x1019e00, newPart=0x103c9f0, url=...) at /usr/src/debug/calligra-2.8.2/libs/main/KoMainWindow.cpp:768
#42 0x0000003f0785dc77 in KoApplication::start (this=this@entry=0x7fffcef0aae0) at /usr/src/debug/calligra-2.8.2/libs/main/KoApplication.cpp:533
#43 0x0000003f09003086 in kdemain (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/calligra-2.8.2/words/app/main.cpp:42
#44 0x0000003eef021d65 in __libc_start_main (main=0x4008b0 <main(int, char**)>, argc=2, argv=0x7fffcef0ac28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffcef0ac18) at libc-start.c:285
#45 0x00000000004008e1 in _start ()

Possible duplicates by query: bug 322434, bug 322429, bug 305767, bug 305214, bug 305006.

Report to https://bugs.kde.org/
Comment 1 Rex Dieter 2014-07-21 16:23:47 UTC
Confirmed (still) crashes using calligra-2.8.5 too
Comment 2 Pierre Ducroquet 2014-10-05 16:14:20 UTC
Thanks for this bug report.

There are two bugs in this report :
1) a calligra words layout crash,
2) a ms word parser issue.

Using calligraconverter, you can see (in LibreOffice) in the generated document that the header of the first page has been mis-parsed, leading to a huge offset on the top. This must be what triggers the layout crash.
I'll start looking in the layout crash (that's far more critical than being a bit wrong in ms word parser)
Comment 3 Pierre Ducroquet 2014-10-18 14:20:42 UTC
Git commit 853b0ee189cc60c7b5d2066e114da7b787a1de5c by Pierre Ducroquet.
Committed on 18/10/2014 at 13:39.
Pushed by ducroquet into branch 'master'.

Fix the page top/bottom border with header/footer

Check the msword fIncludeHeader (resp. fIncludeFooter) setting to properly
calculate the page top (resp. bottom) margin.
REVIEW: 120645

M  +10   -6    filters/words/msword-odf/document.cpp

http://commits.kde.org/calligra/853b0ee189cc60c7b5d2066e114da7b787a1de5c