- Home /
Unhandled Access Violation in ntdll.dll When Building Assets For Scene.
Everytime I try to build my project; Unity Editor crashes when the compiler reaches "Building assets for scene".
Note, it crashes, not freeze.
Scene 0 builds fine because there is barely anything in it, but any other scene fails with.
Unhandled exception at 0x00007FFB19A9B179 (ntdll.dll) in Unity.exe: 0xC0000005: Access violation writing location 0x0000000000000118.
I'm using V5.1.2f1 and I've tried reinstalling it.
I did not have this problem a few months ago with 4.x, but the project has grown a lot since then and I have not built an .exe since then.
Game runs fine in editor.
Any advice on how to debug this is greatly appreciated.
Thanks.
I have the same issue. I'd really appreciate some help here (runs O$$anonymous$$ in editor but not via "build and run"). Project was working prior to Unity 5 but like Oruji, size and scope of project has changed. The output from failed run (and yes I have tried the advice in the output).
I've deleted harmless message chunks from the output to make sure it posts...
================= Start of file removed
Direct3D: Version: Direct3D 11.0 [level 11.0] Renderer: NVIDIA GeForce GTX 980 (ID=0x13c0) Vendor: NVIDIA VRA$$anonymous$$: 4009 $$anonymous$$B Begin $$anonymous$$ono$$anonymous$$anager ReloadAssembly Platform assembly: E:\unity\CopernicusOne\CopernicusOne_Data\$$anonymous$$anaged\UnityEngine.dll (this message is harmless) Loading E:\unity\CopernicusOne\CopernicusOne_Data\$$anonymous$$anaged\UnityEngine.dll into Unity Child Domain
================= Removed harmless loading messages.
Completed reload, in 0.121 seconds desktop: 3840x2160 60Hz; virtual: 3840x2160 at 0,0 Initializing input.
Input initialized.
Initialized touch support.
Platform assembly: E:\unity\CopernicusOne\CopernicusOne_Data\$$anonymous$$anaged\System.Core.dll (this message is harmless) Platform assembly: E:\unity\CopernicusOne\CopernicusOne_Data\$$anonymous$$anaged\System.dll (this message is harmless) The file 'E:/unity/CopernicusOne/CopernicusOne_Data/mainData' is corrupted! Remove it and launch unity again! [Position out of bounds!]
(Filename: C:/buildslave/unity/build/Runtime/Serialize/SerializationCaching/CachedReader.cpp Line: 241)
================= Repeat errors removed
$$anonymous$$ultiple managers are loaded of type: PlayerSettings
(Filename: C:/buildslave/unity/build/Runtime/BaseClasses/$$anonymous$$anagerContextLoading.cpp Line: 279)
Crash!!! SymInit: Symbol-SearchPath: '.;E:\unity\CopernicusOne;E:\unity\CopernicusOne;C:\WINDOWS;C:\WINDOWS\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'Andrew' OS-Version: 10.0.10240 () 0x100-0x1 E:\unity\CopernicusOne\CopernicusOne.exe:CopernicusOne.exe (00007FF752C80000), size: 24608768 (result: 0), SymType: 'PDB', PDB: '.\player_win_development_x64.pdb', fileVersion: 5.1.0.28848 C:\WINDOWS\SYSTE$$anonymous$$32\ntdll.dll:ntdll.dll (00007FFC4BA10000), size: 1839104 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTE$$anonymous$$32\ntdll.dll', fileVersion: 10.0.10240.16392 C:\WINDOWS\system32\$$anonymous$$ERNEL32.DLL:$$anonymous$$ERNEL32.DLL (00007FFC4B630000), size: 708608 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\$$anonymous$$ERNEL32.DLL', fileVersion: 10.0.10240.16384
================= rest of stack removed
========== OUTPUTING STAC$$anonymous$$ TRACE ==================
00007FF752D4733B (CopernicusOne) std::_Sort
Answer by Oruji · Jul 22, 2015 at 11:13 AM
I managed to find three issues that caused the compiler to crash. I have not found the root cause, but I can work around it for now. Each of the items below caused the compiler to crash by themselves.
Change scene build order, I had to build my largest scene first.
Instead of loading .mp4 videos as assets in the editor, I load them at runtime one by one.
Removed all references to this custom shader.
Shader "Custom/Outline2D" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} _OutLineSpread ("Outline Spread", Range(0,0.02)) = 0.007 _Alpha ("Alpha", float) = 1 _Color ("Color", Color) = (1,1,1,1) }
SubShader { Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} ZWrite Off Blend One OneMinusSrcAlpha Cull Off Lighting On CGPROGRAM #pragma surface surf NoLighting alpha struct Input { float2 uv_MainTex; fixed4 color : COLOR; }; sampler2D _MainTex; float _OutLineSpread; float _Alpha; fixed4 _Color; void surf(Input IN, inout SurfaceOutput o) { fixed4 mainColor = (tex2D(_MainTex, IN.uv_MainTex+float2(_OutLineSpread,_OutLineSpread)) + tex2D(_MainTex, IN.uv_MainTex+float2(-_OutLineSpread,-_OutLineSpread)) + tex2D(_MainTex, IN.uv_MainTex+float2(-_OutLineSpread,_OutLineSpread)) + tex2D(_MainTex, IN.uv_MainTex+float2(_OutLineSpread,-_OutLineSpread))) * fixed4(_Color.r, _Color.g, _Color.b, _Alpha); mainColor = fixed4(1,1,1, mainColor.a); fixed4 addcolor = tex2D(_MainTex, IN.uv_MainTex) * IN.color; if(addcolor.a > _Alpha - 0.05){ mainColor = addcolor;} o.Albedo = mainColor.rgb * 0.85f; o.Alpha = mainColor.a; } fixed4 LightingNoLighting(SurfaceOutput s, fixed3 lightDir, fixed atten) { half4 c; c.rgb = s.Albedo; c.a = s.Alpha; return c; } ENDCG } }
Your answer
![](https://koobas.hobune.stream/wayback/20220611232342im_/https://answers.unity.com/themes/thub/images/avi.jpg)