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

Understanding invalid memory pointer ThreadsafeLinearAllocator error messages?

Discussion in 'Editor & General Support' started by CarterG81, Dec 24, 2016.

  1. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    During Play Mode, I am getting three error messages, followed by one warning.

    Error1
    Code (csharp):
    1. Assertion failed on expression: '!params || ((params->vertexCount * params->stride) + params->vertexOffset) <= (chunk->writtenVertices * chunk->stride)'
    Error2
    Code (csharp):
    1. Assertion failed on expression: '!chunk->indexed || !params || params->indexCount <= chunk->writtenIndices'
    Error3
    Code (csharp):
    1. Invalid memory pointer was detected in ThreadsafeLinearAllocator::Deallocate!
    Warning

    Code (csharp):
    1. Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak

    There is no additional information, so I am a bit lost as to where these are coming from, and why? Could this just be the Unity Editor Scene tab? Unity 5.5?

    Seems to appear randomly during Play. I am currently unaware if this actually causes any visible problems in the game.
     
  2. errorsevendev

    errorsevendev

    Joined:
    Sep 29, 2016
    Posts:
    8
    I have the same issue.
    Did you happen to come across a solution Carter?
     
  3. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I believe it was an error with the editor, that's all. Nothing that will effect the build, and actually nothing that even effected the game (from what I could tell).

    I am unable to confirm this though, but I haven't had any problem since, and it 'seemed to go away' when I hid the Scene tab for those brief moments I kept repeatedly getting this error. Like I said though, I can't confirm this.

    I haven't seen the error since the time of the OP. After quiting & turning off my computer, probably changing scenes & just moving onward, the error stopped appearing. Since then, I've also had a fresh install of Windows 10 & thus reinstalled Unity 5.5, from an unrelated issue. If the problem returns, I will post.
     
  4. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    I can confirm this issue doesn't just happen in the editor. This is in a crash report of a player of my game:

    Code (CSharp):
    1. Invalid memory pointer was detected in ThreadsafeLinearAllocator::Deallocate!
    2. (Filename:  Line: 223)
    3.  
    4. Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    5. (Filename:  Line: 370)
     
  5. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,239
    Can anyone submit a bug with a minimal repro?

    That error can potentially happen when using dynamic geometry, such as particles, lines, trails, sprites etc. but I'm not sure that it's something we already have a bug report for, so it would be great if someone could provide one.

    Replying with the case number afterwards too is very helpful :)
     
  6. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
  7. zzajac

    zzajac

    Joined:
    Feb 20, 2015
    Posts:
    22
    Today I had the same log just before crash:

    Invalid memory pointer was detected in ThreadsafeLinearAllocator::Deallocate!

    (Filename: Line: 223)

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

    (Filename: Line: 370)

    I will submit it tommorow.

    Since 5.5.0 my game crashes a lot on Standalone/PC (tested on 5.5.0f3 p1,p2,p3,p4 on 32 and 64 bit version)
    My game uses Daikon Forge so it often creates dynamic meshes to render UI.
     
  8. achtzwan

    achtzwan

    Joined:
    Jul 7, 2012
    Posts:
    9
  9. zzajac

    zzajac

    Joined:
    Feb 20, 2015
    Posts:
    22
  10. forcepusher

    forcepusher

    Joined:
    Jun 25, 2012
    Posts:
    227
    Getting this error when running unity application on a single core server, but if I run it on a dual core server - the error just magically disappears.
     
  11. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    436
    Anything new on this ?
     
  12. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    Unity QA reported back to me that this should be solved in Unity 5.6.
     
  13. Vapid-Linus

    Vapid-Linus

    Joined:
    Aug 6, 2013
    Posts:
    64
    Still having this in 5.6.0b3 when all I have added to the project is Valve's SteamVR plugin
     
  14. rempelj

    rempelj

    Joined:
    Aug 3, 2013
    Posts:
    54
    Can any Unity devs suggest a workaround for this issue in the meantime, or some hints as to what is causing this?
     
  15. HawkWang

    HawkWang

    Joined:
    Oct 19, 2015
    Posts:
    5
    I have this log when I use dynamic mesh too, I have to create a kingdom borderline mesh for my tile based map.
     
  16. Mariusj

    Mariusj

    Unity Technologies

    Joined:
    Oct 27, 2016
    Posts:
    8
    Can anyone else report this problem as a bug? Make sure to include project and reproduction steps.

    After doing that, please post bug number here, so we can find it faster.
     
  17. Vallar

    Vallar

    Joined:
    Oct 18, 2012
    Posts:
    177
    I have come across the same error a few times now but it doesn't seem to associate with a specific action. All I can deduce that this happened after something went wrong with Collaborate and it didn't want to download one of the scripts after my partner and I were working on it. He updated and pushed, and I updated the script then asked to pull. It gave me a warning and I chose the server's version but it never downloaded it and had to delete the project and download it from the cloud.

    My other guess is that it has to do with for loops. I was adding something in an array in a nested for loop when it happened.

    As per your request here is bug number: 887574
     
  18. stuckwiththisname

    stuckwiththisname

    Joined:
    Nov 19, 2013
    Posts:
    9
    I'm on Unity 5.5.0f3 and I get this string reported as a warning message every time I start my game. I'll get it a few dozen times if I play for a few minutes. It's not a minimal reproduction, but do you need another example?

    Edit: this string - Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
     
    Last edited: Mar 10, 2017
  19. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
    Unity QA got back to me saying this issue is fixed in 5.6.0b10 and on.
     
  20. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    541
    Will this be getting into 5.5.x cycle? We also have the issue (5.5.1p4), but aren't on 5.6.0 yet.
     
    Last edited: Mar 13, 2017
  21. ocaptain

    ocaptain

    Joined:
    Nov 22, 2016
    Posts:
    2
    I have the same issue, when i run unity inside another wpf app using HwndHost class (unity is used purely for visualisation in a larger app). When i create procedural meshes i get warnings in log "Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak". Yet exactly the same code doesn't produce any warnings in editor, or usual standalone build.
    Unity 5.5.2f1
     
  22. AbyssWanderer

    AbyssWanderer

    Joined:
    Mar 15, 2016
    Posts:
    77
    Hi.

    JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    - I'm getting this error all the time when baking the light with Progressive Lightmapper. Unity 5.6.0b11
     
  23. Gizmoi

    Gizmoi

    Joined:
    Jan 9, 2013
    Posts:
    327
    I'm also getting the error
    Code (csharp):
    1. JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    When using a Compute Shader and I have the Scene View visible, but not the Game View.
    The warning disappears if I pop out the Game View to a separate window.
     
  24. BTables

    BTables

    Joined:
    Jan 18, 2014
    Posts:
    61
    We're getting these too, but only in play mode. My best guess is that it has something to do with pathfinding queries. Will spend a bit more time trying to narrow it down.
     
  25. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Havent tried to narrow it down yet, but just wanted to give some info:
    Happens to me only in WebGL (on my server and local). Does not happen on Standalone, Android, WebPlayer or Editor...
    Started after upgrading from 5.1.0 to 5.6.0.
    No crash, just the warning, everything continues to work fine.
    http://www.freebord-game.com/MultiPlatformRuntimeLevelEditor/WebGL/
     
  26. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Happens for us and is caused by using Terrain trees.
     
    Claytonious likes this.
  27. Finjitzu

    Finjitzu

    Joined:
    Sep 8, 2011
    Posts:
    160
    Yup same thing here.
     
  28. budukratok

    budukratok

    Joined:
    Jan 3, 2011
    Posts:
    30
    5.6.1p1, build output_log.txt

    Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    0x00007FF6C3E520A4 (UnityConsole)
    0x00007FF6C3E53CAF (UnityConsole)
    0x00007FF6C3D1EE7D (UnityConsole)
    0x00007FF6C397F446 (UnityConsole)
    0x00007FF6C397F89C (UnityConsole)
    0x00007FF6C35B5DE3 (UnityConsole)
    0x00007FF6C3CF6C80 (UnityConsole)
    0x00007FF6C39A33C7 (UnityConsole)
    0x00007FF6C353B52B (UnityConsole)
    0x00007FF6C353B71A (UnityConsole)
    0x00007FF6C354F3F9 (UnityConsole)
    0x00007FF6C3EED48C (UnityConsole)
    0x00007FFEBF442774 (KERNEL32) BaseThreadInitThunk
    0x00007FFEBF970D61 (ntdll) RtlUserThreadStart

    (Filename: Line: 371)
     
  29. Portalarium

    Portalarium

    Joined:
    Nov 24, 2014
    Posts:
    8
    Just chiming in to increase the signal. We also see this quite a bit on 5.6.1p1. Not fatal but very concerning and definitely still happening.
    "JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak"
     
  30. BTables

    BTables

    Joined:
    Jan 18, 2014
    Posts:
    61
    Getting this also constantly only in standalone builds in versions 5.6.0 and 5.6.1
     
  31. kastus

    kastus

    Joined:
    Apr 28, 2017
    Posts:
    2
    Getting this too. Standalone builds, versions 5.6.0, 5.6.1p1, 5.6.1p2. Nothing like that in 5.5, observing it only in 5.6 builds.
     
  32. taamerlane

    taamerlane

    Joined:
    Jun 14, 2013
    Posts:
    1
    Seeing Internal: JobTempAlloc warning as well. Standalone build using 5.6.1f1.
     
  33. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
  34. kastus

    kastus

    Joined:
    Apr 28, 2017
    Posts:
    2
    5.6.2p1 problem still occurs. This is not allowing us to switch to unity 5.6 at all. What are other ways to bring Unity's attention to this besides voting in issuetracker?
     
  35. yoyobbi

    yoyobbi

    Joined:
    Nov 26, 2013
    Posts:
    16
    Just to add another voice, we are also seeing this error in 5.6.1p2. We are not using trees or terrain.
     
  36. Jodwig

    Jodwig

    Joined:
    Feb 23, 2014
    Posts:
    4
    "Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak"

    "Assertion failed: Failed to deallocate temporary mesh data"

    Getting this warning and error in Unity 2017.1.0f3.
     
  37. ifurkend

    ifurkend

    Joined:
    Sep 4, 2012
    Posts:
    350
    Just saying giving particle system simulation speed (main module) zero value will trigger the JobTempAlloc warnings. It's not a big issue as I've settled down with ParticleSystem.Stop() or Pause() for similar purpose.
     
    ConcanoPayno and DeaD4MaN like this.
  38. Orbitallion

    Orbitallion

    Joined:
    Feb 4, 2018
    Posts:
    2
    I have found the solution. The error messages only appear when something is setting the mesh data constantly. a one shot function like start() should do this. A bit late for this thread i suppose.;)
     
  39. JbStudio425

    JbStudio425

    Joined:
    Nov 2, 2017
    Posts:
    5
    What do you mean by "setting the mesh data constantly" ? can you explain a bit more .. ?
     
  40. daisySa

    daisySa

    Joined:
    Dec 29, 2011
    Posts:
    341
    Still present in 2017.4.0f1.
     
  41. plmx

    plmx

    Joined:
    Sep 10, 2015
    Posts:
    308
    I am getting the the error mentioned above in 2017.3.1.f3:

    Code (CSharp):
    1. Assertion failed: Failed to deallocate temporary mesh data
    I was only able to find one result for this error message on Google, namely this thread. I have actually no clue what is causing this, and I would really appreciate the error message to include some more details - where did it happen? With which mesh? By which object?
     
    ProtoTerminator and Beatshapers like this.
  42. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,511
    I have the same errors.
    Assertion failed: Failed to deallocate temporary mesh data

    And
    Internal: JobTempAlloc has allocations that are more than 4 frames old

    :(
     
  43. lilybeast

    lilybeast

    Joined:
    Dec 28, 2018
    Posts:
    1
    I have the same porblem. The exe crash.
    Invalid memory pointer was detected in ThreadsafeLinearAllocator::Deallocate!

    (Filename: Line: 224)

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

    (Filename: Line: 371)

    d3d11: failed to create buffer (target 0x2 mode 2 size 0) [0x80070057]
    Crash!!!

    I have not found the solution.
     
  44. EssencyStudios

    EssencyStudios

    Joined:
    May 18, 2018
    Posts:
    10