Bug 286387

Summary: Calligra Tables crashes if the user opens a file while editing any cell for the first time
Product: [Applications] calligrasheets Reporter: Alvaro Fernando García <alvarofernandogarcia>
Component: generalAssignee: Calligra Sheets (KSpread) Bugs <calligra-sheets-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: justin.zobel, sebsauer
Priority: NOR    
Version First Reported In: 2.4-snapshots   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Alvaro Fernando García 2011-11-12 02:24:42 UTC
Version:           2.4-snapshots (using KDE 4.7.3) 
OS:                Linux

Application: calligratables (2.4 Beta 3)
KDE Platform Version: 4.7.3 (4.7.3)
Qt Version: 4.7.4
Operating System: Linux 3.1.0-4-ARCH x86_64
Distribution: "Arch Linux"

Calligra Tables crashes if the user opens a new file while editing a cell for first time.

The issue only happens when the user attempts to open a file WHILE editing a cell for the first time... After working with other options or cells, the issue does not occur.

Note: I have attached a backtrace, but some debugging symbols are not present in this machine... I will upload a new backtrace later, from other pc.

Reproducible: Always

Steps to Reproduce:
1- Open a new Calligra Tables session.
2- Select the "blank worksheet" template.
3- Write to any cell (it can be a single characcter or many) without pressing "enter" or deselecting the cell.
4- Try to open another file using the "Open" icon from the toolbar.

Actual Results:  
The application crashes just after pressing "ok" in the "open document" dialog. 

Expected Results:  
The application ask the user about saving the file and after that a new document can be opened normally.

-- Backtrace:
Application: Tables (calligratables), signal: Segmentation fault
[Current thread is 1 (Thread 0x7ffb233d6780 (LWP 3510))]

Thread 2 (Thread 0x7ffb01204700 (LWP 3511)):
#0  0x00007ffb1db17d44 in pthread_mutex_lock () from /lib/libpthread.so.0
#1  0x00007ffb1d85cdc3 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#2  0x00007ffb1d85db9d in ?? () from /usr/lib/libglib-2.0.so.0
#3  0x00007ffb1d85e1c9 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0x00007ffb214af66e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007ffb21483a92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007ffb21483c97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0x00007ffb2139b13f in QThread::exec() () from /usr/lib/libQtCore.so.4
#8  0x00007ffb21466aef in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007ffb2139dbc5 in ?? () from /usr/lib/libQtCore.so.4
#10 0x00007ffb1db15df0 in start_thread () from /lib/libpthread.so.0
#11 0x00007ffb22d6739d in clone () from /lib/libc.so.6
#12 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffb233d6780 (LWP 3510)):
[KCrash Handler]
#6  0x00007ffb21ea6715 in QWidget::setParent(QWidget*) () from /usr/lib/libQtGui.so.4
#7  0x00007ffb229e04c3 in ?? () from /usr/lib/libkomain.so.8
#8  0x00007ffb22994d45 in KoDockerManager::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkomain.so.8
#9  0x00007ffb214975ea in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#10 0x00007ffb1f50a152 in KoCanvasControllerWidget::toolOptionWidgetsChanged(QList<QWidget*> const&) () from /usr/lib/libflake.so.8
#11 0x00007ffb1f51b0b2 in KoToolManager::Private::postSwitchTool(bool) () from /usr/lib/libflake.so.8
#12 0x00007ffb1f51c05d in KoToolManager::Private::switchTool(KoToolBase*, bool) () from /usr/lib/libflake.so.8
#13 0x00007ffb1f51d5cf in KoToolManager::Private::switchTool(QString const&, bool) () from /usr/lib/libflake.so.8
#14 0x00007ffb0f1a4422 in Calligra::Tables::View::finishLoading() () from /usr/lib/libcalligratablescommon.so.8
#15 0x00007ffb0f1ab9aa in Calligra::Tables::View::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libcalligratablescommon.so.8
#16 0x00007ffb214975ea in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#17 0x00007ffb2149f6af in ?? () from /usr/lib/libQtCore.so.4
#18 0x00007ffb2149aeb9 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#19 0x00007ffb21e52ae4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#20 0x00007ffb21e57951 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#21 0x00007ffb1e472bb6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#22 0x00007ffb2148489c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#23 0x00007ffb214b1492 in ?? () from /usr/lib/libQtCore.so.4
#24 0x00007ffb214aec44 in ?? () from /usr/lib/libQtCore.so.4
#25 0x00007ffb1d85d7fd in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#26 0x00007ffb1d85dff8 in ?? () from /usr/lib/libglib-2.0.so.0
#27 0x00007ffb1d85e1c9 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#28 0x00007ffb214af606 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#29 0x00007ffb21ef5eee in ?? () from /usr/lib/libQtGui.so.4
#30 0x00007ffb21483a92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#31 0x00007ffb21483c97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#32 0x00007ffb21487eab in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#33 0x00007ffb2301c745 in kdemain () from /usr/lib/libkdeinit4_calligratables.so
#34 0x00007ffb22cb417d in __libc_start_main () from /lib/libc.so.6
#35 0x0000000000400671 in _start ()
Comment 1 Sebastian Sauer 2011-11-16 22:08:17 UTC
Can reproduce with master.

Application: Tables (calligratables), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f83313ae7a0 (LWP 3382))]

Thread 2 (Thread 0x7f830e2e4700 (LWP 3386)):
#0  0x00007f832a9ec4f3 in poll () from /lib64/libc.so.6
#1  0x00007f832554a114 in ?? () from /lib64/libglib-2.0.so.0
#2  0x00007f832554a650 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007f832ba27636 in QEventDispatcherGlib::processEvents (this=0xcbf930, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007f832b9fbc22 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f832b9fbe35 in QEventLoop::exec (this=0x7f830e2e3ce0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007f832b910be4 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:498
#7  0x00007f832b9dd358 in QInotifyFileSystemWatcherEngine::run (this=0x1841610) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f832b9134d5 in QThreadPrivate::start (arg=0x1841610) at thread/qthread_unix.cpp:331
#9  0x00007f8328e089e3 in ?? () from /usr/lib64/libGL.so.1
#10 0x00007f832b682a3f in start_thread () from /lib64/libpthread.so.0
#11 0x00007f832a9f566d in clone () from /lib64/libc.so.6
#12 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f83313ae7a0 (LWP 3382)):
[KCrash Handler]
#6  parent (this=0xcd20a0) at ../../src/corelib/kernel/qobject.h:250
#7  parentWidget (this=0xcd20a0) at ../../src/gui/kernel/qwidget.h:1022
#8  QWidget::window (this=0xcd20a0) at kernel/qwidget.cpp:4291
#9  0x00007f832c682a11 in QWidget::setParent (this=0xcd20a0, parent=0xab49b0, f=...) at kernel/qwidget.cpp:10064
#10 0x00007f832c683322 in QWidget::setParent (this=<value optimized out>, parent=<value optimized out>) at kernel/qwidget.cpp:10049
#11 0x00007f8330cf5c49 in KoToolDocker::Private::recreateLayout (this=0xaa3a80, optionWidgetList=...) at /home/snoopy/src/calligra/libs/main/KoToolDocker.cpp:84
#12 0x00007f8330cf55a3 in KoToolDocker::setOptionWidgets (this=0x734270, optionWidgetList=...) at /home/snoopy/src/calligra/libs/main/KoToolDocker.cpp:276
#13 0x00007f8330c99070 in KoDockerManager::newOptionWidgets (this=0x702450, optionWidgetList=...) at /home/snoopy/src/calligra/libs/main/KoDockerManager.cpp:170
#14 0x00007f8330c991ee in KoDockerManager::qt_metacall (this=0x702450, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffb7d8c150) at /home/snoopy/src/build/calligra/libs/main/KoDockerManager.moc:78
#15 0x00007f832ba10e8f in QMetaObject::activate (sender=0x1874d30, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffb7d8c150) at kernel/qobject.cpp:3287
#16 0x00007f83302995f5 in KoCanvasControllerWidget::toolOptionWidgetsChanged (this=0x1874d30, _t1=...) at /home/snoopy/src/build/calligra/libs/flake/KoCanvasControllerWidget.moc:97
#17 0x00007f8330298969 in KoCanvasControllerWidget::setToolOptionWidgets (this=0x1874d30, widgetMap=...) at /home/snoopy/src/calligra/libs/flake/KoCanvasControllerWidget.cpp:534
#18 0x00007f83302ac360 in KoToolManager::Private::postSwitchTool (this=0xda46e0, temporary=false) at /home/snoopy/src/calligra/libs/flake/KoToolManager.cpp:388
#19 0x00007f83302ab3ad in KoToolManager::Private::switchTool (this=0xda46e0, tool=0x20f7290, temporary=false) at /home/snoopy/src/calligra/libs/flake/KoToolManager.cpp:274
#20 0x00007f83302ab738 in KoToolManager::Private::switchTool (this=0xda46e0, id=..., temporary=false) at /home/snoopy/src/calligra/libs/flake/KoToolManager.cpp:300
#21 0x00007f83302afdda in KoToolManager::switchToolRequested (this=0xdeb3e0, id=...) at /home/snoopy/src/calligra/libs/flake/KoToolManager.cpp:853
#22 0x00007f831b3be0fa in Calligra::Tables::View::finishLoading (this=0xab5390) at /home/snoopy/src/calligra/tables/part/View.cpp:1112
#23 0x00007f831b3c4b30 in Calligra::Tables::View::qt_metacall (this=0xab5390, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fffb7d8c6d0) at /home/snoopy/src/build/calligra/tables/View.moc:162
#24 0x00007f832ba10e8f in QMetaObject::activate (sender=0x22f97f0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3287
#25 0x00007f832ba17aff in QSingleShotTimer::timerEvent (this=0x22f97f0) at kernel/qtimer.cpp:308
#26 0x00007f832ba104d9 in QObject::event (this=0x22f97f0, e=<value optimized out>) at kernel/qobject.cpp:1190
#27 0x00007f832c62e264 in QApplicationPrivate::notify_helper (this=0x706140, receiver=0x22f97f0, e=0x7fffb7d8ce80) at kernel/qapplication.cpp:4481
#28 0x00007f832c63681a in QApplication::notify (this=<value optimized out>, receiver=0x22f97f0, e=0x7fffb7d8ce80) at kernel/qapplication.cpp:4360
#29 0x00007f832d345ae6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#30 0x00007f832b9fc7cc in QCoreApplication::notifyInternal (this=0x7fffb7d8d1f0, receiver=0x22f97f0, event=0x7fffb7d8ce80) at kernel/qcoreapplication.cpp:787
#31 0x00007f832ba2a198 in sendEvent (this=0x700f50) at kernel/qcoreapplication.h:215
#32 QTimerInfoList::activateTimers (this=0x700f50) at kernel/qeventdispatcher_unix.cpp:618
#33 0x00007f832ba26f04 in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#34 0x00007f8325549bd3 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#35 0x00007f832554a3b0 in ?? () from /lib64/libglib-2.0.so.0
#36 0x00007f832554a650 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#37 0x00007f832ba275df in QEventDispatcherGlib::processEvents (this=0x6507b0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#38 0x00007f832c6d41ae in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#39 0x00007f832b9fbc22 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#40 0x00007f832b9fbe35 in QEventLoop::exec (this=0x7fffb7d8d190, flags=...) at kernel/qeventloop.cpp:201
#41 0x00007f832ba0027b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#42 0x00007f8330fe5823 in kdemain (argc=1, argv=0x7fffb7d8d3e8) at /home/snoopy/src/calligra/tables/part/Main.cpp:43
#43 0x0000000000400976 in main (argc=1, argv=0x7fffb7d8d3e8) at /home/snoopy/src/build/calligra/tables/calligratables_dummy.cpp:3
Comment 2 Justin Zobel 2020-12-09 02:08:10 UTC
Thank you for the crash report, Alvaro and Sebastian.

As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you.
Comment 3 Bug Janitor Service 2020-12-24 04:34:38 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2021-01-08 04:34:09 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!