crash with Bespin + graphicssystem opengl
Status: Beta
Brought to you by:
baghira-style
How to reproduce:
Assuming that Bespin widget style is used, start any Qt application with OpenGL graphics backend, i.e., "dolphin -graphicssystem opengl". The application crashes. Changing widget style to, say, QtCurve fixes that, but I like Bespin more :)
Anonymous
Not here - please specify your Qt (and KDE) versions, since Qt *was/ buggy in this regard (it crashes when creating a QPixmap because it created the GL context too late)
Also you'll usually get a backtrace for KDE applications, please attach such (for completeness and to ensure it's that bug)
Qt: 4.8.0
KDE: 4.8.0
Graphics card: ATI Radeon HD 4550
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV710
OpenGL version string: 3.0 Mesa 8.0-devel (git-b3c84a8)
OpenGL shading language version string: 1.30
Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
Using host libthread_db library "/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0xb5604740 (LWP 29780))]
Thread 2 (Thread 0xb3164b40 (LWP 29833)):
#0 0xb569aba4 in __pthread_mutex_unlock_usercnt () from /lib/libpthread.so.0
#1 0xb76b9f94 in pthread_mutex_unlock () from /lib/libc.so.6
#2 0x42bc95a1 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#3 0x42bca3f7 in ?? () from /usr/lib/libglib-2.0.so.0
#4 0x42bca9ea in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5 0xb67a6607 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6 0xb677268d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7 0xb6772929 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8 0xb665d68c in QThread::exec() () from /usr/lib/libQtCore.so.4
#9 0xb674fdad in ?? () from /usr/lib/libQtCore.so.4
#10 0xb6660b20 in ?? () from /usr/lib/libQtCore.so.4
#11 0xb5697cac in start_thread () from /lib/libpthread.so.0
#12 0xb76ac76e in clone () from /lib/libc.so.6
Thread 1 (Thread 0xb5604740 (LWP 29780)):
[KCrash Handler]
#7 0x00000000 in ?? ()
#8 0xb445d7a0 in ?? () from /usr/lib/xorg/modules/dri/r600_dri.so
#9 0xb4305f4c in ?? () from /usr/lib/xorg/modules/dri/r600_dri.so
#10 0xb52a9cae in QGLPixmapData::copyBackFromRenderFbo(bool) const () from /usr/lib/libQtOpenGL.so.4
#11 0xb52ab560 in ?? () from /usr/lib/libQtOpenGL.so.4
#12 0xb52b457f in QGL2PaintEngineEx::end() () from /usr/lib/libQtOpenGL.so.4
#13 0xb5d595b0 in QPainter::end() () from /usr/lib/libQtGui.so.4
#14 0xb408b744 in Bespin::Gradients::pix(QColor const&, int, Qt::Orientation, Bespin::Gradients::Type) () from /usr/lib/libQtBespin.so
#15 0xb4134ee9 in ?? () from /usr/lib/qt/plugins/styles/libbespin.so
#16 0xb40f6f06 in ?? () from /usr/lib/qt/plugins/styles/libbespin.so
#17 0xb60e3353 in QToolBar::paintEvent(QPaintEvent*) () from /usr/lib/libQtGui.so.4
#18 0xb5c458c2 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#19 0xb60e4cf4 in QToolBar::event(QEvent*) () from /usr/lib/libQtGui.so.4
#20 0xb5beb964 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#21 0xb5bf0e3a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#22 0xb6da3f51 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#23 0xb6773afe in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#24 0xb5c4124a in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/libQtGui.so.4
#25 0xb5c41ff2 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/libQtGui.so.4
#26 0xb5c41d2a in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/libQtGui.so.4
#27 0xb5c41d2a in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/libQtGui.so.4
#28 0xb5c41d2a in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/libQtGui.so.4
#29 0xb5c40fa8 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/libQtGui.so.4
#30 0xb5e34fc0 in ?? () from /usr/lib/libQtGui.so.4
#31 0xb5e35387 in ?? () from /usr/lib/libQtGui.so.4
#32 0xb5c37084 in QWidgetPrivate::syncBackingStore(QRegion const&) () from /usr/lib/libQtGui.so.4
#33 0xb5c73be4 in ?? () from /usr/lib/libQtGui.so.4
#34 0xb5c74648 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#35 0xb5c9f62c in ?? () from /usr/lib/libQtGui.so.4
#36 0x42bca01f in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#37 0x42bca750 in ?? () from /usr/lib/libglib-2.0.so.0
#38 0x42bca9ea in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#39 0xb67a65a7 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#40 0xb5c9f22a in ?? () from /usr/lib/libQtGui.so.4
#41 0xb677268d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#42 0xb6772929 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#43 0xb6777b5a in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#44 0xb5be97c4 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#45 0x44380351 in kdemain () from /usr/lib/libkdeinit4_dolphin.so
#46 0x0804850b in ?? ()
#47 0xb75dd483 in __libc_start_main () from /lib/libc.so.6
#48 0x08048531 in _start ()
Terminal output:
[first@myhost ~]$ dolphin --graphicssystem opengl
using visual class 4, id 112
"/usr/bin/dolphin(29780)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
"/usr/bin/dolphin(29780)" Soprano: "QLocalSocket::connectToServer: Invalid name"
"/usr/bin/dolphin(29780)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
"/usr/bin/dolphin(29780)" Soprano: "QLocalSocket::connectToServer: Invalid name"
"/usr/bin/dolphin(29780)" Soprano: "org.freedesktop.DBus.Error.ServiceUnknown - The name org.kde.nepomuk.services.nepomukstorage was not provided by any .service files"
"/usr/bin/dolphin(29780)" Soprano: "QLocalSocket::connectToServer: Invalid name"
dolphin(29780)/kdecore (KLibrary) findLibraryInternal: plugins should not have a 'lib' prefix: "libkonsolepart.so"
hijackWindow() context created for DolphinMainWindow(0x96fdd00, name = "Dolphin#1") 1
Created Window Surface FBO QSize(1024, 694) with samples 1
QPixmap::scaled: Pixmap is a null pixmap
KCrash: Application 'dolphin' crashing...
ewww ... that's a driver bug :-(
It happens when painting the toolbar (UNO) ie. at runtime, ie. at this time the GL Context should be present.
The gradients are cached in pixmaps what's actually not necessary for OpenGL (because it can do gradients very fast) but hard to avoid (because of the custom mask clipping)
The crash the occurs in some (dri lib is stripped) OpenGL call when finishing the paint. No idea why this should only happen with Bespin (for likely all styles will do some indirect pixmap painting) but the OpenGL call should *never* crash but throw a GL error if anything is wrong.
Do you get some "painting on NULL pixmap" before?
Is the backtrace the same everytime?
Another remote guess: try
QT_NO_GLIB=1 bespin demo
does that crash? If not, you can globally enforce the unix dispatcher by exporting QT_NO_GLIB=1 e.g. in some script in ~/.kde/env
Since I'm using Archlinux, debug symbols are stripped from binaries upon installing from AUR. Sorry about that.
'QT_NO_GLIB=1 bespin demo -graphicssystem opengl' doesn't crash, but everything is rendered black. Setting env variable seemingly doesn't change anything. So looks like the crash source indeed is toolbar gradient.
*** "Do you get some "painting on NULL pixmap" before?"
No, there's nothing like that in console output, just "QPixmap::scaled: Pixmap is a null pixmap". I might recompile Mesa with debugging support to see what the bug really is. If it's a bug in Mesa, it definitely should be reported.
Unchecking "Include toolbars" in UNO section of Bespin options avoids crashing, but everything is still rendered black. Is there something that can be done about it?
in blib/gradients.cpp:85
- newPix(int size, Qt::Orientation o, QPoint *start, QPoint *stop, int other = 32)
+ newPix(int size, Qt::Orientation o, QPoint *start, QPoint *stop, int other = 64)
It's just a wild guess but POT textures usually have min size of 64x64 (unlike pixmaps or images)
Can you make a snapshot and is everything black despite using the glib dispatcher?
Do you btw. use ARGB windows, ie. translucency?
Just tried - you *are* attempting to use the opengl graphicssystem with ARGB windows, do you?
Doesn't work here either (the entire window is black)