Bug 308713 - Krita crashes if OpenGL is enabled
Summary: Krita crashes if OpenGL is enabled
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-20 15:15 UTC by federico.fieni
Modified: 2013-03-10 10:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (13.28 KB, text/plain)
2013-03-02 07:51 UTC, Timothy Liddy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description federico.fieni 2012-10-20 15:15:53 UTC
Application: krita (2.6 Alpha)
KDE Platform Version: 4.8.5 (4.8.5)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-23-generic x86_64
Distribution: Linux Mint 13 Maya

-- Information about the crash:
- What I was doing when the application crashed:
Opening a file or template 

- Custom settings of the application:
OpenGL is enabled in Krita configuration. If I delete home/user/.kde/share/config/kritarc Krita works, but as soon as I enable the option again, it crashes.

AMD proprietary drivers are installed.

The crash can be reproduced every time.

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

Thread 7 (Thread 0x7f9e5f72b700 (LWP 4174)):
#0  0x00007f9e81158d84 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f9e84a8c4db in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f9e84a88314 in QSemaphore::acquire(int) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007f9e678d5bee in KisTileDataPooler::waitForWork (this=0x1312fe0) at /home/federico/kde4/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:162
#4  0x00007f9e678d6344 in KisTileDataPooler::run (this=0x1312fe0) at /home/federico/kde4/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:184
#5  0x00007f9e84a8bfcb in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007f9e81154e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007f9e83776cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f9e5ef2a700 (LWP 4175)):
#0  0x00007f9e81158d84 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f9e84a8c4db in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f9e84a88759 in QSemaphore::tryAcquire(int, int) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007f9e678f379a in KisTileDataSwapper::run (this=0x1313018) at /home/federico/kde4/src/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#4  0x00007f9e84a8bfcb in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007f9e81154e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f9e83776cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f9e4f5d8700 (LWP 4185)):
#0  0x00007f9e83770023 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f9e84bb7366 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f9e84bbc7b2 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007f9e84bbcca3 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007f9e84b89c82 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007f9e84b89ed7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007f9e84a88fa7 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007f9e84b699ff in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007f9e84a8bfcb in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007f9e81154e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007f9e83776cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f9e5e0da700 (LWP 4188)):
#0  0x00007f9e83770023 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f9e84bb7366 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f9e84bbc7b2 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007f9e84bbcca3 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007f9e84b89c82 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007f9e84b89ed7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007f9e84a88fa7 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007f9e84b699ff in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007f9e84a8bfcb in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007f9e81154e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007f9e83776cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f9e3e5dc700 (LWP 4201)):
#0  0x00007f9e81158d84 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f9e84a8c4db in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f9e84417354 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#3  0x00007f9e84a8bfcb in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007f9e81154e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007f9e83776cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f9e3dddb700 (LWP 4202)):
#0  0x00007f9e83770023 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f9e84bb7366 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f9e84bbc7b2 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007f9e84bbcca3 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007f9e84b89c82 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007f9e84b89ed7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007f9e84a88fa7 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007f9e84b699ff in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007f9e84a8bfcb in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007f9e81154e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007f9e83776cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f9e85f3e780 (LWP 4173)):
[KCrash Handler]
#6  0x0000000000000000 in ?? ()
#7  0x00007f9e67edbbd8 in KisOpenGLCanvas2::drawImage (this=0x15f5e5d0) at /home/federico/kde4/src/calligra/krita/ui/opengl/kis_opengl_canvas2.cpp:279
#8  0x00007f9e67edbc78 in KisOpenGLCanvas2::paintEvent (this=0x15f5e5d0) at /home/federico/kde4/src/calligra/krita/ui/opengl/kis_opengl_canvas2.cpp:134
#9  0x00007f9e83f5e0f6 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#10 0x00007f9e83f0d894 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#11 0x00007f9e83f12713 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#12 0x00007f9e70cc0dde in KoApplication::notify (this=<optimized out>, receiver=0x15f5e5d0, event=0x7ffffefaf9f0) at /home/federico/kde4/src/calligra/libs/main/KoApplication.cpp:504
#13 0x00007f9e84b8ae9c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#14 0x00007f9e83f59d96 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#15 0x00007f9e84125787 in QWidgetPrivate::repaint_sys(QRegion const&) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#16 0x00007f9e83f50a64 in QWidgetPrivate::syncBackingStore() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#17 0x00007f9e83f5e60c in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#18 0x00007f9e83f0d894 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#19 0x00007f9e83f12713 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#20 0x00007f9e70cc0dde in KoApplication::notify (this=<optimized out>, receiver=0x15f5e5d0, event=0x528f300) at /home/federico/kde4/src/calligra/libs/main/KoApplication.cpp:504
#21 0x00007f9e84b8ae9c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#22 0x00007f9e84b8ec6a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#23 0x00007f9e83fb69fa in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#24 0x00007f9e84b89c82 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#25 0x00007f9e84b89ed7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#26 0x00007f9e84b8ef67 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#27 0x00007f9e7120ab8d in kdemain (argc=<optimized out>, argv=<optimized out>) at /home/federico/kde4/src/calligra/krita/main.cc:74
#28 0x00000000004086a4 in _start ()

Possible duplicates by query: bug 254394.

Reported using DrKonqi
Comment 1 Halla Rempt 2012-10-20 15:25:05 UTC
HI!

Thanks for your report. I'm afraid there isn't much I can do here -- there probably is a problem with the amd driver and krita, but I don't have access to that hardware, so it's really impossible to debug :-(
Comment 2 Timothy Liddy 2013-03-02 07:51:49 UTC
Created attachment 77680 [details]
New crash information added by DrKonqi

krita (2.6.0) on KDE Platform 4.10.00 using Qt 4.8.3

Krita crashes when OpenGL is check.  Everytime you try to open the program you can only get to the first page with all of the templates/Open Doc options, when you hit the create button, the program just crashes, you can't get out of this contiuous loop. Had I not read the prev bug report about deleting the kritarc file, I'd still be looping.

-- Backtrace (Reduced):
#6  0x00007f8e13a50d47 in KisOpenGLCanvas2::drawImage() () from /usr/lib/libkritaui.so.11
#7  0x00007f8e13a50df4 in KisOpenGLCanvas2::paintEvent(QPaintEvent*) () from /usr/lib/libkritaui.so.11
#8  0x00007f8e28cf7802 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#9  0x00007f8e28ca7e9c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#10 0x00007f8e28cac30a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
Comment 3 Halla Rempt 2013-03-02 10:59:58 UTC
Hm, I have an idea about how I can work around the problem where you need to remove or edit the .kritarc file. Let me test a patch.
Comment 4 Halla Rempt 2013-03-02 11:18:08 UTC
Git commit 2e49bd4b0dc5685601309e08e48b16b3e539faeb by Boudewijn Rempt.
Committed on 02/03/2013 at 12:17.
Pushed by rempt into branch 'master'.

If creating the canvas failed, disable opengl

Since a problem with the opengl drivers is the most probable problem.
This means that users no longer have to manually edit or remove their
kritarc file.

M  +9    -0    krita/ui/kis_view2.cpp

http://commits.kde.org/calligra/2e49bd4b0dc5685601309e08e48b16b3e539faeb
Comment 5 Halla Rempt 2013-03-02 11:18:31 UTC
Git commit 14e6b8b8aeb613f6cf23bb118d261200e7c7ec2d by Boudewijn Rempt.
Committed on 02/03/2013 at 12:17.
Pushed by rempt into branch 'calligra/2.6'.

If creating the canvas failed, disable opengl

Since a problem with the opengl drivers is the most probable problem.
This means that users no longer have to manually edit or remove their
kritarc file.

M  +9    -0    krita/ui/kis_view2.cpp

http://commits.kde.org/calligra/14e6b8b8aeb613f6cf23bb118d261200e7c7ec2d
Comment 6 Halla Rempt 2013-03-10 10:20:19 UTC
We're working on a new opengl-based canvas. We cannot fix the problem you have -- none of us have an AMD graphics card I'm afraid. But at least enabling opengl now no longer should make it impossible to strart Krita, and the fix is in the next bugfix release of Krita.