Bug 336803

Summary: Krita crash creating a custom document on fresh start in xfce.
Product: [Applications] krita Reporter: vanyossi <ghevan>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description vanyossi 2014-06-27 18:21:50 UTC
This happens rarely, and probably triggered because i was running over gdb.




Reproducible: Didn't try

Steps to Reproduce:
1. On xfce fresh start krita over gdb.
2. Create custom document
3.
Actual Results:  
BACKTRACE:::

Program received signal SIGSEGV, Segmentation fault.
KisPaintDevice::createHLineConstIteratorNG (this=this@entry=0x0, x=219, y=11, w=w@entry=1)
    at /home/tara/nalaf/nala/program/calligra/krita/image/kis_paint_device.cc:815
815	    return m_d->currentStrategy()->createHLineConstIteratorNG(x, y, w);
(gdb) bt
#0  KisPaintDevice::createHLineConstIteratorNG (this=this@entry=0x0, x=219, y=11, w=w@entry=1)
    at /home/tara/nalaf/nala/program/calligra/krita/image/kis_paint_device.cc:815
#1  0x00007ffff6f8cda1 in KisPaintDevice::pixel (this=0x0, x=<optimized out>, y=<optimized out>, kc=kc@entry=0x7fffffffc440)
    at /home/tara/nalaf/nala/program/calligra/krita/image/kis_paint_device.cc:902
#2  0x00007fffccb2a0a3 in Acs::pickColor<KisSharedPtr<KisPaintDevice> > (device=..., pt=...)
    at /home/tara/nalaf/nala/program/calligra/krita/plugins/extensions/dockers/advancedcolorselector/kis_acs_types.h:54
#3  0x00007fffccb33eae in KisShadeSelectorLine::mouseMoveEvent (this=0x13ff2d0, e=<optimized out>)
    at /home/tara/nalaf/nala/program/calligra/krita/plugins/extensions/dockers/advancedcolorselector/kis_shade_selector_line.cpp:187
#4  0x00007ffff1787042 in QWidget::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#5  0x00007ffff173aaac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#6  0x00007ffff173dc11 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#7  0x00007ffff6b256b8 in KoApplication::notify (this=<optimized out>, receiver=0x13ff2d0, event=0x7fffffffcc90)
    at /home/tara/nalaf/nala/program/calligra/libs/main/KoApplication.cpp:622
#8  0x00007ffff085a59d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007ffff1740a42 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/qt4/libQtGui.so.4
#10 0x00007ffff17b241c in ?? () from /usr/lib64/qt4/libQtGui.so.4
#11 0x00007ffff17b0d51 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#12 0x00007ffff17d92e2 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#13 0x00007fffe84b027c in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#14 0x00007fffe84b05d4 in ?? () from /usr/lib64/libglib-2.0.so.0
#15 0x00007fffe84b0684 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#16 0x00007ffff0887f3e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/qt4/libQtCore.so.4
#17 0x00007ffff17d93ae in ?? () from /usr/lib64/qt4/libQtGui.so.4
#18 0x00007ffff085927f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#19 0x00007ffff0859500 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#20 0x00007ffff085e628 in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#21 0x00007ffff7b340f3 in kdemain (argc=<optimized out>, argv=<optimized out>)
    at /home/tara/nalaf/nala/program/calligra/krita/main.cc:108
#22 0x00007fffef5efbc5 in __libc_start_main (main=0x4009f0 <main(int, char**)>, argc=1, ubp_av=0x7fffffffda08, init=<optimized out>, 
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd9f8) at libc-start.c:258
#23 0x0000000000400a21 in _start ()
Comment 1 vanyossi 2014-06-27 18:25:09 UTC
Updated with more detailed backtrace


Thread 16 (Thread 0x7fffb77fe700 (LWP 3717)):
#0  0x00007fffef6acb6d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fffe84b056c in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fffe84b0684 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007ffff0887f3e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007ffff085927f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007ffff0859500 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007ffff0760080 in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007ffff083b64f in ?? () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007ffff076278c in ?? () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007ffff04cceda in start_thread (arg=0x7fffb77fe700) at pthread_create.c:308
#10 0x00007fffef6b65ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 15 (Thread 0x7fffc4e7d700 (LWP 3716)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007ffff0762cf3 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007ffff1bfb62e in ?? () from /usr/lib64/qt4/libQtGui.so.4
#3  0x00007ffff076278c in ?? () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007ffff04cceda in start_thread (arg=0x7fffc4e7d700) at pthread_create.c:308
#5  0x00007fffef6b65ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:11

Thread 10 (Thread 0x7fffd48fc700 (LWP 3711)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007ffff0762cf3 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007ffff075f0d8 in QSemaphore::tryAcquire(int, int) () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007ffff6ee43f3 in KisTileDataSwapper::waitForWork (this=<optimized out>)
    at /home/tara/nalaf/nala/program/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#4  0x00007ffff6ee46ea in KisTileDataSwapper::run (this=0x140e8d8)
    at /home/tara/nalaf/nala/program/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#5  0x00007ffff076278c in ?? () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007ffff04cceda in start_thread (arg=0x7fffd48fc700) at pthread_create.c:308
#7  0x00007fffef6b65ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 9 (Thread 0x7fffc67f2700 (LWP 3710)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007ffff0762cf3 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007ffff075ed17 in QSemaphore::acquire(int) () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007ffff6ec6e7e in KisTileDataPooler::waitForWork (this=this@entry=0x140e8a0)
    at /home/tara/nalaf/nala/program/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:162
#4  0x00007ffff6ec722b in KisTileDataPooler::run (this=0x140e8a0)
    at /home/tara/nalaf/nala/program/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:184
#5  0x00007ffff076278c in ?? () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007ffff04cceda in start_thread (arg=0x7fffc67f2700) at pthread_create.c:308
#7  0x00007fffef6b65ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 2 (Thread 0x7fffded1c700 (LWP 3693)):
#0  0x00007fffef6af1c3 in select () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff0839922 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007ffff076278c in ?? () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007ffff04cceda in start_thread (arg=0x7fffded1c700) at pthread_create.c:308
#4  0x00007fffef6b65ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7ffff7fa17c0 (LWP 3687)):
#0  __bsd_signal (sig=14, handler=0x0) at ../sysdeps/posix/signal.c:44
#1  0x00007ffff2487d1f in KCrash::defaultCrashHandler(int) () from /usr/lib64/libkdeui.so.5
#2  <signal handler called>
#3  KisPaintDevice::createHLineConstIteratorNG (this=this@entry=0x0, x=219, y=11, w=w@entry=1)
    at /home/tara/nalaf/nala/program/calligra/krita/image/kis_paint_device.cc:815
#4  0x00007ffff6f8cda1 in KisPaintDevice::pixel (this=0x0, x=<optimized out>, y=<optimized out>, kc=kc@entry=0x7fffffffc440)
    at /home/tara/nalaf/nala/program/calligra/krita/image/kis_paint_device.cc:902
#5  0x00007fffccb2a0a3 in Acs::pickColor<KisSharedPtr<KisPaintDevice> > (device=..., pt=...)
    at /home/tara/nalaf/nala/program/calligra/krita/plugins/extensions/dockers/advancedcolorselector/kis_acs_types.h:54
#6  0x00007fffccb33eae in KisShadeSelectorLine::mouseMoveEvent (this=0x13ff2d0, e=<optimized out>)
    at /home/tara/nalaf/nala/program/calligra/krita/plugins/extensions/dockers/advancedcolorselector/kis_shade_selector_line.cpp:187
#7  0x00007ffff1787042 in QWidget::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#8  0x00007ffff173aaac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#9  0x00007ffff173dc11 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#10 0x00007ffff6b256b8 in KoApplication::notify (this=<optimized out>, receiver=0x13ff2d0, event=0x7fffffffcc90)
    at /home/tara/nalaf/nala/program/calligra/libs/main/KoApplication.cpp:622
#11 0x00007ffff085a59d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#12 0x00007ffff1740a42 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/qt4/libQtGui.so.4
#13 0x00007ffff17b241c in ?? () from /usr/lib64/qt4/libQtGui.so.4
#14 0x00007ffff17b0d51 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#15 0x00007ffff17d92e2 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#16 0x00007fffe84b027c in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#17 0x00007fffe84b05d4 in ?? () from /usr/lib64/libglib-2.0.so.0
#18 0x00007fffe84b0684 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#19 0x00007ffff0887f3e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/qt4/libQtCore.so.4
#20 0x00007ffff17d93ae in ?? () from /usr/lib64/qt4/libQtGui.so.4
#21 0x00007ffff085927f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#22 0x00007ffff0859500 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#23 0x00007ffff085e628 in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#24 0x00007ffff7b340f3 in kdemain (argc=<optimized out>, argv=<optimized out>)
    at /home/tara/nalaf/nala/program/calligra/krita/main.cc:108
#25 0x00007fffef5efbc5 in __libc_start_main (main=0x4009f0 <main(int, char**)>, argc=1, ubp_av=0x7fffffffda08, init=<optimized out>, 
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd9f8) at libc-start.c:258
#26 0x0000000000400a21 in _start ()
Comment 2 Halla Rempt 2014-06-27 18:54:15 UTC
Git commit 6ff6c5b0ec42891c185409e2a786830c6ea67a43 by Boudewijn Rempt.
Committed on 27/06/2014 at 18:52.
Pushed by rempt into branch 'master'.

Be a bit more careful derefencing a pointer

M  +3    -1    krita/plugins/extensions/dockers/advancedcolorselector/kis_acs_types.h

http://commits.kde.org/calligra/6ff6c5b0ec42891c185409e2a786830c6ea67a43