- Home /
Crash in build when reloading level with a Sprite Renderer in the scene
I am getting a crash after reloading a scene in Unity when there is a sprite renderer in the scene.
Some details:
It doesn't crash after the first time reloading, but a random number of reloads. Usually somewhere between 5 and 15.
My scene consists of
A camera
A small script that displays a random number every time the scene restarts
The sprite renderer
When the Sprite renderer is disabled, the scene no longer crashes
I'm running Unity 5.3.4f1 Personal on Windows 10
The computer has integrated Intel graphics along with an NVIDIA 940M. I've set the build exe to always use the NVIDIA card.
Here is the relevant part of my output log:
The last lines before the crash:
Unloading 3 Unused Serialized files (Serialized files now loaded: 0) UnloadTime: 0.292737 ms
Unloading 21 unused Assets to reduce memory usage. Loaded Objects now: 208.
Total: 0.291845 ms (FindLiveObjects: 0.030344 ms CreateObjectMapping: 0.018296 ms MarkObjects: 0.114685 ms DeleteObjects: 0.127180 ms)
And the stack trace:
========== OUTPUTING STACK TRACE ==================
ERROR: SymGetSymFromAddr64, GetLastError: 'The specified module could not be found.' (Address: 034DD650)
ERROR: SymGetModuleInfo64, GetLastError: 'A dynamic link library (DLL) initialization routine failed.' (Address: 034DD650)
0x034DD650 (())
0x00750962 (Wormhole Galaxy -p9-crash-test) [c:\buildslave\unity\build\runtime\gfxdevice\threaded\gfxdeviceworker.cpp:1842] GfxDeviceWorker::RunCommand
0x00750CAE (Wormhole Galaxy -p9-crash-test) [c:\buildslave\unity\build\runtime\gfxdevice\threaded\gfxdeviceworker.cpp:309] GfxDeviceWorker::Run
0x003940ED (Wormhole Galaxy -p9-crash-test) [c:\buildslave\unity\build\runtime\threads\thread.cpp:40] Thread::RunThreadWrapper
0x747238F4 (KERNEL32) BaseThreadInitThunk
0x77305DE3 (ntdll) RtlUnicodeStringToInteger
========== END OF STACKTRACE ===========
From the error log:
Unknown caused an Access Violation (0xc0000005)
C:\Users\admin\Documents\Unity Projects\Wormhole Galaxy\Build\Wormhole Galaxy -p9-crash-test.exe, run by admin.
40% memory in use.
0 MB physical memory [0 MB free].
0 MB paging file [0 MB free].
0 MB user address space [3667 MB free].
Write to location 034dd650 caused an access violation.
Does anyone have any ideas?
Thanks