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

Bug "JobTempAlloc has allocations that are more than 4 frames old" with Crunch Compression

Discussion in 'General Graphics' started by noam_2000, Jul 29, 2022.

  1. noam_2000

    noam_2000

    Joined:
    Sep 14, 2017
    Posts:
    18
    A project me and my team is working on makes use of many textures, and also switches scenes pretty often (every 5 minutes or so). Crunch compression for textures has worked miracles in halving our game's disk size and making loading times much faster and smoother, which is very important for our game.

    However, when building the project with crunch-compressed textures, we've noticed that every time we switch scenes, the log is spammed with the following error:

    Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak

    Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 5)

    From what we could gather, this warning is more likely to show up (and get repeated more) the higher your framerate is.

    This by itself was already proving an issue, because over long play sessions the log file would become needlessly large. However, some testers started complaining that they can't even load the game anymore, unless they limit their framerate to 60 or below (via config files, to be able to launch into the game at all).

    I've investigated in a repro project and found the following:
    • Happens exclusively in build, not in editor
    • Happens exclusively when loading a scene that contains crunched textures
    • Only happens in high framerates (80-100+)
    • Adjusting the AUP's time slice and buffer size does not help
    • Only happens with a fair amount of crunched textures *in the project* (not necessarily in scene). Testing with only a few textures present in the project does not reproduce this issue.

    The editor version is 2019.3.7f1, and we're using the High Definition Rendering Pipeline (7.1.8). Upgrading/changing versions is not an option for us at this point in time, as we're nearing release.

    Crunch compression is a feature I'd really really not want to revert due to the many benefits it gives us, so I'm thankful for any help in eliminating this issue, or at least some clarity whether we *can* fix this issue.
     
    Last edited: Sep 16, 2022
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,240
    Thanks for the info here. Can you submit it in a bug report, or did you already?
     
  3. noam_2000

    noam_2000

    Joined:
    Sep 14, 2017
    Posts:
    18
    Hey Richard, thanks so much for the reply!

    I just submitted a bug report through the editor. Let me know if you also require the case number - this is my first time submitting a bug report, so I'm unsure whether that information is meant to be private or not.
     
    richardkettlewell likes this.
  4. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,240
    Yeah replying here with the case number is generally a good way for us to connect the dots between the forums and the bug database :)

    It will allow me to go find it and make sure it’s making its way through QA too!

    thanks for the report!
     
  5. noam_2000

    noam_2000

    Joined:
    Sep 14, 2017
    Posts:
    18
    Sure thing! The case number is: IN-11856

    Thanks again for your time!
     
    richardkettlewell likes this.
  6. DreamersINC

    DreamersINC

    Joined:
    Mar 4, 2015
    Posts:
    130
    Any update on this ?
     
  7. noam_2000

    noam_2000

    Joined:
    Sep 14, 2017
    Posts:
    18
    Unsurprisingly, the bug report was closed because the HDRP version is old and no longer supported. As far as I can tell, this is unfixable, and we had to give up on crunch compression.
     
  8. DreamersINC

    DreamersINC

    Joined:
    Mar 4, 2015
    Posts:
    130
    MY issues was "fixed" by turning Vsync on
     
  9. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,396
    Then make a report with the newer version
     
  10. CyRaid

    CyRaid

    Joined:
    Mar 31, 2015
    Posts:
    134
    I'm using URP and I'm getting this when making changes to a Prefab?