[Interest] Qt5/eglfs coredump in QGL2PaintEngineEx::begin due to null QGLContext.
Samuel Rødal
samuel.rodal at nokia.com
Mon Feb 13 09:23:21 CET 2012
On 02/13/2012 01:50 AM, ext Jon Trulson wrote:
> 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 :)
I'd recommend trying qmlscene or examples/opengl/hellowindow --single
here as well, as I'm not sure eglfs supports multiple top-levels. A
QGLWidget embedded in a widget hierarchy will always force a top-level
platform window to be created, since it needs its own EGLSurface (or
similar on other platforms).
--
Samuel
More information about the Interest
mailing list