WebGL JavaScript game causing STATUS_ACCESS_VIOLATION in Chrome

1

I'm developing an HTML5 game using WebGL, and I encounter this bizarre problem when running it on Edge and Chrome. Randomly the page will go to the "Aw, Snap!" error page with the STATUS_ACCESS_VIOLATION status, quitting me out entirely. I deduced that this isn't due to any specific state in the game, as it will randomly happen after any amount of time in any location, so the only common thread I can think of is when WebGL is in use.

I analyzed the Chrome dump files using WinDbg and found the error status listed as "0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s." Could my shaders be causing this? If it was a JavaScript issue I think I'd see it in the console, and it wouldn't crash the entire page. I can't find anything specific about what could be causing this online, much less about how to narrow down the issue in my code. Here's my shader code and the dump information.

Vertex Shader:

attribute vec2 a_position;
attribute vec2 a_texcoord;

uniform mat3 u_positionMatrix;
uniform mat3 u_textureMatrix;
varying vec2 v_texcoord;

void main() {
    gl_Position = vec4((u_positionMatrix*vec3(a_position,1)).xy,0,1);
    v_texcoord = (u_textureMatrix*vec3(a_texcoord,1.0)).xy;
}

Fragment Shader:

precision mediump float;

uniform sampler2D u_texture;
uniform vec4 u_blend;
varying vec2 v_texcoord;

void main() {
    gl_FragColor = texture2D(u_texture,v_texcoord)*u_blend;
}`);

Dump analysis:

*** WARNING: Unable to verify checksum for combase.dll

KEY_VALUES_STRING: 1

    Key  : AV.Fault
    Value: Read

    Key  : Analysis.CPU.mSec
    Value: 1031

    Key  : Analysis.DebugAnalysisProvider.CPP
    Value: Create: 8007007e on COMPUTER

    Key  : Analysis.DebugData
    Value: CreateObject

    Key  : Analysis.DebugModel
    Value: CreateObject

    Key  : Analysis.Elapsed.mSec
    Value: 1258

    Key  : Analysis.Memory.CommitPeak.Mb
    Value: 336

    Key  : Analysis.System
    Value: CreateObject

    Key  : Timeline.Process.Start.DeltaSec
    Value: 1167

    Key  : WER.Process.Version
    Value: 85.0.4183.102


ADDITIONAL_XML: 1

OS_BUILD_LAYERS: 1

NTGLOBALFLAG:  0

PROCESS_BAM_CURRENT_THROTTLED: 0

PROCESS_BAM_PREVIOUS_THROTTLED: 0

CONTEXT:  (.ecxr)
rax=00007669035b8b00 rbx=00007669035cfb18 rcx=0000000000000000
rdx=00007669035c6520 rsi=0000023237a1e100 rdi=0000023237a1df00
rip=00007ffc13c68c8e rsp=000000ec40bff008 rbp=00000232367f5a80
 r8=0000000000000080  r9=00007ffc13c68c80 r10=00007ffc0dd5f8e0
r11=0000766903209580 r12=0000000000000080 r13=0000000000000000
r14=000000000000001a r15=000000ec40bff030
iopl=0         nv up ei pl nz na po nc
cs=0033  ss=0000  ds=0000  es=0000  fs=0053  gs=002b             efl=00010206
chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2750d6e:
00007ffc`13c68c8e 488b8188050000  mov     rax,qword ptr [rcx+588h] ds:00000000`00000588=????????????????
Resetting default scope

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ffc13c68c8e (chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x0000000002750d6e)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 0000000000000588
Attempt to read from address 0000000000000588

PROCESS_NAME:  chrome.exe

READ_ADDRESS:  0000000000000588 

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  0000000000000000

EXCEPTION_PARAMETER2:  0000000000000588

STACK_TEXT:  
000000ec`40bff008 00007ffc`0dd69097     : 00000232`00000002 00000232`367ce330 3f800000`00000000 00003780`5a9f15b6 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2750d6e
000000ec`40bff010 00007ffc`13c68d26     : 00003780`5a9f0a26 00007669`03108270 00000000`00000000 00000000`0000000c : chrome!ovly_debug_event+0x65b587
000000ec`40bff0c0 00007ffc`13ea06d9     : 00000000`0352d800 00007ffc`140f1af6 00003780`5a9f0a16 00007669`03209580 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2750e06
000000ec`40bff110 00007ffc`140e5f2b     : 000000ec`40bff278 00000000`00000080 00001c74`976653c8 00000000`00000080 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x29887b9
000000ec`40bff180 00007ffc`140e684e     : 00000000`00000000 00007ffc`13ea5c18 00007669`03180bc8 00007ffc`140f1143 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2bce00b
000000ec`40bff1f0 00007ffc`140e69d3     : 00007669`0301c9a0 00007669`03009b60 00000000`00000000 00007ffc`13c632cb : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2bce92e
000000ec`40bff250 00007ffc`13ea0a1f     : 00007ffc`00000162 00007ffc`140e8bc0 00000000`00000000 00007ffc`13c41d01 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2bceab3
000000ec`40bff2a0 00007ffc`13ea0649     : 00007669`031800e0 00007ffc`140f1af6 00000000`00000000 00007669`030089e0 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2988aff
000000ec`40bff320 00007ffc`140e5f2b     : 00000000`3f800000 00000000`00000000 40922696`0999dcb6 00007ffc`11d18cd6 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2988729
000000ec`40bff390 00007ffc`140e684e     : 00000000`00000000 00007ffc`13ea5c18 00007669`03180a08 00007ffc`140f1143 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2bce00b
000000ec`40bff400 00007ffc`140e69d3     : 00007669`031800e0 00007ffc`140f1af6 00000000`00000000 00007ffc`13c632cb : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2bce92e
000000ec`40bff460 00007ffc`13ea0a1f     : 00007669`035cf2c0 00007ffc`158e2cf0 00007669`03011be0 00003780`5a9f0ec6 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2bceab3
000000ec`40bff4b0 00007ffc`13ea0649     : 000000ec`40bff580 00000000`00000000 000000ec`40bff820 00007ffc`13ea6459 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2988aff
000000ec`40bff530 00007ffc`140e5f2b     : 00000000`00000080 000002ef`524bd980 000002ef`524bdb08 00007ffc`140ec1d6 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2988729
000000ec`40bff5a0 00007ffc`140e684e     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2bce00b
000000ec`40bff610 00007ffc`140e69d3     : 00007669`03057350 00007ffc`13c4a157 00007669`030a0480 00007ffc`140e8e0d : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2bce92e
000000ec`40bff670 00007ffc`140eaacd     : 00000232`37e18f00 5a9f0c01`5e6bc8ec 00007669`031800e0 00007669`03008ac0 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2bceab3
000000ec`40bff6c0 00007ffc`143a5370     : 00000232`3ae65910 00000000`00000020 00007669`030572a0 00000000`03057201 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2bd2bad
000000ec`40bff7a0 00007ffc`143a4d6b     : 00000232`35c70740 00000000`00000000 00003780`5a9f0206 00007ffc`0fc8b3b0 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2e8d450
000000ec`40bff8e0 00007ffc`124e28d4     : 000072fd`ab0fe02e 00007ffc`0cfa7f28 00000000`00000000 00007ffc`0cfa7d19 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0x2e8ce4b
000000ec`40bff9e0 00007ffc`0dd67bb3     : 00000000`ffffffff 00003780`5a9f0036 00007ffc`5dd34e80 00000000`00000004 : chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+0xfca9b4
000000ec`40bffad0 00007ffc`0dd32e2e     : 00000232`33c88b00 00000000`00000000 00000000`00000000 00000000`00000000 : chrome!ovly_debug_event+0x65a0a3
000000ec`40bffb80 00007ffc`0dd2c614     : 000000ec`40bffcb0 000000ec`40bffcb8 00007ffc`0cfa98e8 00000000`00000000 : chrome!ovly_debug_event+0x62531e
000000ec`40bffc80 00007ffc`0fcce22c     : 000000ec`40bffd48 00000232`31b8bde0 00000000`00000000 00000000`00000000 : chrome!ovly_debug_event+0x61eb04
000000ec`40bffd10 00007ffc`5dd26fd4     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : chrome!CrashForExceptionInNonABICompliantCodeRange+0x9f9edc
000000ec`40bffd90 00007ffc`5e6fcec1     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : KERNEL32!BaseThreadInitThunk+0x14
000000ec`40bffdc0 00000000`00000000     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x21


SYMBOL_NAME:  chrome!RelaunchChromeBrowserWithNewCommandLineIfNeeded+2750d6e

MODULE_NAME: chrome

IMAGE_NAME:  chrome.dll

STACK_COMMAND:  ~17s ; .ecxr ; kb

FAILURE_BUCKET_ID:  NULL_CLASS_PTR_READ_c0000005_chrome.dll!RelaunchChromeBrowserWithNewCommandLineIfNeeded

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

IMAGE_VERSION:  85.0.4183.102

FAILURE_ID_HASH:  {5cde37ba-ec14-dc5b-5cfd-48d1b2780b55}

Followup:     MachineOwner

What can even cause this to happen? I'm running Windows 10 and accessing the game via a local webserver. This also happened running the game from my phone. This crashing doesn't happen in Firefox. Could this be related to my computer or my shaders, or what sort of JavaScript practices could cause something like this?

javascript
google-chrome
webgl

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0