Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Fatal error! - Could not allocate memory

Discussion in 'Editor & General Support' started by symphonia117, May 8, 2015.

  1. symphonia117

    symphonia117

    Joined:
    May 8, 2015
    Posts:
    4
    I have uploaded an image of the exact issue.

    We haven't had this issue with Unity before. We are currently running 4.6 as upgrading to 5 causes a pretty large number of bugs and errors to occur.

    When we go to make a windows 64-bit build, as soon as the engine begins constructing the first scene this box pops up. We did test a build using Unity 5 and encountered no such error with the build. The machine that we are using has 16GB of memory, though we understand that Unity 4.6 can't make full use of that.

    Does anyone know of any ways that we can overcome this issue in Unity 4.6? UnityError.PNG
     
  2. symphonia117

    symphonia117

    Joined:
    May 8, 2015
    Posts:
    4
    Help. Plz ;_;
     
  3. symphonia117

    symphonia117

    Joined:
    May 8, 2015
    Posts:
    4
    *dies*
     
    AlterMannn and Prozilla like this.
  4. ForceVFX

    ForceVFX

    Joined:
    Jan 21, 2011
    Posts:
    612
    well you have too many textures ? or one of your textures is so huge , that when it tries to load it..it is maximizing your available RAM.. that is the error flag. Best guess..a 4096 normal map?

    isolate all of the images that are being included in your build in a file explorer window and get the total size of all of those combined, maybe that's why you're hitting the mark (RAM max)..

    I have found the only way to I solve these type of problems is, literally start stripping your project down, piece by piece...build...try again..?.

    P-
     
    Last edited: May 10, 2015
  5. shaderbytes

    shaderbytes

    Joined:
    Nov 11, 2010
    Posts:
    900
    I've written code that has caused an out of memory before haha .. now that is some serious allocation oversight ;)
     
  6. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,171
    Trim assets is the only advice i have. Unity introduced some changes in 4.3+ that leaks memory (or just uses way more of it, and manages it less efficiently). I fought this for a long time, and finally just gave up and ported everything to Unity 5. The 64 bit editor solved the problem by throwing more memory at it. Likely why they felt little need to fix it in the first place.
     
  7. symphonia117

    symphonia117

    Joined:
    May 8, 2015
    Posts:
    4
    Some of our assets are huge. They are actually bigger than Unity natively allows (4k x 4k). This is likely the issue. However I am shocked that there isn't a work around. Everything runs fine within the Unity editor. I can't believe that other games haven't run into this issue.

    If we had known this was a limitation we would have probably broken the textures apart and loaded them like tiles. (the assets in questions are backgrounds for 2D games. We load each room as a scene but we use a single large texture as a background.)

    We tried porting to unity 5 but it broke many features. Is there any way to fix or work around this issue in unity 4.6? We need footage captured of the game soon to meet a deadline. Taking footage from within the editor is laggy. WE an port it to 5, but not in a timely fashion to allow for taking footage.

    Thanks!
     
  8. ForceVFX

    ForceVFX

    Joined:
    Jan 21, 2011
    Posts:
    612
    Amplify Texture 2....reduce em by..90%..
     
    symphonia117 likes this.
  9. Tekkenishere

    Tekkenishere

    Joined:
    Mar 27, 2017
    Posts:
    1
    When i started unity,that message popups.I have this problem too.Please help me.(SORRY FOR BAN ENGLISH)
     
  10. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Same on starting Unity 5.5.0.
     

    Attached Files:

  11. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    487
    Unity is trying to allocate half of Terabyte, if I counted digits correctly. Is it normal?
     
  12. Virland

    Virland

    Joined:
    May 18, 2014
    Posts:
    10
    I have got error like that on 5.4.1f1, it happened because of broken scene file(only if broken scene is active scene), i just copied all objects to new scene and that`s it.
     
  13. lacas8282

    lacas8282

    Joined:
    Apr 25, 2015
    Posts:
    102
  14. Virland

    Virland

    Joined:
    May 18, 2014
    Posts:
    10
  15. JaisyKo

    JaisyKo

    Joined:
    Jan 12, 2019
    Posts:
    2
    I had this problem while trying to build the tutorial project "2d Game Kit" (Unity Learn). In theory, this should be a build "out of the box".

    Deleting the scenes marked "deleted" in the Build Settings helped me (didn`t make a screenshot).