Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.0, 6.2.2
Description
This problem has been bugging me for a long time, and I don't know if it's a driver EGL implementation problem or a Qt problem.
This issue occurs with one specific graphics card, Mali-G76, whose driver is also vendor specific.
Any quick program and qopenglwidget qopenglwindow will crash.
Its stack is as follows:
#0 0x0000007fb6bd7bw94 in get_next_argument (signature=0x0, details=details@entry=0x7fd828fd88) at src/connection.c:445 #1 0x0000007fb6bd8340 in wl_argument_from_va_list (signature=<optimized out>, args=<optimized out>, count=<optimized out>, ap=...) at src/connection.c:508 #2 0x0000007fb6bd6268 in wl_proxy_marshal (proxy=0x376b15f0, opcode=1) at src/wayland-client.c:850 #3 0x0000007faee98b9c in window_surface_delete () at /lib/aarch64-linux-gnu/libmali.so.0 #4 0x0000007faee8f200 in eglp_window_surface_specific_deinitialization () at /lib/aarch64-linux-gnu/libmali.so.0 #5 0x0000007faee89760 in eglp_delete_surface () at /lib/aarch64-linux-gnu/libmali.so.0 #6 0x0000007faee8de6c in eglMakeCurrent () at /lib/aarch64-linux-gnu/libmali.so.0 #7 0x0000007fb4480880 in QtWaylandClient::QWaylandGLContext::makeCurrent(QPlatformSurface*) (this=this@entry=0x3770edc0, surface=<optimized out>) at /home/wugang/Desktop/qtwayland/qtwayland-opensource-src/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp:415 #8 0x0000007fbabc4cb0 in QOpenGLContext::makeCurrent(QSurface*) (this=0x37741330, surface=0x3771a480) at kernel/qopenglcontext.cpp:984 #9 0x0000007fbb297ce0 in QOpenGLWidget::makeCurrent() (this=this@entry=0x376233a0) at kernel/qopenglwidget.cpp:1161 #10 0x0000007fbb297f60 in QOpenGLWidgetPrivate::reset() (this=0x375fb080) at kernel/qopenglwidget.cpp:704 #11 0x0000007fbb297fa0 in QOpenGLWidget::~QOpenGLWidget() (this=0x376233a0, __in_chrg=<optimized out>) at kernel/qopenglwidget.cpp:1020 #12 0x00000000004061a8 in GLWidget::~GLWidget() (this=0x376233a0, __in_chrg=<optimized out>) at ../2dpainting/glwidget.h:59
As you can see, there is a crash when calling eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT) . Because before it, wl_surface has been destory.
But eglMakeCurrent is still using wl_surface.
Another thing to say is that in this driver, eglDestorySurface has the same problem, https://bugreports.qt.io/browse/QTBUG-92249 has fixed it.
A similar question has been raised on gnome, but it doesn't seem to be resolved
https://gitlab.gnome.org/GNOME/gtk/-/issues/795
But it is mentioned here that ARM engineers do not think this is a problem in the driver.
One fix is:
Call eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT) before destroying the surface.
Attachments
Issue Links
- relates to
-
QTBUG-88677 Crash with qtwebengine demo simplebrowser tab webpage close
- Closed
-
QTBUG-127980 Segmentation fault after Qt.quit()
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-100262 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
392363,2 | Let doneCurrent execute before wl_surface | dev | qt/qtbase | Status: ABANDONED | -1 | 0 |
392364,2 | Let doneCurrent execute before wl_surface | dev | qt/qtdeclarative | Status: ABANDONED | 0 | 0 |
392366,1 | Let doneCurrent execute before wl_surface | dev | qt/qtwebengine | Status: ABANDONED | -1 | 0 |
394469,4 | Let doneCurrent execute before wl_surface | dev | qt/qtwayland | Status: ABANDONED | -1 | 0 |