KalebDark / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Resizing the window crashes the application if egl calls are made from another thread than the window's thread #860

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Make egl calls from another thread than the windows thread
2.Resize the window
3.

What is the expected output? What do you see instead?
The application crashes because of an access violation

What version of the product are you using? On what operating system?
master branch

Please provide any additional information below.
In SurfaceD3D a window procedure is installed to catch WM_SIZE messages and to 
call checkForOutOfDateSwapChain() when the window is resized. The problem is 
that checkForOutOfDateSwapChain() is not thread safe so the application crashes 
if the application is calling an egl function from another thread.
I know the actual implementation of egl is not thread safe but at least the 
application should not be limited to call egl from the window's thread only.
A workaround is to simply remove the window procedure as 
checkForOutOfDateSwapChain() is called after each buffers swap, so the surface 
is resized anyway without the need to process WM_SIZE messages.

Original issue reported on code.google.com by regis.fe...@gmail.com on 5 Jan 2015 at 4:02

GoogleCodeExporter commented 9 years ago
This should now be fixed.  ANGLE no longer subclasses windows.

Original comment by geofflang@chromium.org on 28 Apr 2015 at 2:29

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Geoff Lang <geofflang@chromium.org>
Commit : 30cb86d87c78272c3ec131ae270d063a8a77912e

Code-Review  0 : Geoff Lang
Code-Review  +2: Jamie Madill
Verified     0 : Jamie Madill
Verified     +1: Geoff Lang
Commit Queue   : Chumped
Change-Id      : I137d27bafc4d690b159ffef8cc69d6f1c5a05131
Reviewed-at    : https://chromium-review.googlesource.com/267681

Create a child window in SurfaceD3D when needed.

BUG=angleproject:961
BUG=angleproject:860

src/libANGLE/renderer/d3d/DisplayD3D.cpp
src/libANGLE/renderer/d3d/DisplayD3D.h
src/libANGLE/renderer/d3d/RendererD3D.h
src/libANGLE/renderer/d3d/SurfaceD3D.cpp
src/libANGLE/renderer/d3d/SurfaceD3D.h
src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
src/libANGLE/renderer/d3d/d3d11/Renderer11.h
src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
src/libANGLE/renderer/d3d/d3d9/Renderer9.h

Original comment by bugdro...@chromium.org on 28 Apr 2015 at 7:04