Bug 322707

Summary: Random crash when I close krita after saving a file
Product: [Applications] krita Reporter: Odysseas <xb_creations>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: halla, ochoa.juancarlos, sven.langkamp, xb_creations
Priority: NOR    
Version: 2.8 Pre-Alpha   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi

Description Odysseas 2013-07-22 21:33:15 UTC
Application: krita (2.8 Pre-Alpha)
KDE Platform Version: 4.10.5 (Compiled from sources)
Qt Version: 4.8.4
Operating System: Linux 3.8.0-26-generic x86_64
Distribution: Ubuntu 13.04

-- Information about the crash:
- What I was doing when the application crashed:
I saved an image file and afer that closed Krita. The crash report came up. When I opened the file again, it was corrupted.(random noise)
This happened some times, with psd and jpg files.

- Custom settings of the application:
opengl active

The crash can be reproduced sometimes.

-- Backtrace:
Application: Krita (kdeinit4), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f69fe5a87c0 (LWP 13800))]

Thread 5 (Thread 0x7f69d7313700 (LWP 13801)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f69fd12514b in wait (time=18446744073709551615, this=0x1c90e00) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1c90db0, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f69fd121067 in QSemaphore::acquire (this=this@entry=0x1c90b00, n=n@entry=1) at thread/qsemaphore.cpp:144
#4  0x00007f69dffa0434 in waitForWork (this=0x1c90af0) at /build/buildd/krita-testing-2+git20130719+r74129-41/krita/image/tiles3/kis_tile_data_pooler.cc:162
#5  KisTileDataPooler::run (this=0x1c90af0) at /build/buildd/krita-testing-2+git20130719+r74129-41/krita/image/tiles3/kis_tile_data_pooler.cc:184
#6  0x00007f69fd124bec in QThreadPrivate::start (arg=0x1c90af0) at thread/qthread_unix.cpp:338
#7  0x00007f69f963af8e in start_thread (arg=0x7f69d7313700) at pthread_create.c:311
#8  0x00007f69fbe2ae1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 4 (Thread 0x7f69d6b12700 (LWP 13802)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007f69fd1237f6 in thread_sleep (ti=ti@entry=0x7f69d6b11dc0) at thread/qthread_unix.cpp:475
#2  0x00007f69fd12402d in QThread::msleep (msecs=msecs@entry=700) at thread/qthread_unix.cpp:501
#3  0x00007f69dffce12a in KisTileDataSwapper::run (this=0x1c90b28) at /build/buildd/krita-testing-2+git20130719+r74129-41/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:97
#4  0x00007f69fd124bec in QThreadPrivate::start (arg=0x1c90b28) at thread/qthread_unix.cpp:338
#5  0x00007f69f963af8e in start_thread (arg=0x7f69d6b12700) at pthread_create.c:311
#6  0x00007f69fbe2ae1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 3 (Thread 0x7f69cffff700 (LWP 13819)):
#0  0x00007f69fbe23233 in select () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f69fd24d4f3 in qt_safe_select (nfds=24, fdread=0x7f69c59592f8, fdwrite=0x7f69c5959590, fdexcept=0x7f69c5959828, orig_timeout=0x0) at kernel/qcore_unix.cpp:83
#2  0x00007f69fd252499 in QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7f69c5959140, flags=..., timeout=0x0) at kernel/qeventdispatcher_unix.cpp:223
#3  0x00007f69fd252c82 in QEventDispatcherUNIX::processEvents (this=0x7f69c40008f0, flags=...) at kernel/qeventdispatcher_unix.cpp:937
#4  0x00007f69fd22038f in QEventLoop::processEvents (this=this@entry=0x7f69cfffed90, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f69fd220618 in QEventLoop::exec (this=this@entry=0x7f69cfffed90, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f69fd122410 in QThread::exec (this=this@entry=0x3214f00) at thread/qthread.cpp:542
#7  0x00007f69fd201edf in QInotifyFileSystemWatcherEngine::run (this=0x3214f00) at io/qfilesystemwatcher_inotify.cpp:256
#8  0x00007f69fd124bec in QThreadPrivate::start (arg=0x3214f00) at thread/qthread_unix.cpp:338
#9  0x00007f69f963af8e in start_thread (arg=0x7f69cffff700) at pthread_create.c:311
#10 0x00007f69fbe2ae1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 2 (Thread 0x7f696ffff700 (LWP 14946)):
#0  0x00007f69fbe23233 in select () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f69fd24d4f3 in qt_safe_select (nfds=50, fdread=0x7f69a42d3658, fdwrite=0x7f69a42d38f0, fdexcept=0x7f69a42d3b88, orig_timeout=0x0) at kernel/qcore_unix.cpp:83
#2  0x00007f69fd252499 in QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7f69a42d34a0, flags=..., timeout=0x0) at kernel/qeventdispatcher_unix.cpp:223
#3  0x00007f69fd252c82 in QEventDispatcherUNIX::processEvents (this=0x7f69a43c6520, flags=...) at kernel/qeventdispatcher_unix.cpp:937
#4  0x00007f69fd22038f in QEventLoop::processEvents (this=this@entry=0x7f696fffed90, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f69fd220618 in QEventLoop::exec (this=this@entry=0x7f696fffed90, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f69fd122410 in QThread::exec (this=this@entry=0x5e1f600) at thread/qthread.cpp:542
#7  0x00007f69fd201edf in QInotifyFileSystemWatcherEngine::run (this=0x5e1f600) at io/qfilesystemwatcher_inotify.cpp:256
#8  0x00007f69fd124bec in QThreadPrivate::start (arg=0x5e1f600) at thread/qthread_unix.cpp:338
#9  0x00007f69f963af8e in start_thread (arg=0x7f696ffff700) at pthread_create.c:311
#10 0x00007f69fbe2ae1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7f69fe5a87c0 (LWP 13800)):
[KCrash Handler]
#6  0x00007f69fbd68037 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007f69fbd6b698 in __GI_abort () at abort.c:90
#8  0x00007f69fd11a5c2 in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=0x111d1e48 "ASSERT: \"_ref == 0\" in file /build/buildd/krita-testing-2+git20130719+r74129-41/krita/image/kis_shared.cc, line 54") at global/qglobal.cpp:2347
#9  0x00007f69fd11a938 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, msg=msg@entry=0x7f69fd284548 "ASSERT: \"%s\" in file %s, line %d", ap=ap@entry=0x7fff2100bc18) at global/qglobal.cpp:2393
#10 0x00007f69fd11aac4 in qFatal (msg=msg@entry=0x7f69fd284548 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2576
#11 0x00007f69fd11ab06 in qt_assert (assertion=assertion@entry=0x7f69e020fa36 "_ref == 0", file=file@entry=0x7f69e020f9e8 "/build/buildd/krita-testing-2+git20130719+r74129-41/krita/image/kis_shared.cc", line=line@entry=54) at global/qglobal.cpp:2021
#12 0x00007f69e015aaf0 in KisShared::~KisShared (this=0x5ed2260, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130719+r74129-41/krita/image/kis_shared.cc:54
#13 0x00007f69d830d958 in KisBrush::~KisBrush (this=0x5ed2250, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130719+r74129-41/krita/plugins/paintops/libbrush/kis_brush.cpp:158
#14 0x00007f69d8319aa9 in KisGbrBrush::~KisGbrBrush (this=0x5ed2250, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130719+r74129-41/krita/plugins/paintops/libbrush/kis_gbr_brush.cpp:152
#15 0x00007f69d831376e in qDeleteAll<QList<KisBrush*>::const_iterator> (end=..., begin=...) at /usr/include/qt4/QtCore/qalgorithms.h:322
#16 qDeleteAll<QList<KisBrush*> > (c=...) at /usr/include/qt4/QtCore/qalgorithms.h:330
#17 ~KoResourceServer (this=0x1d10bd0, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130719+r74129-41/libs/widgets/KoResourceServer.h:127
#18 BrushResourceServer::~BrushResourceServer (this=0x1d10bd0, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130719+r74129-41/krita/plugins/paintops/libbrush/kis_brush_server.cpp:50
#19 0x00007f69d8313cd9 in BrushResourceServer::~BrushResourceServer (this=0x1d10bd0, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130719+r74129-41/krita/plugins/paintops/libbrush/kis_brush_server.cpp:55
#20 0x00007f69d8311a3e in KisBrushServer::~KisBrushServer (this=0x1d101c0, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130719+r74129-41/krita/plugins/paintops/libbrush/kis_brush_server.cpp:168
#21 0x00007f69d8311aa9 in KisBrushServer::~KisBrushServer (this=0x1d101c0, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130719+r74129-41/krita/plugins/paintops/libbrush/kis_brush_server.cpp:169
#22 0x00007f69fbd6d121 in __run_exit_handlers (status=0, listp=0x7f69fc0f26a8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:77
#23 0x00007f69fbd6d1a5 in __GI_exit (status=<optimized out>) at exit.c:99
#24 0x00000000004084f1 in launch (argc=argc@entry=1, _name=_name@entry=0xf55c38 "/opt/project-neon/bin/krita", args=args@entry=0xf55c54 "\001", cwd=cwd@entry=0x0, envc=envc@entry=1, envs=<optimized out>, envs@entry=0xf55c5c "DISPLAY=:0", reset_env=false, tty=tty@entry=0x0, avoid_loops=false, startup_id_str=startup_id_str@entry=0xf55c6f "odysseas-Inspiron-7720;1374523378;799738;2047_TIME17471274") at ../../kinit/kinit.cpp:738
#25 0x00000000004095fb in handle_launcher_request (sock=8, who=<optimized out>) at ../../kinit/kinit.cpp:1230
#26 0x0000000000409c40 in handle_requests (waitForPid=waitForPid@entry=0) at ../../kinit/kinit.cpp:1423
#27 0x00000000004054f7 in main (argc=4, argv=<optimized out>, envp=0x7fff2100cc50) at ../../kinit/kinit.cpp:1911

Possible duplicates by query: bug 321758, bug 321616, bug 316495, bug 313194, bug 313047.

Reported using DrKonqi
Comment 1 Odysseas 2013-07-24 21:50:21 UTC
Created attachment 81326 [details]
New crash information added by DrKonqi

krita (2.8 Pre-Alpha) on KDE Platform 4.10.5 using Qt 4.8.4

- What I was doing when the application crashed:
Saved psd file. Unusual behavior I noticed was that the fav palette did not function- both in full screen and normal screen mode.
- Custom settings of the application:
opengl active

-- Backtrace (Reduced):
#6  0x00007f6793909037 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007f679390c698 in __GI_abort () at abort.c:90
[...]
#11 0x00007f6794cbbb06 in qt_assert (assertion=assertion@entry=0x7f6777d22a36 "_ref == 0", file=file@entry=0x7f6777d229e8 "/build/buildd/krita-testing-2+git20130719+r74129-41/krita/image/kis_shared.cc", line=line@entry=54) at global/qglobal.cpp:2021
#12 0x00007f6777c6daf0 in KisShared::~KisShared (this=0x62e5f60, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130719+r74129-41/krita/image/kis_shared.cc:54
#13 0x00007f676fe20958 in KisBrush::~KisBrush (this=0x62e5f50, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130719+r74129-41/krita/plugins/paintops/libbrush/kis_brush.cpp:158
Comment 2 Sven Langkamp 2013-08-18 19:51:29 UTC
Is the crash reproducible?
Comment 3 Halla Rempt 2013-09-15 10:56:52 UTC
Hi Odysseas,

Can you try to update your build and reproduce?
Comment 4 Juan 2013-10-13 21:19:33 UTC
Created attachment 82835 [details]
New crash information added by DrKonqi

krita (2.8 Pre-Alpha) on KDE Platform 4.10.5 using Qt 4.8.4

- What I was doing when the application crashed: Closing Krita, every single time for the last week or so this has happened.

-- Backtrace (Reduced):
#10 0x00007f34d8c255a0 in KisShared::~KisShared (this=0x331aae90, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130918+r74434-40/krita/image/kis_shared.cc:54
#11 0x00007f34d0d3a5c8 in KisBrush::~KisBrush (this=0x331aae80, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130918+r74434-40/krita/plugins/paintops/libbrush/kis_brush.cpp:158
#12 0x00007f34d0d468f9 in KisGbrBrush::~KisGbrBrush (this=0x331aae80, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130918+r74434-40/krita/plugins/paintops/libbrush/kis_gbr_brush.cpp:152
#13 0x00007f34d0d405be in qDeleteAll<QList<KisBrush*>::const_iterator> (end=..., begin=...) at /usr/include/qt4/QtCore/qalgorithms.h:322
#14 qDeleteAll<QList<KisBrush*> > (c=...) at /usr/include/qt4/QtCore/qalgorithms.h:330
Comment 5 Halla Rempt 2013-10-30 14:44:14 UTC
*** Bug 326067 has been marked as a duplicate of this bug. ***
Comment 6 Halla Rempt 2013-10-30 14:45:47 UTC
Hi Odysseas,

Do you have any custom brushes installed? .gbr files specifically?
Comment 7 Halla Rempt 2013-10-31 10:07:34 UTC
Git commit 0080fc15a49a683b348c4dd80dce045a49b810cf by Boudewijn Rempt.
Committed on 30/10/2013 at 15:08.
Pushed by rempt into branch 'master'.

Do not delete shared pointer-based resources
Related: bug 326067

M  +0    -7    krita/plugins/paintops/libbrush/kis_brush_server.cpp
M  +60   -51   libs/widgets/KoResourceServer.h

http://commits.kde.org/calligra/0080fc15a49a683b348c4dd80dce045a49b810cf
Comment 8 Odysseas 2013-10-31 16:58:10 UTC
Greetings Boudewijn,
I am really sorry for my long absence! I now have some time to go on with Krita.
So, after the new update I didn't have any crashes or corrupted files. 

Especially after the recent update from kubuntu 13.04 to 13.10, Krita seems to be more stable than the OS!(if something like this is possible)

So now I mainly deal with plasma desktop crashing, software not working anymore properly, and a quite slower system....but Krita is running like a champion! (so far)
Comment 9 Odysseas 2013-10-31 17:07:40 UTC
(In reply to comment #2)
> Is the crash reproducible?

Not anymore!
In the older built I sometimes was able to reproduce it by working on large files and opengl on.
Comment 10 Halla Rempt 2013-10-31 18:44:49 UTC
Thanks for confirming!
Comment 11 Odysseas 2013-10-31 22:49:59 UTC
Created attachment 83259 [details]
New crash information added by DrKonqi

krita (2.8 Pre-Alpha) on KDE Platform 4.11.2 using Qt 4.8.4

- What I was doing when the application crashed:
Krita was idle for several minutes with a file open, I pressed the 'x' button to close and asked me if I wanted to save the file.
I saved, pressed the 'x' button again and then came the crash report.

- Custom settings of the application:
Custom brushes including captured brushes (*.gbr)

-- Backtrace (Reduced):
#6  0x00007f31874a6f77 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007f31874aa5e8 in __GI_abort () at abort.c:90
[...]
#11 0x00007f318885f4c6 in qt_assert (assertion=assertion@entry=0x7f316ba14fb6 "_ref == 0", file=file@entry=0x7f316ba14f68 "/build/buildd/krita-testing-2+git20130808+r74237-41/krita/image/kis_shared.cc", line=line@entry=54) at global/qglobal.cpp:2021
#12 0x00007f316b9607f0 in KisShared::~KisShared (this=0x4f1fc40, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130808+r74237-41/krita/image/kis_shared.cc:54
#13 0x00007f3163b4a708 in KisBrush::~KisBrush (this=0x4f1fc30, __in_chrg=<optimized out>) at /build/buildd/krita-testing-2+git20130808+r74237-41/krita/plugins/paintops/libbrush/kis_brush.cpp:158
Comment 12 Odysseas 2013-11-01 11:15:37 UTC
:(
I spoke too soon!
This crash happened some hours later with an average-sized file of 4000x 4000 px and 3-4 layers.
Luckily the file was saved normally and was not corrupted like the previous times.
Comment 13 Halla Rempt 2013-11-01 11:16:40 UTC
With which version of Krita was that? And do you have a new backtrace for me?
Comment 14 Odysseas 2013-11-01 11:23:36 UTC
(In reply to comment #13)
> With which version of Krita was that? And do you have a new backtrace for me?

Hi Boudewijn,

The Krita version and crash information is in the comment 11
Can I provide you with something else?
Comment 15 Halla Rempt 2013-11-01 11:25:07 UTC
Ah, I was wondering whether you've got a new version installed. I did fix some possible issues there yesterday.