Created attachment 132131 [details] Screenshot of the crash, fence pointer is NULL. I built the current 17.1.3 release on Windows Visual Studio 2015 with LLVM 3.9 (and 4.0 as well). When I start my Qt application, which creates some GL contexts, I get the crash that you can see in the attached images, when one of the contexts is created. I tracked the crash down to the following commit (4 month ago): https://github.com/mesa3d/mesa/commit/043883647acaee0b2c67c1c6b496404ebb4e8d67 As you can see in my screenshot, the fence pointer is NULL and it is not checked before calling a function that needs a valid fence pointer. It seems to happen when wglMakeCurrent(NULL,NULL) is called by Qt and the context that was active before is a shared context, so the bad fence call happens.
I reverted the commit from https://github.com/mesa3d/mesa/commit/043883647acaee0b2c67c1c6b496404ebb4e8d67 and then the crash is gone. The problem seems to be: stw_context.c: line 442: if (old_ctx->shared) { struct pipe_fence_handle *fence = NULL; old_ctx->st->flush(old_ctx->st, ST_FLUSH_FRONT | ST_FLUSH_WAIT, &fence); } else { old_ctx->st->flush(old_ctx->st, ST_FLUSH_FRONT, NULL); } if I change that back to just: old_ctx->st->flush(old_ctx->st, ST_FLUSH_FRONT, NULL); then the crash is gone. Since the fence pointer points to NULL and stays NULL, the old_ctx->st->flush crashes.
This is a duplicate of bug 102148, which has been fixed.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.