Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, January 2007
Qt OpenGL Crashes on Linux


Message 1 in thread

Hi,

I have Fedora Core 6 x86-64 with an ATI x600 gfx card. I
installed their fglrx driver and then compiled Qt (my
final goal is to use Coin3d and SoQt). However, every time
I run a hardware accelerated opengl qt app (even the demo
Qt apps), things crash in the fglrx driver while Qt is
calling glXMakeCurrent (this is a SoQt example, a pure Qt
example is similar). I have tried compiling Qt with
several options to no avail. I have tested other opengl
applications, and they work fine under hardware
acceleration. So I'm pretty sure Qt is setting some mode
the ATI driver doesn't like.

#0  0x00002aaab10e562d in fglX11UpdateDispatcher ()
   from /usr/X11R6/lib64/modules/dri/fglrx_dri.so
#1  0x00002aaab10e75b7 in __driCreateScreen ()
   from /usr/X11R6/lib64/modules/dri/fglrx_dri.so
#2  0x00002aaab10e77c7 in __driCreateScreen ()
   from /usr/X11R6/lib64/modules/dri/fglrx_dri.so
#3  0x00002aaaac6ea2e0 in glXMakeCurrent ()
   from /usr/lib64/ati-fglrx/libGL.so.1
#4  0x00002aaaaadb896f in QGLContext::doneCurrent ()
   from /usr/lib64/libQtOpenGL.so.4
#5  0x00002aaaaadb8b61 in QGLContext::reset () from
/usr/lib64/libQtOpenGL.so.4
#6  0x00002aaaaada4bd1 in QGLContext::~QGLContext$delete
()
   from /usr/lib64/libQtOpenGL.so.4
#7  0x00002aaaaada096f in QGLWidget::~QGLWidget ()
   from /usr/lib64/libQtOpenGL.so.4
#8  0x00002aaaaadb87ab in QGLWidget::resizeEvent ()
   from /usr/lib64/libQtOpenGL.so.4
#9  0x00002aaaaada231a in QGLContext::QGLContext ()
   from /usr/lib64/libQtOpenGL.so.4
#10 0x00002aaaaadb98fa in QGLContext::chooseContext ()
   from /usr/lib64/libQtOpenGL.so.4
#11 0x00002aaaaada7b9d in QGLWidget::QGLWidget$base ()
   from /usr/lib64/libQtOpenGL.so.4
---Type <return> to continue, or q <return> to quit---
#12 0x00002aaaaab5dc0c in SoQtGLArea (this=0x0,
format=0x0, 
    parent=0x2aaabb0743a8, sharewidget=0x2aaaac8364a0, 
    name=<value optimized out>) at SoQtGLArea.cpp:85
#13 0x00002aaaaab1b75d in SoQtGLWidgetP::buildGLWidget
(this=0x691fd0)
    at SoQtGLWidget.cpp:1021
#14 0x00002aaaaab1bfbc in SoQtGLWidget::buildWidget
(this=0x691450, 
    parent=0x695980) at SoQtGLWidget.cpp:239
#15 0x00002aaaaab202c6 in SoQtRenderArea::buildWidget
(this=0x0, parent=0x0)
    at ../../../src/Inventor/Qt/SoQtRenderArea.cpp:2047
#16 0x00002aaaaab4a6a7 in SoQtFullViewer::buildWidget
(this=0x691450, 
    parent=0x656e30) at FullViewer.cpp:407
#17 0x00002aaaaab4bbdd in SoQtExaminerViewerP::constructor
(this=0x6b6fc0, 
    build=1) at ExaminerViewer.cpp:232
#18 0x0000000000400c9c in main (argc=1, argv=<value
optimized out>)
    at testsoqt0.cpp:26




After spending some time playing around, I found one way 
to get Qt to display something. It only works when I
disable direct rendering, restart X, and run as a remote
user, otherwise Qt crashes with some error
QString::fromLocal8Bit




#0  0x00002aaaac8b5d29 in QString::fromLocal8Bit (
    str=0x10 <Address 0x10 out of bounds>, size=-1) at
tools/qstring.cpp:3293
#1  0x00002aaaac92522c in QCoreApplication::arguments ()
    at kernel/qcoreapplication.cpp:1618
#2  0x00002aaaab17e1aa in
QApplicationPrivate::x11_initialize_style ()
   from /usr/lib64/libQtGui.so.4
#3  0x00002aaaab17ecc2 in
QApplicationPrivate::x11_initialize_style ()
   from /usr/lib64/libQtGui.so.4
#4  0x0000003433606d48 in _SmcProcessMessage () from
/usr/lib64/libSM.so.6
#5  0x0000003433e11ffb in IceProcessMessages () from
/usr/lib64/libICE.so.6
#6  0x00002aaaab178510 in QApplicationPrivate::appName ()
   from /usr/lib64/libQtGui.so.4
#7  0x00002aaaac93367b in QMetaObject::activate
(sender=0x686430, 
    from_signal_index=4, to_signal_index=4, argv=0x7f4750)
    at kernel/qobject.cpp:2940
#8  0x00002aaaac94faae in QSocketNotifier::activated
(this=0x7fffb0df5fd0, 
    _t1=11) at
.moc/release-shared/moc_qsocketnotifier.cpp:80
#9  0x00002aaaac93a48f in QSocketNotifier::event
(this=0x686430, 
    e=0x7fffb0df7130) at kernel/qsocketnotifier.cpp:305
#10 0x00002aaaab131abc in
QApplicationPrivate::notify_helper ()
   from /usr/lib64/libQtGui.so.4
#11 0x00002aaaab133b4d in QApplication::notify () from
/usr/lib64/libQtGui.so.4
#12 0x00002aaaac9439bc in socketNotifierSourceDispatch (
---Type <return> to continue, or q <return> to quit---
    source=<value optimized out>) at
kernel/qcoreapplication.h:183
#13 0x000000342a82cf44 in g_main_context_dispatch ()
   from /lib64/libglib-2.0.so.0
#14 0x000000342a82fd7d in g_main_context_check () from
/lib64/libglib-2.0.so.0
#15 0x000000342a8302ae in g_main_context_iteration ()
   from /lib64/libglib-2.0.so.0
#16 0x00002aaaac943e50 in
QEventDispatcherGlib::processEvents (this=0x654af0, 
    flags=<value optimized out>) at
kernel/qeventdispatcher_glib.cpp:363
#17 0x00002aaaab1a5d7f in QX11Info::copyX11Data ()
   from /usr/lib64/libQtGui.so.4
#18 0x00002aaaac922968 in QEventLoop::processEvents (
    this=<value optimized out>, flags=<value optimized
out>)
    at kernel/qeventloop.cpp:126
#19 0x00002aaaac922a79 in QEventLoop::exec
(this=0x7fffb0df7340, 
    flags=@0x7fffb0df7350) at kernel/qeventloop.cpp:172
#20 0x00002aaaac924c6b in QCoreApplication::exec ()
    at kernel/qcoreapplication.cpp:727
#21 0x0000000000400cc1 in main (argc=1, argv=<value
optimized out>)
    at testsoqt0.cpp:33




I have checked to make sure that the compiled programs
access the correct shared objects and have recompiled all
gfx libraries many times. At this point... I'm stuck and I
need this working. How do I fix this? Is there some way I
can tell Qt to always use indirect rendering?

Thanks,
Ross,

--------------------------------------
Start Yahoo! Auction now! Check out the cool campaign
http://pr.mail.yahoo.co.jp/auction/

--
 [ signature omitted ]