Build Crash : DirectX 11 & Unity 5.6

After a whole day trying to understand why my build randomly crash during loadings (any loading) after upgrading to Unity 5.2, I finally found something quite odd.

We tested builds on several configurations :

  • Windows 10 with Nvidia GPU : crash
  • WIndows 8 with Nvidia GPU : crash
  • WIndows 7 with AMD GPU : OK
  • Windows 8 with AMD : OK

Seems Nvidia related…

Log files have more or less validated this hypothesis :

The crash log :

**nvwgf2umx.dll caused an Access Violation (0xc0000005)**
  in module nvwgf2umx.dll at 0033:ea1132d0.

Error occurred at 2017-04-10_161742.
10.exe, run by Admin.
46% memory in use.
8139 MB physical memory [4364 MB free].
9419 MB paging file [4078 MB free].
134217728 MB user address space [134216469 MB free].
Read from location 00000001 caused an access violation.

Context:
RDI:    0x07659fb8  RSI: 0x00000000  RAX:   0x0765ac80
RBX:    0x00000001  RCX: 0x005d8b20  RDX:   0x07659fb8
RIP:    0xea1132d0  RBP: 0x0765ac80  SegCs: 0x00000033
EFlags: 0x00010202  RSP: 0x0b77f810  SegSs: 0x0000002b
R8:    0x00000000  R9: 0x00000001  R10:   0x00000020
R11:    0x00000000  R12: 0x00000000  R13:   0xe9f40000
R14:    0x00000000  R15: 0x00000001

(...)

Module 1
C:\Windows\SYSTEM32\xinput1_3.dll
Image Base: 0x00400000  Image Size: 0x0001e000
File Size:  107368      File Time:  2007-04-04_185422
Version:
   Company:    Microsoft Corporation
   Product:    Microsoft® DirectX for Windows®
   FileDesc:   Microsoft Common Controller API
   FileVer:    9.18.944.0
   ProdVer:    9.18.944.0

Module 2
C:\Windows\SYSTEM32\xinput1_2.dll
Image Base: 0x00400000  Image Size: 0x00018000
File Size:  83736       File Time:  2006-07-28_093108
Version:
   Company:    Microsoft Corporation
   Product:    Microsoft® DirectX for Windows®
   FileDesc:   Microsoft Common Controller API
   FileVer:    9.14.701.0
   ProdVer:    9.14.701.0

Module 3
C:\Windows\SYSTEM32\xinput1_1.dll
Image Base: 0x00400000  Image Size: 0x00018000
File Size:  83664       File Time:  2006-03-31_123948
Version:
   Company:    Microsoft Corporation
   Product:    Microsoft® DirectX for Windows®
   FileDesc:   Microsoft Common Controller API
   FileVer:    9.12.589.0
   ProdVer:    9.12.589.0

Module 4
C:\Program Files\Bonjour\mdnsNSP.dll
Image Base: 0x69d10000  Image Size: 0x00035000
File Size:  193824      File Time:  2010-10-07_123616
Version:
   Company:    Apple Inc.
   Product:    Bonjour
   FileDesc:   Bonjour Namespace Provider
   FileVer:    2.0.4.0
   ProdVer:    2.0.4.0


== [end of error.log] ==




========== OUTPUTING STACK TRACE ==================

0x00007FFBEA1132D0 (nvwgf2umx) OpenAdapter12
0x00007FFBEA109F50 (nvwgf2umx) OpenAdapter12
0x00007FFBEA11155F (nvwgf2umx) OpenAdapter12
0x00007FFBEA111406 (nvwgf2umx) OpenAdapter12
0x00007FFBEA109CDD (nvwgf2umx) OpenAdapter12
0x00007FFBEA7E176A (nvwgf2umx) NVAPI_Thunk
0x00007FFBEAE46841 (nvwgf2umx) NVAPI_Thunk
0x00007FFC19BE8364 (KERNEL32) BaseThreadInitThunk
0x00007FFC1C4270D1 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

**** Crash! ****

To have a build running fine once again, here is what I did :

  • Updating Nvidia Drivers : Still Crashing
  • upgrading to Unity 5.6 : Still crashing
  • Enabling x86_64 bits : Still crashing
  • Enabling / Disabling GPU Skinning, Graphics Job : Still Crashing
  • Removing some dlls, removing some plugins : Still crashing
    - Disabling DirectX 11 : no more crashes…

So I found my problem, but the solution is quite odd, and is not really a solution.
Cause I’m not really sure that disabling DX11 is a really good idea…

Does anyone have a proper solution or know why do I have this issue ?

Thx by advance.

Can you take a look at my post and see if yours is similar? There are posts all over the web about NVidia’s nvwgf2umx.dll crashing games. I’ll try disabling DX11 for our projects…

https://forum.unity3d.com/threads/runtime-crash-gfxdeviceclient-getactiverendersurfacewidth-access-violation-0xc0000005.468823/

  • thanks

The link you"ve posted yesterday doesn’t seem to be the one you wanted to :slight_smile:

Some of our users are reporting the same crash with the dll causing an access violation.

What did you mean with “Disable DirectX11” ? Did you mean to say DirectX12?

@Paul_Bronowski did you find a fix?