[Interest] Qt5/eglfs coredump in QGL2PaintEngineEx::begin due to null QGLContext.

Jon Trulson jon at radscan.com
Mon Feb 13 01:50:40 CET 2012


Hi, I'm building Qt5 (latest from git) on an arm board (imx53 QSB).  I
am not using X11.  I am using the eglfs plugin.

I have attempted to run several of the qtbase demos (like
animatedtiles).  In all cases, I get a SEGV in
qpaintengineex_opengl2.cpp:1960 (QGL2PaintEngineEx::begin()).

This code looks like:
   1959:    d->ctx = d->device->context();
   1960:    d->ctx->d_ptr->active_engine = this;

d->device->context() is returning NULL, and of course it then cores
when it tries to deref it on line 1960.

I have gone through the eglfs plugin code in as much detail as I can -
The egl display and window surfaces are being created and initialized
properly, and seem to return sane values.  The eglCreateContext()
calls in qeglplatformcontext.cpp are working and returning sane
results.

So - where/when is this QGLContext supposed to be created?  And why is
it not being created :)

I am very new to the guts of Qt, so please forgive me if I'm missing
something stupid.  Any ideas or suggestions are definitely welcome.

Thanks.


PS:  I case it's useful, here are a few lines from the backtrace in
gdb (frame #1 is where the trouble is):

#0  0x2c4eb7f4 in QScopedPointer<QGLContextPrivate, QScopedPointerDeleter<QGLContextPrivate> >::operator-> (this=0x4)
     at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:109
#1  0x2c520cd8 in QGL2PaintEngineEx::begin (this=0x358d8, pdev=0x355a8)
     at gl2paintengineex/qpaintengineex_opengl2.cpp:1960
#2  0x2b68c558 in QPainter::begin (this=0x7eedf430, pd=0x355a8)
     at painting/qpainter.cpp:1826
#3  0x2b68ab28 in QPainter (this=0x7eedf430, pd=0x2f868)
     at painting/qpainter.cpp:1470
#4  0x2ac371b0 in QWidgetPrivate::drawWidget (this=0x2f878, pdev=0x355a8,
     rgn=@0x7eedf550, offset=@0x7eedf59c, flags=4, sharedPainter=0x0,
     backingStore=0x35350) at kernel/qwidget.cpp:5091

I have more if you like :)


-- 
Jon Trulson

"Get the cheese to sickbay, the Doctor should look at it as soon as
  possible." -- Chief Engineer B'Elanna Torres, Voyager



More information about the Interest mailing list