microsoft / angle

ANGLE: OpenGL ES to DirectX translation
Other
615 stars 166 forks source link

Crash in RecoverFromLostDevice #101

Closed ubgitty closed 7 years ago

ubgitty commented 7 years ago

Hi

We are experiencing crashes of our app which are caused by device lost events.

What is the proper way to handle a device lost event? Even the provided templates crash when trying to recover from a lost device.

We tested the device lost handling as suggested by the Win2D team by disabling the display adapters in the device manager (https://microsoft.github.io/Win2D/html/HandlingDeviceLost.htm)

Exception thrown at 0x00007FFE107D7788 (KernelBase.dll) in AppForOpenGLES2.exe: 0x40080201: WinRT originate error (parameters: 0x0000000080004005, 0x0000000000000020, 0x000000BB4D3FEAD0).
Exception thrown at 0x00007FFE107D7788 in AppForOpenGLES2.exe: Microsoft C++ exception: Platform::FailureException ^ at memory location 0x000000BB4D3FF098. HRESULT:0x80004005 Unspecified error
WinRT information: Failed to choose first EGLConfig
Stack trace:
 >[External Code]
 >AppForOpenGLES2.exe!OpenGLES::Initialize() Line 136
 >AppForOpenGLES2.exe!AppForOpenGLES2::OpenGLESPage::RecoverFromLostDevice() Line 100
 >[External Code]
Unhandled exception at 0x00007FFE0E9CD1C4 (twinapi.appcore.dll) in AppForOpenGLES2.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x000000BB4D3FEF00, 0x0000000000000001).
austinkinross commented 7 years ago

Hi, thanks a lot for reporting this! I believe this is a recent regression in ANGLE itself. The template should be able to recover from a device lost as-is.

We have a plan to fix this, and I'll reply back to this issue when the fix has been submitted to ms-master.

Thanks again! Austin

austinkinross commented 7 years ago

Thanks again for reporting this issue! It is fixed in both master and ms-master. The fix will also be available in the next NuGet package, which should be released soon.

Austin

austinkinross commented 7 years ago

This is now fixed in nuget package v2.1.13.

Thanks again for reporting the issue!