When profiling the app in unity I get an ongoing 4mb memory jump every time I load a scene and come back to the menu. Using System.GC.Collect(), Resources.UnloadUnusedAssets() or changing scenes does not clear this memory either. If you continue using the app the memory will continue to grow and will crash although it never seems to reach the memory roof. I’m also testing on a Samsung Ativ which works perfectly and doesn’t receive this error or the memory jump. This is happening on a Lumia 520 and I receive this corresponding error message in Visual Studio
allocation 0x00000000 already registered @ C:/BuildAgent/work/d3d49558e4d408f4/Runtime/GfxDevice/d3d11/TexturesD3D11.cpp:l445 size 4194304; now calling from C:/BuildAgent/work/d3d49558e4d408f4/Runtime/GfxDevice/d3d11/TexturesD3D11.cpp:l445 size 4194304?
d3d11: failed to create 2D texture id=813 w=2048 h=2048 mips=1 d3dfmt=28 [8007000e]
d3d11: failed to create 2D texture view id=813 [80070057]
It appears as though it is trying to create a new texture and failing but I can’t find a missing texture. I don’t even use 2048 textures which the log suggests it’s trying to create and when this first occurs the memory(Used Total) readout from the profiler reports only around 43.5 mb. Below is the larger segment of the log. If anyone has experienced this or has any idea of whats happening, help would be much appreciated.
Notes: I’m using Unity 4.3.3.
UnloadTime: 3.451703 ms
Unloading 9 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)
Unloading 13 unused Assets to reduce memory usage. Loaded Objects now: 1329. Operation took 301.567566 ms.
System memory in use: 22.3 MB.
UnloadTime: 16.944887 ms
Unloading 1 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)
Unloading 75 unused Assets to reduce memory usage. Loaded Objects now: 938. Operation took 362.374207 ms.
System memory in use: 21.8 MB.
Unloading 0 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)
Unloading 73 unused Assets to reduce memory usage. Loaded Objects now: 865. Operation took 334.938232 ms.
System memory in use: 20.9 MB.
About To Load
(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/WP8SupportGenerated/UnityEngineDebug.cpp Line: 55)
allocation 0x00000000 already registered @ C:/BuildAgent/work/d3d49558e4d408f4/Runtime/GfxDevice/d3d11/TexturesD3D11.cpp:l445 size 4194304; now calling from C:/BuildAgent/work/d3d49558e4d408f4/Runtime/GfxDevice/d3d11/TexturesD3D11.cpp:l445 size 4194304?
(Filename: C:/BuildAgent/work/d3d49558e4d408f4/Runtime/Allocator/MemoryManager.cpp Line: 1018)
d3d11: failed to create 2D texture id=813 w=2048 h=2048 mips=1 d3dfmt=28 [8007000e]
d3d11: failed to create 2D texture view id=813 [80070057]
UnloadTime: 3.958962 ms
Unloading 2 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)
Unloading 14 unused Assets to reduce memory usage. Loaded Objects now: 3946. Operation took 386.829773 ms.
System memory in use: 22.3 MB.
The thread 0x330 has exited with code 259 (0x103).
The thread 0x188 has exited with code 259 (0x103).
The thread 0xd34 has exited with code 259 (0x103).
Could not allocate memory: System out of memory!
Trying to allocate: 16520B with 4 alignment. MemoryLabel: DynamicArray
Allocation happend at: Line:333 in C:\BuildAgent\work\d3d49558e4d408f4\Runtime/Utilities/dynamic_array.h
Memory overview
[ ALLOC_DEFAULT ] used: 10338799B | peak: 26346600B | reserved: 15387782B
[ ALLOC_GAMEOBJECT ] used: 710707B | peak: 734874B | reserved: 862668B
[ ALLOC_GFX ] used: 44125B | peak: 19598121B | reserved: 45022B
[ ALLOC_PROFILER ] used: 12912916B | peak: 12912924B | reserved: 13016002B
Could not allocate memory: System out of memory!
Trying to allocate: 16520B with 4 alignment. MemoryLabel: DynamicArray
Allocation happend at: Line:333 in C:\BuildAgent\work\d3d49558e4d408f4\Runtime/Utilities/dynamic_array.h
Memory overview
[ ALLOC_DEFAULT ] used: 10338799B | peak: 26346600B | reserved: 15387782B
[ ALLOC_GAMEOBJECT ] used: 710707B | peak: 734874B | reserved: 862668B
[ ALLOC_GFX ] used: 44125B | peak: 19598121B | reserved: 45022B
[ ALLOC_PROFILER ] used: 12912916B | peak: 12912924B | reserved: 13016002B
(Filename: C:/BuildAgent/work/d3d49558e4d408f4/Runtime/Allocator/MemoryManager.cpp Line: 793)
The program '[4008] TaskHost.exe' has exited with code -2147483645 (0x80000003).