Search Unity

"Allocation of 32 bytes at 0000027D70016A00" error on Unity Editor

Discussion in 'Scripting' started by Bagazi, Feb 20, 2020.

Thread Status:
Not open for further replies.
  1. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    611
    Recently a "Allocation " always happened on my Unity editor. Is that code problem or some other reason?




    Unity Editor : 2019.3.06f
     
    MilenaRocha likes this.
  2. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    What is the entire text of the error? When does this happen? Does it occur when you run the project, when you do a specific thing, or just randomly?

    Need more information.
     
    Joe-Censored likes this.
  3. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    611
    A lot of same warning log "Allocation of 32 bytes at 0000029380026E90",end with a error "TLS Allocator ALLOC_TEMP_THREAD, underlying allocator ALLOC_TEMP_THREAD has unfreed allocations, size 512".

    upload_2020-2-22_22-32-38.png


    It is on Unity Editor without playing..
     
    MilenaRocha likes this.
  4. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    611
    For me ,I could not any further apparently helpful information..:confused:
     
  5. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    KarolFrame likes this.
  6. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    611
    I was built on Windows.. Restart is helpful but temporarily.It will show up again just for a monent
     
    HuldaGnodima likes this.
  7. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    611
    I used some third-party plugin ,is those would be involved?
     
  8. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    Could be... no idea, depends on the plugin.
     
    Bagazi likes this.
  9. nilsdr

    nilsdr

    Joined:
    Oct 24, 2017
    Posts:
    374
    Seen this happen on Windows
     
  10. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Just saw this on Unity 2019.4.7 in a project where I previously hadn't seen it. Restarted, message / warnings / errors were gone. Played, all looked good. Played again, Unity crashed. Started Unity again, played a few times. No crash.

    Not very predictable. And the messages don't give me any useful hint on how I could debug this issue when it does occur. It does say re-compiling with a symbol enabled - but that's in a header-file that I don't think we can compile without Unity source code.

    I had seen this occasionally in earlier versions of Unity, with a much larger project (that does not use ECS/DOTS/Jobs - at least not from my own code).
     
  11. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    In my case, this apparently happens after doing builds.
     
    COLORVERSE and Kokowolo like this.
  12. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    Same thing for me on 2020.1. Happened after doing a windows build.
     
  13. jvoliveiraresende

    jvoliveiraresende

    Joined:
    Nov 6, 2020
    Posts:
    1
    well things are getting worse than, it happened to me but in my case was after i starting adding LoadScene( ); in my project
     
    harshitsethia100 likes this.
  14. Don_Doh

    Don_Doh

    Joined:
    Sep 6, 2020
    Posts:
    2
    It have just happened for me also, Unity 2020.1.7f1
    After I "Build and Run" very simple android app
    (I have also a LoadScene() in my little project), I don't know, if it is this, there is an bug with or not..
     
  15. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    same thing happen at 2020.2.2f1
     
  16. mrbs_vf

    mrbs_vf

    Joined:
    Mar 16, 2019
    Posts:
    4
    same thing at 2017.3.0p1 on windows, my game is built for android platform.
     
  17. flipwon

    flipwon

    Joined:
    Dec 29, 2016
    Posts:
    179
    Still happening after building for android
     
  18. HatrickOreally

    HatrickOreally

    Joined:
    Sep 26, 2014
    Posts:
    1
    Last edited: Feb 26, 2021
  19. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Yes, this did solve the issue for me in the past. I occasionally clean up my Library folder, keeping only the files I need for configuration and deleting everything else so that Unity recreates it. Depending on the number of shaders that you use, this may significantly increase the build time on the next build which will re-create the shader cache. But it may also significantly reduce the storage space that your project needs (if you've gone through a number of Unity versions with the project).
     
    AlanMattano likes this.
  20. devlotech

    devlotech

    Joined:
    Aug 11, 2019
    Posts:
    2
    Just hear to chime in that Im getting this issue this week 2020.3.8 LTS. I reported it on the bug tracker as well.

    The string thing is I've been using Unity for the past few months and it didn't start happening until this week. Ive been learning to do unit testing and it only happens when I run the test suite. As if encouraging devs to test wasn't hard enough, we have to fight bugs along the way :D
     
  21. Tymianek

    Tymianek

    Joined:
    May 16, 2015
    Posts:
    97
    Happens in the editor on each editor frame. Without building or anything just opening the scene. 2020.3.11f1 upload_2021-6-17_14-41-34.png
     
    Last edited: Jun 24, 2021
    HuldaGnodima, MilenaRocha and f3rras like this.
  22. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Happens to me using Unity 2021.1



    Untitled-1.png


    I was working around Android.

    I reimport Assets and looks gone
     
    Last edited: Jun 26, 2021
    HuldaGnodima and MilenaRocha like this.
  23. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    781
    it still happening on 2020.2.2f it always happen and it make a Unity freeze and error sometime
     
  24. MilenaRocha

    MilenaRocha

    Joined:
    Jun 30, 2018
    Posts:
    12
    Same happens to me when doing a linux server build, Unity 2020.3.1f1
     
    bbxlegend and AlanMattano like this.
  25. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    I have exactly this on 2021.1.27f1. Have reimported multiple times but it only helps temporarily. VERY irritating.
     
    AlanMattano likes this.
  26. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    This is still happening in 2021.2.4f1 - is anyone from Unity reading this ?
     
    jake1025 likes this.
  27. Foxbyter

    Foxbyter

    Joined:
    Sep 28, 2019
    Posts:
    3
    Still irritating in 2020.3.21f1
     
    AlanMattano likes this.
  28. Mayamamaicez

    Mayamamaicez

    Joined:
    Jul 27, 2018
    Posts:
    2
    This is still happening in 2021.1.15f1
     
  29. bearcoree

    bearcoree

    Joined:
    Mar 8, 2016
    Posts:
    72
    Very similar / same issue in Unity 2021.2.5f1
     
  30. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,497
    Lots of "me too", "this is still happening" etc here but a distinct lack of bug reports I suspect. Whilst this is not related to my area, I don't like seeing things like this so I wanted to highlight that this is such a generic error (temp allocator) so is very likely caused by many, many different things so assuming "one thing will be be fixed" is a pretty bad assumption.

    Please submit a bug report! If most of these have the same root cause then that team will surely have a lot of bug reports to deal with and it will get looked at. If there are existing bug reports you've submitted then please post them here so other Unity devs can take a quick look to see what the progress/hold-up might be.

    But please, no more "me too" but instead more "I've submitted a bug report". At least that way the appropriate team or teams will know about the issue, assuming they don't already.
     
  31. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    I've submitted a bug report - 1384157 - the problem is that this is literally ALL the info the editor gives you. Just having more info would be a useful change.
     
  32. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,497
    Unfortunately that bug report has no reproduction case (attached project when it happens) or any extra information at all so it's unlikely anyone will be able to figure it out from the bug title or the comment of "It happens sometimes, but not always". It doesn't state if it's on a specific project (not attached) or if it's happening on empty projects etc. Maybe it's a specific set of packages or something.

    For anyone to figure it out they need to be able to reproduce it. I can understand it's hard to reproduce (maybe) but it's almost impossible for QA without extra information.

    Maybe QA know about this issue though so, total guess, maybe it will help but I suspect it's because there's no reproduction cases that it's not been fixed.
     
  33. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,497
    I did take a look today in our internal database and I now see there's a lot of similar looking reports, mostly still in triage however some seem to be assigned to various different teams. It could well be and actually likely that these are memory leaks from external packages and there isn't a single root cause as I said previously.

    The allocation sizes vary a lot which also suggest different sources. Some are graphics, some input, some editor.

    Some I found:
    https://issuetracker.unity3d.com/issues/tls-allocator-alloc-temp-tls-errors-when-rendering-shaders
    https://issuetracker.unity3d.com/is...n-when-dragging-gameobject-from-editor-window
     
  34. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    Can I recommend that more debug information is added to this error message? That would help more than trying to reproduce it on a project where even when I'm developing, I can go for days without this issue appearing.
     
  35. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,497
    Not to me no; I am being the messenger here as I've said but it's unclear whether there is actually any more information available to report such as the allocation source.

    If this is coming from a package that's using the Job system then it might be possible to catch it using the "Jobs" menu in Unity, specifically the the "Leak Detection" part. If you don't have that showing then it's obviously not related to that in your case.

    It'd be just as helpful providing a project that you know it happens on then QA have hardware, Unity version and a known project which includes all relevant packages. Nobody said create a project that reproduces it instantly or quickly.

    But feel free to provide no project and hope that QA can figure it out from a description only. I am not here to criticise you but instead recommend something that would result in a better outcome.
     
  36. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    I'm not the only person having this issue. And like I said: It comes and goes. As soon as I find a way to reproduce it somewhat reliably, I'll submit a project. At the moment, all I can say is that it appears to happen mostly, maybe exlusively, in some relation ot (Unity, standard) terrain. I know it's damn little to go on. That's why I asked if it were possible to give a more helpful error message. I know from my own games that when the error I see in the Unity dashboard or the player log is essentially "null reference exception", that's near impossible to track down. Good error and exception messages is the #1 take-away I took from my current project, where the simple change of making sure every assert has a unique message made my life 100 times easier.
     
  37. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,497
    Again, the assumption that it's caused by the same thing. This is often why bugs are not reported, they assume it's the same causes as if every error always comes from one source.

    Basically the opposite of what I said above. You don't need to reproduce it reliably but your project and the Unity version that is associated with it and the hardware it's running on at least give QA a chance of reproducing it.

    Not all errors can report WHAT is the source of the error. The memory allocators do have an associated object with them but with temp allocations, that often isn't the case.

    If you don't want to submit a project for your reason then that's fine too. I just highlighted above a few times why it might mean nothing can be done with your report.
     
  38. Scyllot

    Scyllot

    Joined:
    Jan 15, 2020
    Posts:
    2
    I have the same issue.
    And the problem came when I started using terrain. As long as I was using cube or plane, it was fine. If I modify the terrain, the error comes sooner. If I turn off the terrain [enable = false], the error doesn't seem to appear.
    Unity 2021.2.6f1, Ubuntu 21.04, i3wm,.

    EDIT: similar message directly in the error log -> TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 13328
     
    Last edited: Dec 13, 2021
  39. joacoremis

    joacoremis

    Joined:
    May 7, 2019
    Posts:
    5
    Same issue, Unity 2021.2.4f1, Happened at the exact time I added a new layer on the terrain, it had 4 previous layers, when I added the new one, it says Allocation of 56 bytes at ... and whenever I do anything on the editor it says Application.UpdateScene for a few seconds
     
  40. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    I guess MelvMay's request was for not...

    Listen guys... I don't necessarily know Unity's internal process (Melvmay would know more).

    But I've worked in enterprise software for 15 years. And I will say this "me too" thread is useless from a QA perspective. It's why I suggested issuing a bug report almost 2 years ago. And I've received the notifications every so often someone "me too"s this thread.

    With the nature of how bug testing works, what has been given in this thread just isn't going to cut it. If it did, it would have been resolved by now. But it's not.

    It's not like QA enjoys having bugs out there. That looks bad for them.

    But if they can't recreate, or have any substantial way to look into things, there's nothing they can do.

    And like Melvmay has stated, the error message you're getting isn't enough info to go on.

    There's talk about better error reporting... but the thing is, that's what the bug report is!

    It contains more than just the error message. I don't necessarily know what is in Unity's bug report... but usually it contains a many things like a dump of the memory, including the call stack, and log files, and more. All of that information is how QA and engineers hunt down these problems.

    The comments about what you were doing just before the crash is also very helpful. And that's why the bug reports usually have a field for user comments. Put that info there.

    But without that... this thread is going to be for not.
     
    Last edited: Dec 14, 2021
    MelvMay likes this.
  41. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,497
    No, as said above, you have the same error message which doesn't mean it's caused by the same root problem.

    Oh my.

    I posted two active bug reports above that show the same error but are completely unrelated things. I guess the above is TLDR.

    Please submit a bug report, including the project that you saw it happen on. Just state how in frequently it happens, 1 hour, 10 hours, 10 weeks etc.

    "You can lead a horse to water, but you can't make it drink". ;)
     
  42. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    Just FWIW: It's not a crash bug. It leads to a dramatic slow-down of the editor, but not to a crash. If I can reproduce this issue in a project that's not 30+ GB I'll send in a bug report. Right now I prefer to not clog up my uplink for half a day.

    Meanwhile, I'll try to give as much useful information about when and under what circumstances it happens, and how often, etc. - because as I said, even on a project where it does happen again and again, I can go for DAYS without this issue showing up.
     
    MelvMay likes this.
  43. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,497
    Anything you can supply will be welcomed by QA. Even if it's just the package manifest which shows the packages used.
     
  44. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,148
    The error joacoremis has, but in Unity 2021.2.5f1 Windows.

    1. Create new project (build-in rendering pipeline).
    2. Add terrain to scene.
    3. Add 5 or 6 layers to the terrain (I used 32x32 textures and made no changes to terrain)
    4. Press play
    5. Stop it.

    Observe error and warning spam starting in console...
    - TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 48160
    - Internal: Stack allocator ALLOC_TEMP_MAIN has unfreed allocations, size 48160

    You have to have Terrain object selected for it to happen.
     
    Last edited: Dec 14, 2021
  45. Syco753

    Syco753

    Joined:
    Feb 11, 2013
    Posts:
    42
    I have the same issue. When the problem appears, I see a massive increase of the script in the profiler.
    The profiler says: PostLateUpdate.MemoryFrameMaintenance = 80ms
    It's getting slow, because it writes in the Console. Maybe that leads closer to a solution.
     
  46. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,497
    I just can't....

    Why would it? Who is going to "action" your post?

    I presume you not only read the thread above where the whole last part of the thread was about asking for bug reports to be submitted but also that you submitted a bug report containing what you just posted?

    Hopefully though, you did and QA can see your reproduction cases.
     
  47. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,148
    @MelvMay Calm down. I'll be submitting the bug, I've submitted plenty over my 10+ years using Unity, once my ISP functions properly again. They had lightning damage on towers so I can not submit without getting an "Unabled to write" error from the Bug Reporter (I suspect it is cause my internet drops every few minutes).

    In meanwhile I left these instructions so that anyone else running into this knows why it happens, assuming they are using Terrain, and how to avoid it until a fix comes along (that is, don't use more than 4 textures on Terrain).
     
    Gravesend and MelvMay like this.
  48. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,497
    So you know, I'm not angry so no need to "calm down".

    It might've been best to state that in your earlier post being as you could see the obvious difficulty just asking for bugs to be submitted rather than the "me too" posts.

    As above, this is a generic error not tied to one thing. Hopefully though, it'll help someone.

    Good stuff, the more the better.
     
  49. bearcoree

    bearcoree

    Joined:
    Mar 8, 2016
    Posts:
    72
    Leslie-Young, you're a hero for finding out about the 4 textures on the terrain!!! That's 100% it.
    I submitted a bugreport: https://fogbugz.unity3d.com/default.asp?1389106_10irvqj2041soud7
    I also found out that this bug does not appear on 2021.2.0f16, so it might have been introduced after the beta was concluded.

    Aside from all this, I'd like to mention that MelvMay's posts appeared passive agressive to me and not helpful in the overall process of this bug hunt. Writing "I just can't...." feels toxic to me and I don't see the benefit to the conversation to it. It's made worse by the fact that it's written by a unity staff.

    Thank you very much to everyone posting and getting me closer to being able to post a bugreport including a project for easy reproduction! ♥
     
  50. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,537
    As someone who has worked as a developer behind the scenes in enterprise software along side QA for 15 years.... I just can't.

    When people are told "if you want to get this resolved, the path to doing so requires information that is submitted via the bug report" and other's going "no"... is also toxic. Hence the aggravation.

    I'm happy you submitted a bug report. But that doesn't mean 2 years of "me too" hadn't occurred.

    If you came into a room full of people shirtless complaining about the cold, you wouldn't say to the guy telling everyone to put on a shirt "god, you're so toxic, I put on a shirt" while other's are still not wearing shirts.

    So yeah... I just can't with this thread anymore after going on 2 years.

    Thankfully a more substantial bug report was submitted. Thank you for that.
     
    Last edited: Dec 16, 2021
    MelvMay likes this.
Thread Status:
Not open for further replies.