Bug 314676 - Crash when saving sheet
Summary: Crash when saving sheet
Status: RESOLVED FIXED
Alias: None
Product: calligrasheets
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Calligra Sheets (KSpread) Bugs
URL:
Keywords:
: 313270 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-08 13:47 UTC by Daniel Moyne
Modified: 2013-03-09 10:46 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.6.1


Attachments
New crash information added by DrKonqi (9.02 KB, text/plain)
2013-02-22 11:16 UTC, Daniel Moyne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Moyne 2013-02-08 13:47:58 UTC
Application: calligrasheets (2.6.0)
KDE Platform Version: 4.10.00
Qt Version: 4.8.3
Operating System: Linux 3.5.0-23-generic x86_64
Distribution: Ubuntu 12.10

-- Information about the crash:
- What I was doing when the application crashed:
After opening a sheet edited with LibreOffice (very fast now) crash when saving it without any modifications before !

-- Backtrace:
Application: Feuilles Calligra (calligrasheets), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7ffc394a4780 (LWP 10368))]

Thread 2 (Thread 0x7ffc0ffff700 (LWP 10375)):
#0  0x00007ffc3345bf69 in __pthread_mutex_lock (mutex=0x7ffc08002c30) at pthread_mutex_lock.c:92
#1  0x00007ffc32fc7e21 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffc32f8a623 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffc32f8acab in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffc32f8aea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffc37455c16 in QEventDispatcherGlib::processEvents (this=0x7ffc08152970, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007ffc374262bf in QEventLoop::processEvents (this=this@entry=0x7ffc0fffedd0, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007ffc37426548 in QEventLoop::exec (this=0x7ffc0fffedd0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007ffc37327b10 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#9  0x00007ffc374069af in QInotifyFileSystemWatcherEngine::run (this=0x3c559e0) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x00007ffc3732aaec in QThreadPrivate::start (arg=0x3c559e0) at thread/qthread_unix.cpp:338
#11 0x00007ffc33459e9a in start_thread (arg=0x7ffc0ffff700) at pthread_create.c:308
#12 0x00007ffc38db2cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffc394a4780 (LWP 10368)):
[KCrash Handler]
#6  QHash (other=..., this=0x7fff0b466350) at /usr/include/qt4/QtCore/qhash.h:282
#7  QSet (other=..., this=0x7fff0b466350) at /usr/include/qt4/QtCore/qset.h:60
#8  QForeachContainer (t=..., this=0x7fff0b466350) at /usr/include/qt4/QtCore/qglobal.h:2367
#9  KoTextRangeManager::textRangesChangingWithin (this=0x0, first=0, last=0, matchFirst=0, matchLast=-1) at /build/buildd/calligra-2.6.0/libs/kotext/KoTextRangeManager.cpp:113
#10 0x00007ffc3569957a in KoTextWriter::Private::saveParagraph (this=this@entry=0x4150a20, block=..., from=from@entry=0, to=to@entry=-1) at /build/buildd/calligra-2.6.0/libs/kotext/opendocument/KoTextWriter_p.cpp:757
#11 0x00007ffc3569d433 in KoTextWriter::Private::writeBlocks (this=0x4150a20, document=0x152ad00, from=0, to=-1, listStyles=..., currentTable=0x0, currentList=0x0) at /build/buildd/calligra-2.6.0/libs/kotext/opendocument/KoTextWriter_p.cpp:136
#12 0x00007ffc356a2517 in KoTextWriter::write (this=0x7fff0b466b80, document=0x152ad00, from=0, to=-1) at /build/buildd/calligra-2.6.0/libs/kotext/opendocument/KoTextWriter.cpp:206
#13 0x00007ffc22a48483 in Calligra::Sheets::Cell::saveOdf (this=0x7fff0b466ee0, xmlwriter=..., mainStyles=..., row=36, column=2, repeated=<optimized out>, tableContext=...) at /build/buildd/calligra-2.6.0/sheets/Cell.cpp:1242
#14 0x00007ffc22b0fa0b in Calligra::Sheets::Sheet::saveOdfCells (this=this@entry=0x1418bf0, xmlWriter=..., mainStyles=..., row=36, maxCols=1024, tableContext=...) at /build/buildd/calligra-2.6.0/sheets/Sheet.cpp:2929
#15 0x00007ffc22b1b1a2 in Calligra::Sheets::Sheet::saveOdfColRowCell (this=this@entry=0x1418bf0, xmlWriter=..., mainStyles=..., maxCols=1024, maxRows=maxRows@entry=1048576, tableContext=...) at /build/buildd/calligra-2.6.0/sheets/Sheet.cpp:2883
#16 0x00007ffc22b1cb3e in Calligra::Sheets::Sheet::saveOdf (this=0x1418bf0, tableContext=...) at /build/buildd/calligra-2.6.0/sheets/Sheet.cpp:2618
#17 0x00007ffc22aee142 in Calligra::Sheets::Map::saveOdf (this=0xef7d80, xmlWriter=..., savingContext=...) at /build/buildd/calligra-2.6.0/sheets/Map.cpp:444
#18 0x00007ffc22ad92c8 in Calligra::Sheets::DocBase::saveOdfHelper (this=0xef7c80, documentContext=..., saveFlag=<optimized out>) at /build/buildd/calligra-2.6.0/sheets/DocBase.cpp:162
#19 0x00007ffc38972f4a in KoDocument::saveNativeFormatODF (this=this@entry=0xef7c80, store=store@entry=0x442abd0, mimeType=...) at /build/buildd/calligra-2.6.0/libs/main/KoDocument.cpp:618
#20 0x00007ffc38973db3 in KoDocument::saveNativeFormat (this=this@entry=0xef7c80, file=...) at /build/buildd/calligra-2.6.0/libs/main/KoDocument.cpp:602
#21 0x00007ffc3896d25f in KoDocument::saveFile (this=0xef7c80) at /build/buildd/calligra-2.6.0/libs/main/KoDocument.cpp:344
#22 0x00007ffc38a04174 in KoPart::saveFile (this=0xef1020) at /build/buildd/calligra-2.6.0/libs/main/KoPart.cpp:205
#23 0x00007ffc36d7ec3c in KParts::ReadWritePart::save (this=0xef1020) at ../../kparts/part.cpp:879
#24 0x00007ffc3899b9f8 in KoMainWindow::saveDocument (this=this@entry=0xfdc3e0, saveas=<optimized out>, saveas@entry=false, silent=silent@entry=false) at /build/buildd/calligra-2.6.0/libs/main/KoMainWindow.cpp:1086
#25 0x00007ffc3899d86d in KoMainWindow::slotFileSave (this=0xfdc3e0) at /build/buildd/calligra-2.6.0/libs/main/KoMainWindow.cpp:1321
#26 0x00007ffc389a1ab9 in KoMainWindow::qt_static_metacall (_o=0xfdc3e0, _c=<optimized out>, _id=<optimized out>, _a=0x7fff0b4688e0) at /build/buildd/calligra-2.6.0/obj-x86_64-linux-gnu/libs/main/KoMainWindow.moc:115
#27 0x00007ffc3743cf5f in QMetaObject::activate (sender=0xf9f470, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff0b4688e0) at kernel/qobject.cpp:3547
#28 0x00007ffc37e03a32 in QAction::triggered (this=this@entry=0xf9f470, _t1=false) at .moc/release-shared/moc_qaction.cpp:277
#29 0x00007ffc37e03c20 in QAction::activate (this=0xf9f470, event=<optimized out>) at kernel/qaction.cpp:1257
#30 0x00007ffc381c851f in QAbstractButtonPrivate::click (this=this@entry=0x104a5e0) at widgets/qabstractbutton.cpp:530
#31 0x00007ffc381c87cc in QAbstractButton::mouseReleaseEvent (this=0x1081b50, e=0x7fff0b4691a0) at widgets/qabstractbutton.cpp:1123
#32 0x00007ffc3828299a in QToolButton::mouseReleaseEvent (this=<optimized out>, e=<optimized out>) at widgets/qtoolbutton.cpp:718
#33 0x00007ffc37e59850 in QWidget::event (this=0x1081b50, event=0x7fff0b4691a0) at kernel/qwidget.cpp:8371
#34 0x00007ffc37e09e9c in QApplicationPrivate::notify_helper (this=this@entry=0xc4bf50, receiver=receiver@entry=0x1081b50, e=e@entry=0x7fff0b4691a0) at kernel/qapplication.cpp:4562
#35 0x00007ffc37e0eb6b in QApplication::notify (this=<optimized out>, receiver=0x1081b50, e=0x7fff0b4691a0) at kernel/qapplication.cpp:4105
#36 0x00007ffc3895cba8 in KoApplication::notify (this=<optimized out>, receiver=0x1081b50, event=0x7fff0b4691a0) at /build/buildd/calligra-2.6.0/libs/main/KoApplication.cpp:537
#37 0x00007ffc3742756e in QCoreApplication::notifyInternal (this=0x7fff0b469d70, receiver=0x1081b50, event=0x7fff0b4691a0) at kernel/qcoreapplication.cpp:915
#38 0x00007ffc37e0acd3 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#39 QApplicationPrivate::sendMouseEvent (receiver=0x1081b50, event=0x7fff0b4691a0, alienWidget=0x1081b50, nativeWidget=0x1026050, buttonDown=0x7ffc388e6308 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3173
#40 0x00007ffc37e88554 in QETWidget::translateMouseEvent (this=this@entry=0x1026050, event=event@entry=0x7fff0b469920) at kernel/qapplication_x11.cpp:4622
#41 0x00007ffc37e8744f in QApplication::x11ProcessEvent (this=0x7fff0b469d70, event=0x7fff0b469920) at kernel/qapplication_x11.cpp:3737
#42 0x00007ffc37eaefa2 in x11EventSourceDispatch (s=0xc59b00, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#43 0x00007ffc32f8aab5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007ffc32f8ade8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007ffc32f8aea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007ffc37455c16 in QEventDispatcherGlib::processEvents (this=0xbc6b30, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#47 0x00007ffc37eaec1e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#48 0x00007ffc374262bf in QEventLoop::processEvents (this=this@entry=0x7fff0b469cf0, flags=...) at kernel/qeventloop.cpp:149
#49 0x00007ffc37426548 in QEventLoop::exec (this=0x7fff0b469cf0, flags=...) at kernel/qeventloop.cpp:204
#50 0x00007ffc3742b708 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#51 0x00007ffc390a74dd in kdemain (argc=<optimized out>, argv=0x7fff0b469e88) at /build/buildd/calligra-2.6.0/sheets/part/Main.cpp:43
#52 0x00007ffc38ce076d in __libc_start_main (main=0x4006a0 <main(int, char**)>, argc=2, ubp_av=0x7fff0b469e88, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff0b469e78) at libc-start.c:226
#53 0x00000000004006d1 in _start ()

Possible duplicates by query: bug 314675, bug 313270.

Reported using DrKonqi
Comment 1 Friedrich W. H. Kossebau 2013-02-08 21:00:23 UTC
Can reproduce, did a patch which fixes it for me, currently in review process, see https://git.reviewboard.kde.org/r/108868
Comment 2 Friedrich W. H. Kossebau 2013-02-08 22:40:49 UTC
Git commit cb552345280fa19e4d99707bfce9900ac4d04b65 by Friedrich W. H. Kossebau.
Committed on 08/02/2013 at 23:31.
Pushed by kossebau into branch 'master'.

fix KoTextWriter::saveParagraph(...) to not crash on QTextDocuments without a KoTextRangeManager

REVIEW: 108868

thanks boemann for review

M  +18   -13   libs/kotext/opendocument/KoTextWriter_p.cpp

http://commits.kde.org/calligra/cb552345280fa19e4d99707bfce9900ac4d04b65
Comment 3 Friedrich W. H. Kossebau 2013-02-08 22:44:15 UTC
Git commit 3e23fb0e989090f7f57fb698f101b562bb830bdb by Friedrich W. H. Kossebau.
Committed on 08/02/2013 at 23:43.
Pushed by kossebau into branch 'calligra/2.6'.

fix KoTextWriter::saveParagraph(...) to not crash on QTextDocuments without a KoTextRangeManager

REVIEW: 108868
FIXED-IN: 2.6.1

thanks boemann for review

M  +18   -13   libs/kotext/opendocument/KoTextWriter_p.cpp

http://commits.kde.org/calligra/3e23fb0e989090f7f57fb698f101b562bb830bdb
Comment 4 Daniel Moyne 2013-02-22 11:16:54 UTC
Created attachment 77503 [details]
New crash information added by DrKonqi

calligrasheets (2.6.0) on KDE Platform 4.10.00 using Qt 4.8.3

- What I was doing when the application crashed:
opening a sheet and closing it withaout any modification

-- Backtrace (Reduced):
#6  QHash (other=..., this=0x7fff02836dc0) at /usr/include/qt4/QtCore/qhash.h:282
#7  QSet (other=..., this=0x7fff02836dc0) at /usr/include/qt4/QtCore/qset.h:60
#8  QForeachContainer (t=..., this=0x7fff02836dc0) at /usr/include/qt4/QtCore/qglobal.h:2367
#9  KoTextRangeManager::textRangesChangingWithin (this=0x0, first=0, last=0, matchFirst=0, matchLast=-1) at /build/buildd/calligra-2.6.0/libs/kotext/KoTextRangeManager.cpp:113
#10 0x00007fcefc73457a in KoTextWriter::Private::saveParagraph (this=this@entry=0x588cd80, block=..., from=from@entry=0, to=to@entry=-1) at /build/buildd/calligra-2.6.0/libs/kotext/opendocument/KoTextWriter_p.cpp:757
Comment 5 Friedrich W. H. Kossebau 2013-02-22 11:33:43 UTC
Thanks for new report. Please see if there are already 2.6.1 packages for Ubuntu, and then test this again, should be fixed there. At least in the information extracted by DrKonqui it still says "calligrasheets (2.6.0) " in your new report, so the code your are using is not yet based on the 2.6.1 release.
Comment 6 Marijn Kruisselbrink 2013-03-09 10:46:39 UTC
*** Bug 313270 has been marked as a duplicate of this bug. ***