Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Bug NetDebug tool breaks on enableable component

Discussion in 'NetCode for ECS' started by ts_headfirst, Dec 4, 2023.

  1. ts_headfirst

    ts_headfirst

    Joined:
    Aug 1, 2023
    Posts:
    107
    Hi,

    After having added a simple enableable component to an entity, the following exception is thrown repeatedly when the Netdbg tool is opened.

    Code (CSharp):
    1. ArgumentException: ArchetypeChunk.GetDynamicComponentDataArrayReinterpret<Balrog.GameEntities.Inactive> cannot be called on zero-sized IComponentData
    2. Unity.Entities.ArchetypeChunk.CheckZeroSizedGetDynamicComponentDataArrayReinterpret[T] (Unity.Entities.DynamicComponentTypeHandle& typeHandle) (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/Iterators/ArchetypeChunkArray.cs:1684)
    3. Unity.Entities.ArchetypeChunk.GetDynamicComponentDataArrayReinterpret[T] (Unity.Entities.DynamicComponentTypeHandle& typeHandle, System.Int32 expectedTypeSize) (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/Iterators/ArchetypeChunkArray.cs:1723)
    4. Unity.NetCode.GhostPredictionDebugSystem+PredictionDebugJob.Execute (Unity.Entities.ArchetypeChunk& chunk, System.Int32 unfilteredChunkIndex, System.Boolean useEnabledMask, Unity.Burst.Intrinsics.v128& chunkEnabledMask) (at ./Library/PackageCache/com.unity.netcode@1.0.17/Runtime/Snapshot/GhostPredictionDebugSystem.cs:243)
    5. Unity.NetCode.GhostPredictionDebugSystem+PredictionDebugJob.Unity.Entities.IJobChunk.Execute (Unity.Entities.ArchetypeChunk& chunk, System.Int32 unfilteredChunkIndex, System.Boolean useEnabledMask, Unity.Burst.Intrinsics.v128& chunkEnabledMask) <0x1c2ebf3eba0 + 0x00072> in <b6b23b1296fd450d83bbd8b7dc01f8eb>:0
    6. Unity.Entities.JobChunkExtensions+JobChunkProducer`1[T].ExecuteInternal (Unity.Entities.JobChunkExtensions+JobChunkWrapper`1[T]& jobWrapper, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/IJobChunk.cs:416)
    7. Unity.Entities.JobChunkExtensions+JobChunkProducer`1[T].Execute (Unity.Entities.JobChunkExtensions+JobChunkWrapper`1[T]& jobWrapper, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at ./Library/PackageCache/com.unity.entities@1.0.16/Unity.Entities/IJobChunk.cs:363)
    8.  
    9.  
    The component in question is this one.

    Code (CSharp):
    1.     [GhostEnabledBit]
    2.     public struct Inactive : IComponentData, IEnableableComponent
    3.     {
    4.     }
    I have no idea why this system attempts to reinterpret this or to what. Hopefully someone will have an idea?
     
  2. NikiWalker

    NikiWalker

    Unity Technologies

    Joined:
    May 18, 2021
    Posts:
    345