Search Issue Tracker

Won't Fix

Votes

0

Found in [Package]

1.0.1 - Entities

1.2.X

7000.0.0a1

Issue ID

ECSB-461

Regression

No

[Forum] InvalidOperationException when cloning a CollisionWorld

Package: Unity Physics

-

I'm upgrading to the 1.0 version and I clone the collision world so I can hand it off to a rather long-running job that uses it for a bunch of things. I'm trying to do this with the following inside a SystemBase system...

https://forum.unity.com/threads/invalidoperationexception-when-cloning-a-collisionworld.1391743/#post-9075745

Code (CSharp):
#
RefRW<PhysicsWorldSingleton> physicsWorldSingleton = SystemAPI.GetSingletonRW<PhysicsWorldSingleton>();

  1.            _clonedWorld = physicsWorldSingleton.ValueRW.PhysicsWorld.CollisionWorld.Clone();

 

Error:
{code:java}
InvalidOperationException: The previously scheduled job BroadphaserepareStaticBodyDataJob writes to the UNKNOWN_OBJECT_TYPE PrepareStaticBodyDataJob.FiltersOut. You must call JobHandle.Complete() on the job BroadphaserepareStaticBodyDataJob, before you can read from the UNKNOWN_OBJECT_TYPE safely.
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckReadAndThrowNoEarlyOut (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) (at <bdd20210bb844b2e88e1149ea99da5ef>:0)
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckReadAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) (at <bdd20210bb844b2e88e1149ea99da5ef>:0)
Unity.Collections.NativeArray`1[T]..ctor (Unity.Collections.NativeArray`1[T] array, Unity.Collections.Allocator allocator) (at <bdd20210bb844b2e88e1149ea99da5ef>:0)
Unity.Physics.Broadphase+Tree.Clone () (at Library/PackageCache/com.unity.physics@1.0.0-pre.15/Unity.Physics/Collision/World/Broadphase.cs:443)
Unity.Physics.Broadphase.Clone () (at Library/PackageCache/com.unity.physics@1.0.0-pre.15/Unity.Physics/Collision/World/Broadphase.cs:58)
Unity.Physics.CollisionWorld.Clone () (at Library/PackageCache/com.unity.physics@1.0.0-pre.15/Unity.Physics/Collision/World/CollisionWorld.cs:118)
StratheonMin.Client.TypeSystem.Plans.ECS.Systems.ConnectionValidatorSystem.LaunchValidationJob () (at Assets/Assemblies/StratheonMin.Client/TypeSystem/Plans/ECS/Systems/ConnectionValidatorSystem.cs:112)
StratheonMin.Client.TypeSystem.Plans.ECS.Systems.ConnectionValidatorSystem.InternalOnUpdate (Unity.Jobs.JobHandle inputDeps) (at Assets/Assemblies/StratheonMin.Client/TypeSystem/Plans/ECS/Systems/ConnectionValidatorSystem.cs:83)
StratheonMin.Client.PlanBuilder.ECS.Systems.ClientConnectionValidatorSystem.InternalOnUpdate (Unity.Jobs.JobHandle inputDeps) (at Assets/Assemblies/StratheonMin.Client/PlanBuilder/ECS/Systems/ClientConnectionValidatorSystem.cs:35)
StratheonMin.Client.TypeSystem.Plans.ECS.Systems.BasePlanSystem.CallInternalOnOpdate () (at Assets/Assemblies/StratheonMin.Client/TypeSystem/Plans/ECS/Systems/BasePlanSystem.cs:33)
StratheonMin.Client.TypeSystem.Plans.ECS.Systems.BasePlanSystem.OnUpdate () (at Assets/Assemblies/StratheonMin.Client/TypeSystem/Plans/ECS/Systems/BasePlanSystem.cs:28)
Unity.Entities.SystemBase.Update () (at Library/PackageCache/com.unity.entities@1.0.0-pre.15/Unity.Entities/SystemBase.cs:428)
Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at Library/PackageCache/com.unity.entities@1.0.0-pre.15/Unity.Entities/ComponentSystemGroup.cs:670)
UnityEngine.Debug:LogException(Exception)
Unity.Debug:LogException(Exception) (at Library/PackageCache/com.unity.entities@1.0.0-pre.15/Unity.Entities/Stubs/Unity/Debug.cs:19)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@1.0.0-pre.15/Unity.Entities/ComponentSystemGroup.cs:675)
Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@1.0.0-pre.15/Unity.Entities/ComponentSystemGroup.cs:628)
Unity.Entities.SystemBase:Update() (at Library/PackageCache/com.unity.entities@1.0.0-pre.15/Unity.Entities/SystemBase.cs:416)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@1.0.0-pre.15/Unity.Entities/ComponentSystemGroup.cs:670)
Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@1.0.0-pre.15/Unity.Entities/ComponentSystemGroup.cs:628)
Unity.Entities.SystemBase:Update() (at Library/PackageCache/com.unity.entities@1.0.0-pre.15/Unity.Entities/SystemBase.cs:416)
Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at Library/PackageCache/com.unity.entities@1.0.0-pre.15/Unity.Entities/ScriptBehaviourUpdateOrder.cs:526) {code}

  1. Resolution Note:

    Leadership requested we don't have any bugs over 1 year old.

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.