[Panel-devel] Plasma + 3d Globe == crash

Chris Howells chris+panel-devel at chrishowells.co.uk
Sun Oct 28 12:11:12 CET 2007


Adding a 3D globe to my plasma has been crashing since I can remember. I 
finally decided to have a look yesterday. The problem is in these few 
lines of code (some extra debugging that I added is in there too:

// Get OpenGL version
QString glversionstring = QString((const char*)glGetString(GL_VERSION));
kDebug() << "error is " << glGetError();
kDebug() << "GLVERSIONSTRING is " << glversionstring;
QStringList glversioninfo = 
glversionstring.left(glversionstring.indexOf(' ')).split('.');
kDebug() << "glversioninfo has " << glversioninfo.count() ;

Leads to this output

plasma(17333) BlueMarble::initializeGL:
plasma(17333) initGL: error is  0
plasma(17333) initGL: GLVERSIONSTRING is  ""
plasma(17333) initGL: glversioninfo has  1
ASSERT failure in QList<T>::operator[]: "index out of range", file 
/usr/include/qt4/QtCore/qlist.h, line 394
Plasma crashed, attempting to automatically recover

so glGetString is returning NULL (which according to the documentation 
is something that can happen if stuff has gone wrong).

So I guess two things need to be done:

* Figure out why glGetString() is returning 0
* Don't crash if it does by going out of bounds :)

I'm not sure about the first bit. Can anyone help?

Full backtrace:

Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1239669056 (LWP 17333)]
[KCrash handler]
#6  0xffffe410 in __kernel_vsyscall ()
#7  0xb6601875 in raise () from /lib/tls/i686/cmov/libc.so.6
#8  0xb6603201 in abort () from /lib/tls/i686/cmov/libc.so.6
#9  0xb7c5701d in qt_message_output () from /usr/lib/libQtCore.so.4
#10 0xb7c570a1 in qFatal () from /usr/lib/libQtCore.so.4
#11 0xb7c570f8 in qt_assert_x () from /usr/lib/libQtCore.so.4
#12 0xb3df7786 in QList<QString>::operator[] (this=0xbfa672f8, i=1)
     at /usr/include/qt4/QtCore/qlist.h:394
#13 0xb3df6650 in initGL ()
     at 
/home/kde4/kde/src/extragear/plasma/applets/bluemarble/kwinglutils.cpp:62
#14 0xb3df2181 in BlueMarble::initializeGL (this=0x843a228)
     at 
/home/kde4/kde/src/extragear/plasma/applets/bluemarble/bluemarble.cpp:105
#15 0xb3df2a52 in BlueMarble (this=0x843a228, parent=0x0, args=@0xbfa675ec)
     at 
/home/kde4/kde/src/extragear/plasma/applets/bluemarble/bluemarble.cpp:51
#16 0xb3df393c in KPluginFactory::createInstance<BlueMarble, QObject> (
     parentWidget=0x0, parent=0x0, args=@0xbfa675ec)
     at /home/kde4/kde/include/kpluginfactory.h:457
#17 0xb7bc99d3 in KPluginFactory::create (this=0x8339030,
     iface=0xb7effa60 "Plasma::Applet", parentWidget=0x0, parent=0x0,
     args=@0xbfa675ec, keyword=@0xbfa67534)
     at /home/kde4/kde/src/KDE/kdelibs/kdecore/util/kpluginfactory.cpp:181
#18 0xb7e4f6f7 in KPluginFactory::create<Plasma::Applet> (this=0x8339030,
     parentWidget=0x0, parent=0x0, keyword=@0xbfa67534, args=@0xbfa675ec)
     at /home/kde4/kde/include/kpluginfactory.h:511
#19 0xb7e4f7b9 in KService::createInstance<Plasma::Applet> (this=0x82cf290,
     parentWidget=0x0, parent=0x0, args=@0xbfa675ec, error=0xbfa675e8)
     at /home/kde4/kde/include/kservice.h:517
#20 0xb7e4f938 in KService::createInstance<Plasma::Applet> (this=0x82cf290,
     parent=0x0, args=@0xbfa675ec, error=0xbfa675e8)
     at /home/kde4/kde/include/kservice.h:494
#21 0xb7e4a6cf in Plasma::Applet::loadApplet (appletName=@0xbfa678f8,
     appletId=7, args=@0xbfa67908)
     at /home/kde4/kde/src/KDE/kdebase/workspace/libs/plasma/applet.cpp:1042
#22 0xb7e68803 in Plasma::Containment::addApplet (this=0x81229f8,
     name=@0xbfa678f8, args=@0xbfa67908, id=0, geometry=@0xbfa67850,
     delayInit=false)
     at 
/home/kde4/kde/src/KDE/kdebase/workspace/libs/plasma/containment.cpp:306
#23 0xb7e6906e in Plasma::Containment::dropEvent (this=0x81229f8,
     event=0xbfa67e80)
     at 
/home/kde4/kde/src/KDE/kdebase/workspace/libs/plasma/containment.cpp:487
#24 0xb6edc795 in QGraphicsItem::sceneEvent () from /usr/lib/libQtGui.so.4
#25 0xb6ee4743 in ?? () from /usr/lib/libQtGui.so.4
#26 0x08122a00 in ?? ()
#27 0xbfa67e80 in ?? ()
#28 0xbfa67e80 in ?? ()
#29 0x00000000 in ?? ()
#0  0xffffe410 in __kernel_vsyscall ()



More information about the Panel-devel mailing list