Search Unity

Crashes in Unity 2017.2.1f1 when building 32 bit

Discussion in 'Windows' started by Mediatonic, Feb 2, 2018.

  1. Mediatonic

    Mediatonic

    Joined:
    Dec 7, 2015
    Posts:
    26
    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
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    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?
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    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.
     
    Peter77 likes this.
  4. MadDave666

    MadDave666

    Joined:
    Jul 3, 2017
    Posts:
    4
    Hi,

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

    David
     
  5. MadDave666

    MadDave666

    Joined:
    Jul 3, 2017
    Posts:
    4
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    It's fixed in 2018.2 and is in progress of getting backported all the way to 2017.2.
     
  7. joel-baker

    joel-baker

    Joined:
    Oct 7, 2016
    Posts:
    3
    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.
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    If everything goes according to plan, it should come to a patch release within the next 2 weeks.
     
    joel-baker likes this.
  9. MadDave666

    MadDave666

    Joined:
    Jul 3, 2017
    Posts:
    4
    Note that it is also broken in 2017.3 and 2017.3.1!
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    Yeah, the fix landed today to 2017.2.2p1 and 2017.3.1p3. It landed a week ago or so to 2018.1.0b9.
     
  11. zaktan

    zaktan

    Joined:
    Jul 21, 2017
    Posts:
    3
    Hello, in Unity 2017.2.2p1 this bug is still there. Any ideas to solve it?
     
  12. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
  13. zaktan

    zaktan

    Joined:
    Jul 21, 2017
    Posts:
    3
  14. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    Probably not the same bug then. I'd suggest either reporting a bug or opening a new thread.
     
  15. gundelsw

    gundelsw

    Joined:
    Nov 22, 2014
    Posts:
    2
    I have also the same problem in unity version under 2017.4.21f1
     
  16. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,717
    2018.3.12f1:

    Code (CSharp):
    1.  
    2. DynamicHeapAllocator allocation probe 1 failed - Could not get memory for large allocation 100663296.
    3. DynamicHeapAllocator allocation probe 2 failed - Could not get memory for large allocation 100663296.
    4. DynamicHeapAllocator allocation probe 3 failed - Could not get memory for large allocation 100663296.
    5. DynamicHeapAllocator allocation probe 4 failed - Could not get memory for large allocation 100663296.
    6. DynamicHeapAllocator out of memory - Could not get memory for large allocation 100663296!
    7. Could not allocate memory: System out of memory!
    8. Trying to allocate: 100663296B with 16 alignment. MemoryLabel: BaseObject
    9.  
    Any idea? It doesn't always happen.
     
  17. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    Is your system out of memory? When this happens, in the task manager performance tab under "Memory", what does "Committed" say?
     
  18. zaktan

    zaktan

    Joined:
    Jul 21, 2017
    Posts:
    3
    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