Commit 8d457594 authored by Elena Zaretskaya's avatar Elena Zaretskaya
Browse files

Fix segfault when exiting app running under eglfs


In function QWindow::destroy() the platformWindow is destroyed
(QEglFSWindow in this case), but after that the QSurface destructor
is called (qsurface.cpp:127), where access to the opengl context is
performed (QOpenGLContext::currentContext()->doneCurrent()). Therefore
the surface pointer is deleted earlier (gbm_surface_destroy) than the
working with it (eglMakeCurrent) is finished. But the event
QPlatformSurfaceEvent, that is sent before deleting platformWindow,
isn't processed (qwindow.cpp:1665), though we can perform doneCurrent()
in the handler of QPlatformSurfaceEvent. The full description with
valgrind stacks on bugreports.

Task-number: QTBUG-52399
Change-Id: I69035dfd8ba5b5eeec243bc0edd3f571dc9525f9
Reviewed-by: default avatarLaszlo Agocs <laszlo.agocs@theqtcompany.com>
parent b3e9144c
No related merge requests found
Showing with 11 additions and 0 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment