Search Issue Tracker

Duplicate

Votes

8

Found in [Package]

1.0.10 (Patch 1)

Issue ID

ECSB-424

Regression

No

Editor crashes on `anonymous namespace'::ScheduleManagedJobParallelFor_Internal during Play Mode due to a memory leak

Package: Entity Component System (ECS)

-

How to reproduce:
1. Open “entities_repro.zip“
2. Open “SampleScene“
3. Enter Play Mode and wait for 5 minutes

Expected result: Editor runs in Play Mode
Actual result: Editor crashes on `anonymous namespace'::ScheduleManagedJobParallelFor_Internal

Reproducible with: 1.0.8 (2022.3.1f1), 1.0.10(2022.3.1f1)

Reproducible on: Windows 10

First few lines of the Stack Trace:
0x00007ff71fcf3b47 (Unity) `anonymous namespace'::ScheduleManagedJobParallelFor_Internal
0x00007ff71fcf2c58 (Unity) ScheduleManagedJobParallelFor
0x00007ff71f1b512e (Unity) JobsUtility_CUSTOM_ScheduleParallelFor_Injected
0x000001e688e30bc3 (Mono JIT Code) (wrapper managed-to-native) Unity.Jobs.LowLevel.Unsafe.JobsUtility:ScheduleParallelFor_Injected (Unity.Jobs.LowLevel.Unsafe.JobsUtility/JobScheduleParameters&,int,int,Unity.Jobs.JobHandle&)
0x000001e688e30aab (Mono JIT Code) Unity.Jobs.LowLevel.Unsafe.JobsUtility:ScheduleParallelFor (Unity.Jobs.LowLevel.Unsafe.JobsUtility/JobScheduleParameters&,int,int)
0x000001e6b3ff76cb (Mono JIT Code) Unity.Entities.JobChunkExtensions:ScheduleInternal<Unity.Rendering.UpdateOldEntitiesGraphicsChunksJob> (Unity.Rendering.UpdateOldEntitiesGraphicsChunksJob&,Unity.Entities.EntityQuery,Unity.Jobs.JobHandle,Unity.Jobs.LowLevel.Unsafe.ScheduleMode,Unity.Collections.NativeArray`1<int>) (at ./Library/PackageCache/com.unity.entities@1.0.10/Unity.Entities/IJobChunk.cs:330)

  1. Resolution Note:

    null
    Duplicate of another internal issue: UUM-36808: AtomicSafetyNode fallback allocator is destroying nodes when they are released preventing safety checks from working accurately

Comments (10)

  1. kevinmv

    Jul 25, 2023 14:13

    > Hi, I think there has been a miscommunication. I have not seen this crash in player builds, but in playmode while testing in the editor. As of 2022.3.5f1 I have not seen this crash at all.

    Ah yes my mistake I misread your comment, thanks. I've checked internally and the fix for this issue did indeed land in 2022.3.5f1, thank you for confirming it's working well for you.

    If you encounter the issue again, let me know and I'll take a look.
    All the best,
    Kev

  2. desertGhost_

    Jul 24, 2023 15:34

    Hi, I think there has been a miscommunication. I have not seen this crash in player builds, but in playmode while testing in the editor. As of 2022.3.5f1 I have not seen this crash at all.

  3. kevinmv

    Jul 24, 2023 13:07

    desertGhost_ can you provide the callstack of the crash you see in player builds rarely?

    The underlying issue for the crash initially reported is due to bug in the allocation strategy of the the Job Debugger, however the Job Debugger is completely disabled in player builds, so I suspect the issue you are seeing in player builds is a different issue which should have a different ticket (and if possible a test project to investigate).

  4. desertGhost_

    Jul 10, 2023 20:26

    Yes it still occurs as of 2022.3.4f1, but it is much more rare now. It has only happened a few times and only after being in play mode for a while.

  5. lgarczyn

    Jul 10, 2023 13:20

    Nevermind, I wasn't on the right version. Testing again in latest LTS

  6. lgarczyn

    Jul 10, 2023 10:31

    It definitely still happens, and on the latest version of collections and entities. I just uploaded another bug report for the same issue

  7. unity_A2E33269D7F7DA23B660

    Jul 05, 2023 06:29

    Hello, does the issue persist when using the latest 2022.3 LTS?

  8. lgarczyn

    Jul 03, 2023 21:36

    I've deleted the entities and entities graphics packages, as well as every system and ECS script in my project, the crash still happens every hour or so.

  9. desertGhost_

    Jun 13, 2023 15:49

    I have also been able to reproduce this bug in a project that does not have entities by scheduling a large number of IJobParallelForDefer jobs from a monobehavior in 2022.3.1f1.

  10. FaithlessOne

    Jun 13, 2023 10:39

    Note: While the bug does not occur in Unity 2022.2.19 using ECS 1.0.10, it is happening with 2022.2.20 and later versions of Unity in my project.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.