Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Build works on other computers but throws ntdll.dll access violation error on my PC

Discussion in 'Editor & General Support' started by baroquedub, Sep 24, 2015.

  1. baroquedub

    baroquedub

    Joined:
    Aug 27, 2015
    Posts:
    11
    Still very new to Unity so any help would be much appreciated. Since the recent update to Unity 5.2.1f1 (64-bit) the builds for a project I'm working on no longer work on my computer.

    This hasn't affected all builds - I can successfully build and run earlier, simpler versions - but the newer version of my project (which uses the ImageEffects imported from the Corridor Lighting Demo) now displays errors during the build. This is what appears in the console:

    Shader error in 'Hidden/NFAA': Compiled shader code uses too many instruction slots (112). Max. allowed by the target (ps_2_0) is 96. at line 1 (on d3d9)

    Shader error in 'Hidden/NFAA': Compiled shader code uses too many instruction slots (99). Max. allowed by the target (ps_2_0) is 96. at line 1 (on d3d9)

    Shader error in 'Hidden/NFAA': Too many math instructions for SM2.0 (99 needed, max is 64). Try #pragma target 3.0 at line 78 (on d3d9)

    Shader error in 'Hidden/NFAA': Too many math instructions for SM2.0 (91 needed, max is 64). Try #pragma target 3.0 at line 114 (on d3d9)

    (*what's confusing is that the scene works fine when run in the editor, and plays without any errors*)

    When I run the exe that's generated I see the splash screen and then the screen goes blank for about 15 seconds then, before showing the scene, it throws an error:

    Unhandled exception at 0x000000007789F6C6 (ntdll.dll) in player_cam_test2_debug.exe: 0xC0000005: Access violation writing location 0x0000000000000118.

    The same exe and data files copied to another computer with an earlier version of unity (5.1) works fine and runs without any problems.

    Is this a bug with the update? Or is my machine running out of memory? (the other machine has significantly higher spec) How can I tell what's going wrong?

    I tried a debug build, this is the output:

    'player_cam_test2_debug.exe' (Win32): Loaded '\\LS-XHL9B1\share\_UNITY Projects\Player Cam v2\_BUILDS\player_cam_test2_debug.exe'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\hid.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\nsi.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\lpk.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\usp10.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\psapi.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\ddraw.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\dciman32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\setupapi.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\msacm32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\dnsapi.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\IPHLPAPI.DLL'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\winnsi.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\winhttp.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\webio.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded '\\LS-XHL9B1\share\_UNITY Projects\Player Cam v2\_BUILDS\player_cam_test2_debug_Data\Mono\mono.dll'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\mswsock.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\WSHTCPIP.DLL'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\dhcpcsvc6.dll'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\dhcpcsvc.dll'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\nlaapi.dll'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\NapiNSP.dll'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\pnrpnsp.dll'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\winrnr.dll'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\d3d11.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\dxgidebug.dll'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\wintrust.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\nvwgf2umx.dll'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\d3d9.dll'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\d3d8thk.dll'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\MMDevAPI.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\propsys.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\wdmaud.drv'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\ksuser.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\avrt.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\KORGUM64.DRV'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\AudioSes.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\msacm32.drv'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\midimap.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\dsound.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\clbcatq.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\xinput1_3.dll'. Symbols loaded.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\dbghelp.dll'. Cannot find or open the PDB file.
    'player_cam_test2_debug.exe' (Win32): Loaded 'C:\Windows\System32\sspicli.dll'. Cannot find or open the PDB file.
    The thread 0x28f4 has exited with code 0 (0x0).
    Unhandled exception at 0x000000007789F6C6 (ntdll.dll) in player_cam_test2_debug.exe: 0xC0000005: Access violation writing location 0x0000000000000118.

    I've also tried running the exe on another hard-drive (local C drive, instead of a NAS share), I've also tried running it as Admin. Nothing works. I've tried rebooting the PC, as some Googling suggests.

    My next option is to try a system restore to before the recent update but my understanding is that it's best to keep programmes up to date...

    Can anyone help? Thanks.

    --
    UPDATE:

    Sadly the last option isn't possible for me. The last restore point I have is before the update.
    I've also just tried running the exe with a much lower resolution and graphics quality but still getting the error, so I assume it's not do do with running out of memory?
    And I've now done an export to the web player and that works fine in the browser, go figure... :/
     
    Last edited: Sep 24, 2015
  2. NSXboxDev

    NSXboxDev

    Joined:
    Oct 5, 2015
    Posts:
    31
    Hi there!

    Did you ever figure this out? We're getting a user who is also having a crash in ntdll.dll in our shipped game.
     
  3. baroquedub

    baroquedub

    Joined:
    Aug 27, 2015
    Posts:
    11
    Sorry, no. I've been distracted by other things like getting into VR development work for which I'm not using the ImageEffects. I've also updated to Unity 5.3 and just not come across the problem again.

    I'll see if I can dig out the problematic project and try a Build on 5.3 to see if it still gives me the same error.

    In my mind, the fact that the same exe and data files copied to another computer worked fine, seems to imply that it's a system issue (?graphics card?) local to the user.

    Sorry I couldn't be of more help.
     
  4. NSXboxDev

    NSXboxDev

    Joined:
    Oct 5, 2015
    Posts:
    31
    No worries! Some other threads I've found seem to suggest that DX11 shaders can cause this on some machines. I think it might have to do with DX11 Noise and Grain. Gonna try removing that, otherwise we'll have to wait until we upgrade the project to 5.3 and hope for the best. :p