Bug 350870

Summary: Crash as soon as I use a brush on multi layered file
Product: [Applications] krita Reporter: goldphnx
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: dimula73, griffinvalley, halla
Priority: NOR    
Version First Reported In: 2.9.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description goldphnx 2015-08-02 01:20:30 UTC
Application: krita (2.9.0)
KDE Platform Version: 4.14.1
Qt Version: 4.8.6
Operating System: Linux 3.16.0-44-lowlatency x86_64
Distribution: Ubuntu 14.10

-- Information about the crash:
- What I was doing when the application crashed:  I had 3 layers (two locked, one free) and was attempting to trace the image on the lower, locked layer using the top free layer.  As soon as I did one stroke it crashes everytime. I'm using Krita 2.9 from ppa on ubuntustudio 14.10.
There were no recent updates and I was able to trace other layers in the past.  This has just started and now happens everytime.
Kernel 3.16.0 lowlatency
Xorg: 1.16.0
Processor: AMD FX 6100 six core 2400 MHZ L2: 2048KB
RAM: 16GB
Graphics: AMD/ATI Radeon HD 7450

The crash can be reproduced every time.

-- Backtrace:
Application: Krita (krita), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
[Current thread is 1 (Thread 0x7f6950c7f8c0 (LWP 14599))]

Thread 7 (Thread 0x7f693430f700 (LWP 14600)):
#0  0x00007f694e1df84d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f69489a1ee4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f69489a2272 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f693b532f76 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007f69489c8925 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f6948e880a5 in start_thread (arg=0x7f693430f700) at pthread_create.c:309
#6  0x00007f694e1e9cfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 6 (Thread 0x7f6933b0e700 (LWP 14601)):
#0  0x00007f694e1df84d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f69489a1ee4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f69489a1ffc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f69489a2039 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f69489c8925 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f6948e880a5 in start_thread (arg=0x7f6933b0e700) at pthread_create.c:309
#6  0x00007f694e1e9cfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 5 (Thread 0x7f6910dde700 (LWP 14628)):
[KCrash Handler]
#6  __memcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:35
#7  0x00007f694d2df9e5 in memcpy (__len=562, __src=<optimized out>, __dest=0x0) at /usr/include/x86_64-linux-gnu/bits/string3.h:51
#8  KisSwappedDataStore::swapOutTileData (this=this@entry=0x21539e0, td=td@entry=0x7f68e0018330) at /build/buildd/calligra-2.9.0/krita/image/tiles3/swap/kis_swapped_data_store.cpp:77
#9  0x00007f694d2c4b4c in KisTileDataStore::trySwapTileData (this=0x2153990, td=0x7f68e0018330) at /build/buildd/calligra-2.9.0/krita/image/tiles3/kis_tile_data_store.cc:238
#10 0x00007f694d2e0513 in trySwapOut (td=<optimized out>, this=0x7f690416e060) at /build/buildd/calligra-2.9.0/krita/image/tiles3/kis_tile_data_store_iterators.h:62
#11 KisTileDataSwapper::pass<SoftSwapStrategy> (this=this@entry=0x21539c8, needToFreeMetric=7808) at /build/buildd/calligra-2.9.0/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:229
#12 0x00007f694d2e0259 in KisTileDataSwapper::doJob (this=this@entry=0x21539c8) at /build/buildd/calligra-2.9.0/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:133
#13 0x00007f694d2e0312 in KisTileDataSwapper::run (this=0x21539c8) at /build/buildd/calligra-2.9.0/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:99
#14 0x00007f694ea5c3ef in QThreadPrivate::start (arg=0x21539c8) at thread/qthread_unix.cpp:349
#15 0x00007f6948e880a5 in start_thread (arg=0x7f6910dde700) at pthread_create.c:309
#16 0x00007f694e1e9cfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7f690bfff700 (LWP 14630)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f694ea5c946 in wait (time=18446744073709551615, this=0x1dc84d0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x1ffaa28, mutex=mutex@entry=0x1ffaa20, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f694fa88115 in QFileInfoGatherer::run (this=0x1ffaa10) at dialogs/qfileinfogatherer.cpp:214
#4  0x00007f694ea5c3ef in QThreadPrivate::start (arg=0x1ffaa10) at thread/qthread_unix.cpp:349
#5  0x00007f6948e880a5 in start_thread (arg=0x7f690bfff700) at pthread_create.c:309
#6  0x00007f694e1e9cfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7f693330d700 (LWP 14631)):
#0  0x00007f694ea5afff in QThreadData::current () at thread/qthread_unix.cpp:249
#1  0x00007f694eb94f15 in postEventSourcePrepare (s=0x7f69283bb470, timeout=0x7f693330caf4) at kernel/qeventdispatcher_glib.cpp:263
#2  0x00007f69489a146d in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f69489a1e0b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f69489a1ffc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f694eb9554e in QEventDispatcherGlib::processEvents (this=0x7f6928351cd0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#6  0x00007f694eb64ae1 in QEventLoop::processEvents (this=this@entry=0x7f693330ccc0, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007f694eb64e45 in QEventLoop::exec (this=this@entry=0x7f693330ccc0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007f694ea59b89 in QThread::exec (this=this@entry=0x1dc85d0) at thread/qthread.cpp:538
#9  0x00007f694eb45483 in QInotifyFileSystemWatcherEngine::run (this=0x1dc85d0) at io/qfilesystemwatcher_inotify.cpp:265
#10 0x00007f694ea5c3ef in QThreadPrivate::start (arg=0x1dc85d0) at thread/qthread_unix.cpp:349
#11 0x00007f6948e880a5 in start_thread (arg=0x7f693330d700) at pthread_create.c:309
#12 0x00007f694e1e9cfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f68f4f84700 (LWP 14641)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f68ed8fdbdb in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#2  0x00007f68ed8fd437 in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#3  0x00007f6948e880a5 in start_thread (arg=0x7f68f4f84700) at pthread_create.c:309
#4  0x00007f694e1e9cfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f6950c7f8c0 (LWP 14599)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x00007f694ea5c924 in wait (time=100, this=0x1e97130) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=this@entry=0x1e97110, mutex=mutex@entry=0x1e970e8, time=time@entry=100) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f694ea5bf7e in QThread::wait (this=this@entry=0x21539c8, time=time@entry=100) at thread/qthread_unix.cpp:720
#4  0x00007f694d2e0038 in KisTileDataSwapper::terminateSwapper (this=this@entry=0x21539c8) at /build/buildd/calligra-2.9.0/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:81
#5  0x00007f694d2c4d3c in KisTileDataStore::~KisTileDataStore (this=0x2153990, __in_chrg=<optimized out>) at /build/buildd/calligra-2.9.0/krita/image/tiles3/kis_tile_data_store.cc:82
#6  0x00007f694d2c5567 in destroy () at /build/buildd/calligra-2.9.0/krita/image/tiles3/kis_tile_data_store.cc:94
#7  0x00007f694e12a6a9 in __run_exit_handlers (status=1, listp=0x7f694e4ad6c8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:82
#8  0x00007f694e12a6f5 in __GI_exit (status=<optimized out>) at exit.c:104
#9  0x00007f693c3a9aa4 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#10 0x00007f6949a96fd0 in KApplication::xioErrhandler (this=0x7ffd289a9480, dpy=0x1826c80) at ../../kdeui/kernel/kapplication.cpp:419
#11 0x00007f694ddee88e in _XIOError () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#12 0x00007f694ddec1fd in _XEventsQueued () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#13 0x00007f694ddde190 in XEventsQueued () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#14 0x00007f694f6208dc in x11EventSourceCheck (s=0x17e2c40) at kernel/qguieventdispatcher_glib.cpp:85
#15 0x00007f69489a18c1 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007f69489a1e83 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007f69489a1ffc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007f694eb95531 in QEventDispatcherGlib::processEvents (this=0x16ad750, flags=...) at kernel/qeventdispatcher_glib.cpp:434
#19 0x00007f694f620e76 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#20 0x00007f694eb64ae1 in QEventLoop::processEvents (this=this@entry=0x7ffd289a9120, flags=...) at kernel/qeventloop.cpp:149
#21 0x00007f694eb64e45 in QEventLoop::exec (this=this@entry=0x7ffd289a9120, flags=...) at kernel/qeventloop.cpp:204
#22 0x00007f694eb6a8b9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#23 0x00007f694f576a2c in QApplication::exec () at kernel/qapplication.cpp:3828
#24 0x0000000000402696 in main (argc=<optimized out>, argv=<optimized out>) at /build/buildd/calligra-2.9.0/krita/main.cc:179

Possible duplicates by query: bug 348697, bug 348652.

Report to https://bugs.kde.org/
Comment 1 wolthera 2015-08-02 12:26:40 UTC
Oh man.

For a quick-fix, could you go to .kde/share/config in your home folder and rename the 'kritarc' to something like 'kritarc-backup', and see if that makes a difference? The kritarc holds configuration info, so if that gets garbled it may affect Krita itself.

If that indeed does help, would you mind uploading the backup file? Then we can try to figure out what went wrong.
Comment 2 Halla Rempt 2015-08-07 09:07:29 UTC
I'm pretty sure I fixed this in a later relase, the issue looks like the tmp file problem. Could you try the latest builds in the lime ppa please? If it still occurs, please reopen the bug.
Comment 3 Dmitry Kazakov 2015-08-07 09:16:28 UTC
Hi, goldphnx!

If you still have this problem in newer version of Krita (see http://nonaynever.ru/kwiki/krita/MostRecentBuilds#Krita_Lime_for_Ubuntu), then please provide us this data:

How big is your file? And do you have enough space left on your temporary folder device? It seems like Krita crashes when trying to swap out a piece of data to the hard drive.

A screenshot of the memory consumption popup window would also be useful:
http://nonaynever.ru/kwiki/krita/BugWritingGuidelines?action=AttachFile&do=view&target=memory_consumption_window.png