You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: 2.0.9 Reported for operating system, platform: Windows 10, All
Comments on the original bug report:
On 2018-11-01 03:24:58 +0000, Cameron Gutman wrote:
Created attachment 3432
Fix SDL_CreateRenderer() crash
I received a bug report that a user was seeing my app crashing randomly. We narrowed it down to likely being a display driver crash (but the app crash was not expected). When this happens, the D3D device loss triggers us to try to create a new renderer. This ends up hitting GL_CreateRenderer() after D3D9 renderer creation fails, where it tries to look up OpenGL functions with GL_LoadFunctions().
Since the display driver is recovering, we don't have a working third party OGL implementation. The stock opengl32.dll lacks some of the functions that SDL looks for in GL_LoadFunctions(). The first one that's missing is glBlendEquation() which was introduced in OGL 1.2. When we hit this one, GL_LoadFunctions() fails, causing GL_DestroyRenderer() to be called. This eventually ends up calling a null pointer when SDL tries to invoke data->glViewport() inside GL_UpdateViewport().
The attached patch avoids caling GL_DestroyRenderer() until GL_LoadFunctions() has succeeded. I've also updated the GLES2 code which also had the same bug.
0:000> .excr
rax=0000000000000438 rbx=000002cae06b16b0 rcx=0000000000000000
rdx=0000000000000438 rsi=000002cae06b16b0 rdi=000002cae06b14c0
rip=0000000000000000 rsp=000000dc2ab06598 rbp=000002cae06b14c0
r8=0000000000000000 r9=0000000000000000 r10=000002cae06a9ea8
r11=000000dc2ab06590 r12=0000000000000000 r13=00000000000002d0
r14=000002cae06b16b0 r15=0000000000000001
iopl=0 nv up ei pl nz na pe nc
cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202
00000000`00000000 ?? ???
0:000> k
*** Stack trace for last set context - .thread/.cxr resets it
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 2.0.9
Reported for operating system, platform: Windows 10, All
Comments on the original bug report:
On 2018-11-01 03:24:58 +0000, Cameron Gutman wrote:
On 2018-11-01 09:27:06 +0000, Ozkan Sezer wrote:
On 2018-11-01 10:03:29 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: