Crashes in Unity 2017.2.1f1 when building 32 bit

Hi there

We recently Upgraded Unity on our project from 5.6.1p1 to 2017.2.1f1. Whilst all of our other platforms ran OK, our standalone windows builds were crashing at random intervals on integrated graphics cards with errors such as

DynamicHeapAllocator allocation probe 1 failed - Could not get memory for large allocation 4194304.
DynamicHeapAllocator allocation probe 2 failed - Could not get memory for large allocation 4194304.
DynamicHeapAllocator allocation probe 3 failed - Could not get memory for large allocation 4194304.
DynamicHeapAllocator allocation probe 4 failed - Could not get memory for large allocation 4194304.
DynamicHeapAllocator out of memory - Could not get memory for large allocation 4194304!
Could not allocate memory: System out of memory!
Trying to allocate: 4194304B with 16 alignment. MemoryLabel: STL
Allocation happend at: Line:78 in C:\buildslave\unity\build\Runtime/Allocator/STLAllocator.h
Memory overview

[ ALLOC_DEFAULT ] used: 423462982B | peak: 0B | reserved: 513760166B
[ ALLOC_TEMP_JOB ] used: 479460B | peak: 0B | reserved: 3145728B
[ ALLOC_TEMP_BACKGROUND_JOB ] used: 0B | peak: 0B | reserved: 1048576B
[ ALLOC_GFX ] used: 40210296B | peak: 0B | reserved: 53040492B
[ ALLOC_CACHEOBJECTS ] used: 46352780B | peak: 0B | reserved: 60817408B
[ ALLOC_TYPETREE ] used: 46512B | peak: 0B | reserved: 4194304B
[ ALLOC_PROFILER ] used: 14802168B | peak: 0B | reserved: 20971520B
[ ALLOC_TEMP_THREAD ] used: 33280B | peak: 0B | reserved: 3244032B
Could not allocate memory: System out of memory!
Trying to allocate: 4194304B with 16 alignment. MemoryLabel: STL
Allocation happend at: Line:78 in C:\buildslave\unity\build\Runtime/Allocator/STLAllocator.h
Memory overview

and also

DynamicHeapAllocator allocation probe 1 failed - Could not get memory for large allocation 4194304.
DynamicHeapAllocator allocation probe 2 failed - Could not get memory for large allocation 4194304.
DynamicHeapAllocator allocation probe 3 failed - Could not get memory for large allocation 4194304.
DynamicHeapAllocator allocation probe 4 failed - Could not get memory for large allocation 4194304.
DynamicHeapAllocator out of memory - Could not get memory for large allocation 4194304!
Could not allocate memory: System out of memory!
Trying to allocate: 4194304B with 16 alignment. MemoryLabel: GfxDevice
Allocation happend at: Line:62 in C:\buildslave\unity\build\Runtime/Containers/WrappingRingbuffer.h
Memory overview

[ ALLOC_DEFAULT ] used: 407483250B | peak: 0B | reserved: 483123006B
[ ALLOC_TEMP_JOB ] used: 439348B | peak: 0B | reserved: 3145728B
[ ALLOC_TEMP_BACKGROUND_JOB ] used: 0B | peak: 0B | reserved: 1048576B
[ ALLOC_GFX ] used: 47468496B | peak: 0B | reserved: 58633012B
[ ALLOC_CACHEOBJECTS ] used: 43312896B | peak: 0B | reserved: 56623104B
[ ALLOC_TYPETREE ] used: 36688B | peak: 0B | reserved: 4194304B
[ ALLOC_PROFILER ] used: 13491340B | peak: 0B | reserved: 16777216B
[ ALLOC_TEMP_THREAD ] used: 32768B | peak: 0B | reserved: 3244032B
Could not allocate memory: System out of memory!
Trying to allocate: 4194304B with 16 alignment. MemoryLabel: GfxDevice
Allocation happend at: Line:62 in C:\buildslave\unity\build\Runtime/Containers/WrappingRingbuffer.h
Memory overview

After we decided to move our standalone player up to 64-bit theses errors went away. Is there a problem with standalone 32-bit in 2017? As we never saw these issues in 5.6.1p1

If these crashes are related to the upgrade as you’re saying, I’m sure Unity Technologies would be interested in a bug-report to look into it.

Could you please submit a bug-report, following the advice given in this document?

Yeah, we have a known bug regarding 32-bit player: when we moved our code to a separate DLL, I forgot to make the new executable LARGEADDRESSAWARE, which means it will get limited by 2 GB address space (rather than 4 GB if we used that flag). The fix is coming in a patch release near you soon. In the mean time, if you really need the fix, you can recompile WindowsPlayer.exe with that flag - we ship source code for it in Editor\Data\PlaybackEngines\WindowsStandaloneSupport\Source.

1 Like

Hi,

is this fix shipped yet? We are having the same problem in 2017.3.1p1

David

… ah no, it’s not fixed :frowning:
But turns out you just need to set a flag in the MZ header. There are even tools for that.
E.g. Large Address Aware | TechPowerUp Forums

It’s fixed in 2018.2 and is in progress of getting backported all the way to 2017.2.

Do you have an ETA on when we can expect a fix for this in 2017.2? We rebuilt the 32-bit player as recommended earlier in the thread but some of our users are reporting that it is being blocked by their anti virus as an uncommon file. We’ve verified that it doesn’t actually contain a virus so suspect the issue is due to it being a custom build rather than the one provided by Unity.

If everything goes according to plan, it should come to a patch release within the next 2 weeks.

1 Like

Note that it is also broken in 2017.3 and 2017.3.1!

Yeah, the fix landed today to 2017.2.2p1 and 2017.3.1p3. It landed a week ago or so to 2018.1.0b9.

Hello, in Unity 2017.2.2p1 this bug is still there. Any ideas to solve it?

Update Unity to a newer version.
https://unity3d.com/unity/qa/lts-releases

Peter77, I had updated to 2017.4.18f but it didn’t help… :frowning:

Probably not the same bug then. I’d suggest either reporting a bug or opening a new thread.

I have also the same problem in unity version under 2017.4.21f1

2018.3.12f1:

DynamicHeapAllocator allocation probe 1 failed - Could not get memory for large allocation 100663296.
DynamicHeapAllocator allocation probe 2 failed - Could not get memory for large allocation 100663296.
DynamicHeapAllocator allocation probe 3 failed - Could not get memory for large allocation 100663296.
DynamicHeapAllocator allocation probe 4 failed - Could not get memory for large allocation 100663296.
DynamicHeapAllocator out of memory - Could not get memory for large allocation 100663296!
Could not allocate memory: System out of memory!
Trying to allocate: 100663296B with 16 alignment. MemoryLabel: BaseObject

Any idea? It doesn’t always happen.

Is your system out of memory? When this happens, in the task manager performance tab under “Memory”, what does “Committed” say?

I realised that the problem was with memory overload when scene switched. Particularly with function SetPixels. It happened when I aplly this function to many texture files. Profiler helped me