Bug 298613 - Calligra Words crashes after closing
Summary: Calligra Words crashes after closing
Status: RESOLVED FIXED
Alias: None
Product: calligracommon
Classification: Applications
Component: general (show other bugs)
Version: 2.4.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Calligra Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-22 17:03 UTC by Felix Michel
Modified: 2012-05-11 17:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Log calligra words with valgrind (35.14 KB, application/octet-stream)
2012-04-22 17:41 UTC, Felix Michel
Details
Crash log (3.78 KB, application/octet-stream)
2012-05-04 03:29 UTC, Mani
Details
patch that disables some deletion of static objects (1.05 KB, patch)
2012-05-04 08:47 UTC, Halla Rempt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Michel 2012-04-22 17:03:36 UTC
Application: calligrawords (2.4.0)
KDE Platform Version: 4.8.2 (4.8.2)
Qt Version: 4.8.1
Operating System: Linux 3.3.2-1-ARCH x86_64
Distribution: "Arch Linux"

-- Information about the crash:
I just closed the calligra words. I was looking at a .docx document and then i closed calligra words.

-- Backtrace:
Application: Calligra Words (kdeinit4), signal: Segmentation fault
Using host libthread_db library "/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f67d7e65780 (LWP 5776))]

Thread 2 (Thread 0x7f67b3d9e700 (LWP 5777)):
#0  0x00007f67d6706d9f in __pthread_mutex_unlock_usercnt () from /lib/libpthread.so.0
#1  0x00007f67d23c6255 in g_main_context_query () from /usr/lib/libglib-2.0.so.0
#2  0x00007f67d23c6cca in ?? () from /usr/lib/libglib-2.0.so.0
#3  0x00007f67d23c7289 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0x00007f67d6abb1b6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f67d6a8bf8f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f67d6a8c218 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0x00007f67d69906f0 in QThread::exec() () from /usr/lib/libQtCore.so.4
#8  0x00007f67d6a6c98f in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f67d699368b in ?? () from /usr/lib/libQtCore.so.4
#10 0x00007f67c7e6bb74 in ?? () from /usr/lib/libGL.so.1
#11 0x00007f67d6703e0e in start_thread () from /lib/libpthread.so.0
#12 0x00007f67d54991ed in clone () from /lib/libc.so.6

Thread 1 (Thread 0x7f67d7e65780 (LWP 5776)):
[KCrash Handler]
#6  0x00007f67b1807084 in KoInputDeviceHandlerRegistry::~KoInputDeviceHandlerRegistry() () from /usr/lib/libflake.so.8
#7  0x00007f67b1807279 in KoInputDeviceHandlerRegistry::~KoInputDeviceHandlerRegistry() () from /usr/lib/libflake.so.8
#8  0x00007f67d53ec7c1 in __run_exit_handlers () from /lib/libc.so.6
#9  0x00007f67d53ec845 in exit () from /lib/libc.so.6
#10 0x00000000004083eb in _start ()

Reported using DrKonqi
Comment 1 Camilla Boemann 2012-04-22 17:07:41 UTC
That looks a bit weird. Do you have any mose stylus, attached or is it a tablet pc?
Comment 2 Felix Michel 2012-04-22 17:14:08 UTC
No, it is a normal notebook (Lenovo T410).
Comment 3 Felix Michel 2012-04-22 17:16:01 UTC
If I open the file again and close calligra again it happens again. I dont want to attach the file here, can i send you an email with the file?
Comment 4 Camilla Boemann 2012-04-22 17:19:11 UTC
Ok thanks
 Don't have your hops high, as unless we can reproduce it too we can probably not figure out how to fix it
Comment 5 Camilla Boemann 2012-04-22 17:21:49 UTC
and yes you can send me the file but i doubt it's related to the file
Comment 6 Felix Michel 2012-04-22 17:23:32 UTC
It doesnt seem ti be related, it also happens with other files. Can i do something to make fixing it possible?
Comment 7 Halla Rempt 2012-04-22 17:30:43 UTC
Hm.... This is a bit mysterious. Could you run with valgrind and attach the log? That might show us what happens. It's a very uncommon crash in any case...
Comment 8 Felix Michel 2012-04-22 17:41:46 UTC
Created attachment 70572 [details]
Log calligra words with valgrind

No idea if i did it in the right way.
Comment 9 Mani 2012-05-04 03:29:22 UTC
Created attachment 70845 [details]
Crash log
Comment 10 Mani 2012-05-04 03:30:05 UTC
I can confirm the crash. Happens everytime I open&close calligra words
Comment 11 Halla Rempt 2012-05-04 08:25:56 UTC
Hm, that's actually a different crash -- but the same cause, I guess. It happens when we try to cleanly delete static objects.
Comment 12 Halla Rempt 2012-05-04 08:47:53 UTC
Created attachment 70849 [details]
patch that disables some deletion of static objects

This patch removes the deletes that cause problems for some people; it's all a bit mysterious, but if we try to delete static stuff on shutdown, it sometimes fails for some people, never fails for others and always fails for yet other people. Basically, on app-exit, it's faster to just leak everything that doesn't need to be explicitly destructed because it needs to save something.
Comment 13 Halla Rempt 2012-05-08 08:27:49 UTC
Git commit 87c5ee4cdcf09cd9d95b7b20ff902bef5a3f3007 by Boudewijn Rempt.
Committed on 07/05/2012 at 15:01.
Pushed by rempt into branch 'master'.

Do not delete some static stuff on exit

Depending on the order of deletion and other variables, these delete
calls might cause a crash on exit or not. And there's actually no
memory leak, since this is all static stuff that's present for the
lifetime of the application.

In this case, it's better to just quit, than explicitly free all memory.
The bytes are gone with the process, and there isn't stuff that needs
to be written on quit here.
Related: bug 287053

M  +3    -1    libs/flake/KoInputDeviceHandlerRegistry.cpp
M  +3    -1    libs/pigment/lut.h

http://commits.kde.org/calligra/87c5ee4cdcf09cd9d95b7b20ff902bef5a3f3007
Comment 14 Mani 2012-05-11 17:32:09 UTC
Yay!! It did not crash now...