Search Unity

Code Gen related InvalidOperationException with latest Packages

Discussion in 'Entity Component System' started by alfiare, May 26, 2020.

  1. alfiare

    alfiare

    Joined:
    Feb 10, 2017
    Posts:
    30
    Today I updated all the packages I'm using and now I'm getting a series of errors claiming to be code gen related, I'm getting these from my systems but also from Unity written systems like ExportPhysicsWorld and CopySkinnedEntityDataToRenderEntity, HybridRendererSystem etc. Anyone have any idea what these mean? Is there something I haven't enabled?

    InvalidOperationException: This should have been initialized by code gen
    Unity.Jobs.IJobBurstScheduableExtensions.Schedule[T] (T jobData, Unity.Jobs.JobHandle dependsOn) (at Library/PackageCache/com.unity.jobs@0.2.10-preview.11/Unity.Jobs/IJobBurstScheduable.cs:46)
    Unity.Entities.ChunkIterationUtility.PreparePrefilteredChunkLists (System.Int32 unfilteredChunkCount, Unity.Entities.UnsafeMatchingArchetypePtrList archetypes, Unity.Entities.EntityQueryFilter filter, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode, Unity.Collections.NativeArray`1[System.Byte]& prefilterDataArray, System.Void*& deferredCountData) (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/Iterators/ChunkIterationUtility.cs:439)
    Unity.Entities.JobChunkExtensions.ScheduleInternal[T] (T& jobData, Unity.Entities.EntityQuery query, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode, System.Boolean isParallel) (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/IJobChunk.cs:169)
    Unity.Entities.JobChunkExtensions.Schedule[T] (T jobData, Unity.Entities.EntityQuery query, Unity.Jobs.JobHandle dependsOn) (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/IJobChunk.cs:94)
    Unity.Physics.Systems.ExportPhysicsWorld.OnUpdate (Unity.Jobs.JobHandle inputDeps) (at Library/PackageCache/com.unity.physics@0.3.2-preview/Unity.Physics/ECS/Systems/ExportPhysicsWorld.cs:36)
    Unity.Entities.JobComponentSystem.Update () (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/JobComponentSystem.cs:141)
    Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ComponentSystemGroup.cs:445)
    UnityEngine.Debug:LogException(Exception)
    Unity.Debug:LogException(Exception) (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/Stubs/Unity/Debug.cs:19)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ComponentSystemGroup.cs:450)
    Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ComponentSystemGroup.cs:398)
    Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ComponentSystem.cs:109)
    Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ScriptBehaviourUpdateOrder.cs:192)

    InvalidOperationException: This should have been initialized by code gen
    Unity.Jobs.IJobBurstScheduableExtensions.Schedule[T] (T jobData, Unity.Jobs.JobHandle dependsOn) (at Library/PackageCache/com.unity.jobs@0.2.10-preview.11/Unity.Jobs/IJobBurstScheduable.cs:46)
    Unity.Entities.ChunkIterationUtility.PreparePrefilteredChunkLists (System.Int32 unfilteredChunkCount, Unity.Entities.UnsafeMatchingArchetypePtrList archetypes, Unity.Entities.EntityQueryFilter filter, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode, Unity.Collections.NativeArray`1[System.Byte]& prefilterDataArray, System.Void*& deferredCountData) (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/Iterators/ChunkIterationUtility.cs:439)
    Unity.Entities.JobForEachExtensions.ScheduleInternal_ECC[T] (T& jobData, Unity.Entities.ComponentSystemBase system, Unity.Entities.EntityQuery query, System.Int32 innerloopBatchCount, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode) (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/IJobForEach.gen.cs:1982)
    Unity.Entities.JobForEachExtensions.Schedule[T] (T jobData, Unity.Entities.ComponentSystemBase system, Unity.Jobs.JobHandle dependsOn) (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/IJobForEach.gen.cs:811)
    Unity.Rendering.CopySkinnedEntityDataToRenderEntity.OnUpdate (Unity.Jobs.JobHandle inputDeps) (at Library/PackageCache/com.unity.rendering.hybrid@0.5.1-preview.18/Unity.Rendering.Hybrid/CopySkinnedEntityDataToRenderEntity.cs:44)
    Unity.Entities.JobComponentSystem.Update () (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/JobComponentSystem.cs:141)
    Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ComponentSystemGroup.cs:445)
    UnityEngine.Debug:LogException(Exception)
    Unity.Debug:LogException(Exception) (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/Stubs/Unity/Debug.cs:19)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ComponentSystemGroup.cs:450)
    Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ComponentSystemGroup.cs:398)
    Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ComponentSystem.cs:109)
    Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ScriptBehaviourUpdateOrder.cs:192)

    InvalidOperationException: Reflection data was not set up by code generation
    Unity.Jobs.IJobParallelForExtensionsBurstScheduable.Schedule[T] (T jobData, System.Int32 arrayLength, System.Int32 innerloopBatchCount, Unity.Jobs.JobHandle dependsOn) (at Library/PackageCache/com.unity.jobs@0.2.10-preview.11/Unity.Jobs/IJobParallelForBurstScheduable.cs:57)
    Unity.Entities.ChunkIterationUtility.CreateArchetypeChunkArrayWithoutSync (Unity.Entities.UnsafeMatchingArchetypePtrList matchingArchetypes, Unity.Collections.Allocator allocator, Unity.Jobs.JobHandle& jobHandle, Unity.Entities.EntityQueryFilter& filter, Unity.Jobs.JobHandle dependsOn) (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/Iterators/ChunkIterationUtility.cs:65)
    Unity.Entities.EntityQueryImpl.CreateArchetypeChunkArray (Unity.Collections.Allocator allocator) (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/Iterators/EntityQuery.cs:453)
    Unity.Entities.EntityQuery.CreateArchetypeChunkArray (Unity.Collections.Allocator allocator) (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/Iterators/EntityQuery.cs:1202)
    Unity.Rendering.HybridRendererSystem.UpdateHybridV2Batches (Unity.Jobs.JobHandle inputDependencies) (at Library/PackageCache/com.unity.rendering.hybrid@0.5.1-preview.18/Unity.Rendering.Hybrid/HybridV2RenderSystem.cs:1380)
    Unity.Rendering.HybridRendererSystem.OnUpdate (Unity.Jobs.JobHandle inputDeps) (at Library/PackageCache/com.unity.rendering.hybrid@0.5.1-preview.18/Unity.Rendering.Hybrid/HybridV2RenderSystem.cs:1414)
    Unity.Entities.JobComponentSystem.Update () (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/JobComponentSystem.cs:141)
    Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ComponentSystemGroup.cs:445)
    UnityEngine.Debug:LogException(Exception)
    Unity.Debug:LogException(Exception) (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/Stubs/Unity/Debug.cs:19)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ComponentSystemGroup.cs:450)
    Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ComponentSystemGroup.cs:398)
    Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ComponentSystem.cs:109)
    Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at Library/PackageCache/com.unity.entities@0.11.0-preview.7/Unity.Entities/ScriptBehaviourUpdateOrder.cs:192)
     
    CPlusSharp22 and volume9 like this.
  2. alfiare

    alfiare

    Joined:
    Feb 10, 2017
    Posts:
    30
    I'm on Unity 2020.1.0b9
    Burst 1.3.0
    Collections 0.9.0-preview.5
    Entities 0.11.0-preview.7
    HybridRenderer 0.5.1-preview.18
    Jobs 0.2.10-preview.11
    Unity Physics 0.3.2-preview
     
  3. joepl

    joepl

    Unity Technologies

    Joined:
    Jul 6, 2017
    Posts:
    87
    Do you have any warnings involving invalid use of Entities.ForEach component types? Looks possible that these may block IL post-processing. If you fix the warning, I'm guessing the codegen error will disappear.

    My apologies, fix is incoming.
     
  4. alfiare

    alfiare

    Joined:
    Feb 10, 2017
    Posts:
    30
    I haven't seen any warnings around Entities.ForEach component types, I am using a few [GenerateAuthoringComponent] attribute components to set prefabs to use in ECS, I thought for a second I might have seen some warning related to those, but I can't seem to make that show up again.
     
  5. joepl

    joepl

    Unity Technologies

    Joined:
    Jul 6, 2017
    Posts:
    87
    Hmm, that sounds like it is unrelated then. There should be fixes in the latest 2020.1/2020.2 builds to fix issues around the missing codegen error.
     
  6. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Same core issue different path to it. 2020.1 B10 latest entities.

    Code (csharp):
    1.  
    2. InvalidOperationException: This should have been initialized by code gen
    3.   at Unity.Jobs.IJobBurstScheduableExtensions.Schedule[T] (T jobData, Unity.Jobs.JobHandle dependsOn) [0x0001d] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.jobs@0.2.10-preview.11\Unity.Jobs\IJobBurstScheduable.cs:42
    4.   at Unity.Entities.ChunkIterationUtility.PreparePrefilteredChunkLists (System.Int32 unfilteredChunkCount, Unity.Entities.UnsafeMatchingArchetypePtrList archetypes, Unity.Entities.EntityQueryFilter filter, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode, Unity.Collections.NativeArray`1[System.Byte]& prefilterDataArray, System.Void*& deferredCountData) [0x000cf] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities\Iterators\ChunkIterationUtility.cs:439
    5.   at Unity.Entities.JobChunkExtensions.ScheduleInternal[T] (T& jobData, Unity.Entities.EntityQuery query, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode, System.Boolean isParallel) [0x00011] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities\IJobChunk.cs:169
    6.   at Unity.Entities.JobChunkExtensions.Schedule[T] (T jobData, Unity.Entities.EntityQuery query, Unity.Jobs.JobHandle dependsOn) [0x00001] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities\IJobChunk.cs:94
    7.   at Unity.Entities.ChunkIterationUtility.CreateEntityArray (Unity.Entities.UnsafeMatchingArchetypePtrList matchingArchetypes, Unity.Collections.Allocator allocator, Unity.Entities.ArchetypeChunkEntityType type, Unity.Entities.EntityQuery entityQuery, Unity.Entities.EntityQueryFilter& filter, Unity.Jobs.JobHandle& jobHandle, Unity.Jobs.JobHandle dependsOn) [0x00031] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities\Iterators\ChunkIterationUtility.cs:156
    8.   at Unity.Entities.EntityQueryImpl.ToEntityArray (Unity.Collections.Allocator allocator, Unity.Entities.EntityQuery outer) [0x00009] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities\Iterators\EntityQuery.cs:477
    9.   at Unity.Entities.EntityQuery.ToEntityArray (Unity.Collections.Allocator allocator) [0x00000] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities\Iterators\EntityQuery.cs:1217
    10.   at Unity.Entities.GameObjectConversionUtility.DeclareReferencedObjects (Unity.Entities.World gameObjectWorld, Unity.Entities.Conversion.GameObjectConversionMappingSystem mappingSystem) [0x000dd] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities.Hybrid\GameObjectConversion\GameObjectConversionUtility.cs:87
    11.   at Unity.Entities.GameObjectConversionUtility.Convert (Unity.Entities.World conversionWorld) [0x00016] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities.Hybrid\GameObjectConversion\GameObjectConversionUtility.cs:141
    12.   at Unity.Entities.GameObjectConversionUtility.ConvertGameObjectHierarchy (UnityEngine.GameObject root, Unity.Entities.GameObjectConversionSettings settings) [0x00048] in C:\Games\aigame\AiClient\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities.Hybrid\GameObjectConversion\GameObjectConversionUtility.cs:233
    13.   at AiGame.Vegetation.VegetationConversionComponent.Awake () [0x0001a] in C:\Games\aigame\AiClient\Assets\AiGame\Packages\Vegetation\VegetationConversionComponent.cs:16
    14.  
     
    volume9 likes this.
  7. volume9

    volume9

    Joined:
    Oct 25, 2016
    Posts:
    4
    Code (CSharp):
    1. _blobAssetStore = new BlobAssetStore();
    2. var settings =
    3.             GameObjectConversionSettings.FromWorld(World.DefaultGameObjectInjectionWorld, _blobAssetStore);
    same exception after this code
     
  8. davrm

    davrm

    Joined:
    Jan 31, 2017
    Posts:
    3
    Code (CSharp):
    1. var settings = GameObjectConversionSettings.FromWorld(World.DefaultGameObjectInjectionWorld, blobAssetStore);
    2. m_PrefabEntityDynamic = GameObjectConversionUtility.ConvertGameObjectHierarchy(PrefabDynamicFeedback, settings);
    same here after this code
     
  9. deplinenoise

    deplinenoise

    Unity Technologies

    Joined:
    Dec 20, 2017
    Posts:
    33
    Hey - can you share repro steps for this?

    Also, does the issue reproduce if you wipe your script assemblies and restart the editor? There has been some flakiness with IL postprocessing in the betas.
     
  10. lukaszunity

    lukaszunity

    Administrator

    Joined:
    Jun 11, 2014
    Posts:
    461
    Please share Editor.log when this happens. It will help tell us whether this is an issue with the IL post processors not running or if it is an issue with the individual IL post processors themselves.
     
  11. alfiare

    alfiare

    Joined:
    Feb 10, 2017
    Posts:
    30
    Today I tried this again (I had backed out the changes because I couldn't continue with nothing working). I can't explain it but now with the entities package updated to 0.11.0-preview.7 it's working without the code gen errors. I had done this twice before and gotten the error so I can't explain what changed...guess I'll call it good luck.
     
  12. volume9

    volume9

    Joined:
    Oct 25, 2016
    Posts:
    4
    unity version? I still got this error in build(
     
  13. alfiare

    alfiare

    Joined:
    Feb 10, 2017
    Posts:
    30
    I'm on Unity 2020.1.0b10, it's odd because when I first updated to b10 I tried it and it failed with the same code gen errors, but for some reason it's working now.
     
  14. volume9

    volume9

    Joined:
    Oct 25, 2016
    Posts:
    4
    @lukaszunity Update uity to 2020.1.0b11 and still got same exception after build

    2020.06.05 11:39:48.839 16559 16600 Error Unity InvalidOperationException: This should have been initialized by code gen
    2020.06.05 11:39:48.839 16559 16600 Error Unity at Unity.Jobs.IJobBurstScheduableExtensions.Schedule[T] (T jobData, Unity.Jobs.JobHandle dependsOn) [0x00019] in <f0d2e2f938e84a3db72698b7c509ca34>:0
    2020.06.05 11:39:48.839 16559 16600 Error Unity at Unity.Entities.ChunkIterationUtility.PreparePrefilteredChunkLists (System.Int32 unfilteredChunkCount, Unity.Entities.UnsafeMatchingArchetypePtrList archetypes, Unity.Entities.EntityQueryFilter filter, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode, Unity.Collections.NativeArray`1[System.Byte]& prefilterDataArray, System.Void*& deferredCountData) [0x000ba] in <cdb9d59f21a048d4b0ee8db9c3efd89c>:0
    2020.06.05 11:39:48.839 16559 16600 Error Unity at Unity.Entities.JobChunkExtensions.ScheduleInternal[T] (T& jobData, Unity.Entities.EntityQuery query, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode, System.Boolean isParallel) [0x00010] in <cdb9d59f21a048d4b0ee8db9c3efd89c>:0
    2020.06.05 11:39:48.839 16559 16600 Error Unity at Unity.Entities.JobChunkExtensions.Schedule[T] (T jobData, Unity.Entities.EntityQuery query, Unit

    same error if built with il2cpp or mono with last entities package. No error after downgrade to previous
     

    Attached Files:

    Last edited: Jun 5, 2020
  15. lukaszunity

    lukaszunity

    Administrator

    Joined:
    Jun 11, 2014
    Posts:
    461
    It looks like the Editor.log you shared does not contain the error message in your post. Did you perhaps share the wrong file?
     
  16. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,267
    So after a few weeks of stabilizing some major features in my game, I started attempting to make builds again. And regardless of what kind of build I try to make (dev or release), I am running into this same issue. I am reproducing this 100% of the time. At first I thought this was a known issue that is being worked on from this thread: https://forum.unity.com/threads/entities-0-11-build-crash.903413/

    I am still on 2019.3.12 and unfortunately I cannot downgrade to a previous version of Entities because breaking changes made to ComponentSystemGroup make it impossible for my project to be compatible with both Entities 0.10.0 and Entities 0.11.0.

    If there is a sequence of steps that I can perform, such as closing the editor, deleting specific temporary files from the project, opening the editor and project, doing some specific things like enter and exit play mode or set up a new build configuration, and then build, I can do that and send whatever files necessary.
     
  17. volume9

    volume9

    Joined:
    Oct 25, 2016
    Posts:
    4
    Error not in build process, in application on mobile phone then it launched
     
  18. DarkDungeonStudio

    DarkDungeonStudio

    Joined:
    Oct 31, 2013
    Posts:
    39
    I'm getting the same issue on 2019.4.0f1 LTS.
    Burst 1.3.1
    Entities 0.11.0

    The game runs fine in the Editor but falls over when I run the build.
    Specifically on these lines:

    Code (CSharp):
    1. blobAssetStore = new BlobAssetStore();
    2. GameObjectConversionSettings settings = GameObjectConversionSettings.FromWorld(World.DefaultGameObjectInjectionWorld, blobAssetStore);
    3. ballEntityPrefab = GameObjectConversionUtility.ConvertGameObjectHierarchy(ballPrefab, settings);
    I'm trying to build your Unity DOTS Pong tutorial.
     
  19. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    I just experienced this last night with 2020.2a13.1691, Entities 0.11.0p7 and Burst 1.3.1, when entering play mode. Code was successfully compiled but errored at the start of play. Occurred when editing classes related to SystemBase & ForEach.
    Restarting the editor several times had no effect, but was resolved by deleting my library. Cant seem to replicate it though.
     
  20. DarkDungeonStudio

    DarkDungeonStudio

    Joined:
    Oct 31, 2013
    Posts:
    39
    I deleted my Library and built the game again.
    Unfortunately I'm still experiencing the issue.

    My build error log:
    Code (CSharp):
    1. InvalidOperationException: This should have been initialized by code gen
    2.   at Unity.Jobs.IJobBurstScheduableExtensions.Schedule[T] (T jobData, Unity.Jobs.JobHandle dependsOn) [0x00043] in rootDirectory\Library\PackageCache\com.unity.jobs@0.2.10-preview.11\Unity.Jobs\IJobBurstScheduable.cs:47
    3.   at Unity.Entities.ChunkIterationUtility.PreparePrefilteredChunkLists (System.Int32 unfilteredChunkCount, Unity.Entities.UnsafeMatchingArchetypePtrList archetypes, Unity.Entities.EntityQueryFilter filter, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode, Unity.Collections.NativeArray`1[System.Byte]& prefilterDataArray, System.Void*& deferredCountData) [0x000cf] in rootDirectory\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities\Iterators\ChunkIterationUtility.cs:439
    4.   at Unity.Entities.JobChunkExtensions.ScheduleInternal[T] (T& jobData, Unity.Entities.EntityQuery query, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode, System.Boolean isParallel) [0x00011] in rootDirectory\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities\IJobChunk.cs:169
    5.   at Unity.Entities.JobChunkExtensions.Schedule[T] (T jobData, Unity.Entities.EntityQuery query, Unity.Jobs.JobHandle dependsOn) [0x00001] in rootDirectory\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities\IJobChunk.cs:94
    6.   at Unity.Entities.ChunkIterationUtility.CreateEntityArray (Unity.Entities.UnsafeMatchingArchetypePtrList matchingArchetypes, Unity.Collections.Allocator allocator, Unity.Entities.ArchetypeChunkEntityType type, Unity.Entities.EntityQuery entityQuery, Unity.Entities.EntityQueryFilter& filter, Unity.Jobs.JobHandle& jobHandle, Unity.Jobs.JobHandle dependsOn) [0x00031] in rootDirectory\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities\Iterators\ChunkIterationUtility.cs:156
    7.   at Unity.Entities.EntityQueryImpl.ToEntityArray (Unity.Collections.Allocator allocator, Unity.Entities.EntityQuery outer) [0x00009] in rootDirectory\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities\Iterators\EntityQuery.cs:477
    8.   at Unity.Entities.EntityQuery.ToEntityArray (Unity.Collections.Allocator allocator) [0x00000] in rootDirectory\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities\Iterators\EntityQuery.cs:1217
    9.   at Unity.Entities.GameObjectConversionUtility.DeclareReferencedObjects (Unity.Entities.World gameObjectWorld, Unity.Entities.Conversion.GameObjectConversionMappingSystem mappingSystem) [0x000dd] in rootDirectory\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities.Hybrid\GameObjectConversion\GameObjectConversionUtility.cs:87
    10.   at Unity.Entities.GameObjectConversionUtility.Convert (Unity.Entities.World conversionWorld) [0x00016] in rootDirectory\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities.Hybrid\GameObjectConversion\GameObjectConversionUtility.cs:141
    11.   at Unity.Entities.GameObjectConversionUtility.ConvertGameObjectHierarchy (UnityEngine.GameObject root, Unity.Entities.GameObjectConversionSettings settings) [0x00048] in rootDirectory\Library\PackageCache\com.unity.entities@0.11.0-preview.7\Unity.Entities.Hybrid\GameObjectConversion\GameObjectConversionUtility.cs:233
    12.   at GameManager.Awake () [0x0007a] in rootDirectory\Assets\Pong\Scripts\GameManager.cs:51
    13. (Filename: rootDirectory/Library/PackageCache/com.unity.jobs@0.2.10-preview.11/Unity.Jobs/IJobBurstScheduable.cs Line: 47)
    14.  
    15. Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    16. (Filename: C:\buildslave\unity\build\Runtime/Allocator/ThreadsafeLinearAllocator.cpp Line: 554)
    Edit 1:
    I logged a bug report with all my project details on Case 1255997

    Edit 2:

    Ok so I got it working now.

    Originally I had everything in the Awake() method, as per the Unity DOTS Pong tutorial.
    Out of interest I changed the Awake() to Start() and now it's working!

    Seems like it's a timing issue might be that the EntityManager doesn't exist yet when the Awake() is running.

    It's my best guess
     
    Last edited: Jun 15, 2020
    volume9 likes this.
  21. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    302
    I just started getting:
    InvalidOperationException: This should have been initialized by code gen

    in all sorts of random DOTs code after updating a microsplat package.

    I deleted the Library folder and it resolved it... lost an hour for this though... Unity feels so fragile to use these days.

    2020.1b5 with latest dots packages.
     
  22. DarkDungeonStudio

    DarkDungeonStudio

    Joined:
    Oct 31, 2013
    Posts:
    39
    @jdtec I hear you, but just keep in mind that the forefront of technology will always have breaking changes and bugs.
    Which is why they have their LTS releases once a year with solid and stable features.

    I had to make the call now to stay on 2019 (LTS) if I actually want to complete my game.

    But I don't stop playing around with 2020+ features and doing a few POCs here and there. :D
     
  23. Interjection

    Interjection

    Joined:
    Jun 18, 2020
    Posts:
    63
    Trying to render using entities and everything works fine in the editor.

    But in the exe nothing renders and the log shows two
    InvalidOperationException: This should have been initialized by code gen
    and a million
    InvalidOperationException: Reflection data was not set up by code generation
    .

    I'm using "Unity 2019.4.2f1 (64-bit)". First I installed the package "Unity Physics" (v0.4.0) and then "Hybrid Renderer" (v0.5.2).

    I've tried deleting the Library folder.
    I've tried making a prefab with the "ConvertToEntity" script in the Resources folder.
    I've tried calling
    Unity.Entities.DefaultWorldInitialization.Initialize("TheWorld", false);
    .

    None of that works. What am I supposed to do?

    I'm doing everything from C#, building all entities manually from scratch. Everything works in the editor so I figure it is some initialization problem or that something important gets stripped from the build.

    Here are examples of the error messages (the log file keeps growing every frame with "Reflection data was not set up by code generation", all looks the same):

    Code (CSharp):
    1. InvalidOperationException: This should have been initialized by code gen
    2.   at Unity.Jobs.IJobBurstScheduableExtensions.Schedule[T] (T jobData, Unity.Jobs.JobHandle dependsOn) [0x00019] in <eea339da6b5e4d4bb255bfef95601890>:0
    3.   at Unity.Entities.ChunkIterationUtility.PreparePrefilteredChunkLists (System.Int32 unfilteredChunkCount, Unity.Entities.UnsafeMatchingArchetypePtrList archetypes, Unity.Entities.EntityQueryFilter filter, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode, Unity.Collections.NativeArray`1[System.Byte]& prefilterDataArray, System.Void*& deferredCountData) [0x000ba] in <5d5a854347494de1a5caa65aeedc545c>:0
    4.   at Unity.Entities.JobForEachExtensions.ScheduleInternal_ECC[T] (T& jobData, Unity.Entities.ComponentSystemBase system, Unity.Entities.EntityQuery query, System.Int32 innerloopBatchCount, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode) [0x0005b] in <5d5a854347494de1a5caa65aeedc545c>:0
    5.   at Unity.Entities.JobForEachExtensions.Schedule[T] (T jobData, Unity.Entities.ComponentSystemBase system, Unity.Jobs.JobHandle dependsOn) [0x000e0] in <5d5a854347494de1a5caa65aeedc545c>:0
    6.   at Unity.Rendering.CopySkinnedEntityDataToRenderEntity.OnUpdate (Unity.Jobs.JobHandle inputDeps) [0x00016] in <eea339da6b5e4d4bb255bfef95601890>:0
    7.   at Unity.Entities.JobComponentSystem.Update () [0x0004e] in <5d5a854347494de1a5caa65aeedc545c>:0
    8.   at Unity.Entities.ComponentSystemGroup.UpdateAllSystems () [0x0006a] in <5d5a854347494de1a5caa65aeedc545c>:0
    9. UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
    10. UnityEngine.DebugLogHandler:LogException(Exception, Object)
    11. UnityEngine.Logger:LogException(Exception, Object)
    12. UnityEngine.Debug:LogException(Exception)
    13. Unity.Debug:LogException(Exception)
    14. Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    15. Unity.Entities.ComponentSystemGroup:OnUpdate()
    16. Unity.Entities.ComponentSystem:Update()
    17. Unity.Entities.DummyDelegateWrapper:TriggerUpdate()
    18. (Filename: <eea339da6b5e4d4bb255bfef95601890> Line: 0)
    19.  
    20. InvalidOperationException: Reflection data was not set up by code generation
    21.   at Unity.Jobs.IJobParallelForExtensionsBurstScheduable.Schedule[T] (T jobData, System.Int32 arrayLength, System.Int32 innerloopBatchCount, Unity.Jobs.JobHandle dependsOn) [0x00019] in <eea339da6b5e4d4bb255bfef95601890>:0
    22.   at Unity.Entities.ChunkIterationUtility.CreateArchetypeChunkArrayWithoutSync (Unity.Entities.UnsafeMatchingArchetypePtrList matchingArchetypes, Unity.Collections.Allocator allocator, Unity.Jobs.JobHandle& jobHandle, Unity.Entities.EntityQueryFilter& filter, Unity.Jobs.JobHandle dependsOn) [0x00115] in <5d5a854347494de1a5caa65aeedc545c>:0
    23.   at Unity.Entities.EntityQueryImpl.CreateArchetypeChunkArray (Unity.Collections.Allocator allocator) [0x00006] in <5d5a854347494de1a5caa65aeedc545c>:0
    24.   at Unity.Entities.EntityQuery.CreateArchetypeChunkArray (Unity.Collections.Allocator allocator) [0x00006] in <5d5a854347494de1a5caa65aeedc545c>:0
    25.   at Unity.Rendering.RenderMeshSystemV2.UpdateFrozenRenderBatches () [0x0010d] in <eea339da6b5e4d4bb255bfef95601890>:0
    26.   at Unity.Rendering.RenderMeshSystemV2.OnUpdate (Unity.Jobs.JobHandle inputDeps) [0x0001d] in <eea339da6b5e4d4bb255bfef95601890>:0
    27.   at Unity.Entities.JobComponentSystem.Update () [0x0004e] in <5d5a854347494de1a5caa65aeedc545c>:0
    28.   at Unity.Entities.ComponentSystemGroup.UpdateAllSystems () [0x0006a] in <5d5a854347494de1a5caa65aeedc545c>:0
    29. UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
    30. UnityEngine.DebugLogHandler:LogException(Exception, Object)
    31. UnityEngine.Logger:LogException(Exception, Object)
    32. UnityEngine.Debug:LogException(Exception)
    33. Unity.Debug:LogException(Exception)
    34. Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    35. Unity.Entities.ComponentSystemGroup:OnUpdate()
    36. Unity.Entities.ComponentSystem:Update()
    37. Unity.Entities.DummyDelegateWrapper:TriggerUpdate()
    38. (Filename: <eea339da6b5e4d4bb255bfef95601890> Line: 0)
     
  24. Interjection

    Interjection

    Joined:
    Jun 18, 2020
    Posts:
    63
    When I built the exe I got three warnings, the first said:

    Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\ApiCompatibilityLevelTest.cs(2,10): warning CS1030: #warning: 'Project is expected to have API Compatibility Level set to .NET Standard 2.0'


    So I changed from ".NET 4.x" to ".NET Standard 2.0". Then I closed the editor, deleted "Library" and also "Temp" for good measure. Restarted the editor, auto-reimported everything, built the exe. Got two warnings instead of three, they were the same as before I changed from ".NET 4.x":

    Code (CSharp):
    1. Unable to find player assembly: C:\MyProjectPath\Temp\StagingArea\Data\Managed\UnityEngine.TestRunner.dll
    2. UnityEngine.Debug:LogWarning(Object)
    3. Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLsImpl(BuildReport) (at Library/PackageCache/com.unity.burst@1.3.0/Editor/BurstAotCompiler.cs:285)
    4. Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs(BuildReport) (at Library/PackageCache/com.unity.burst@1.3.0/Editor/BurstAotCompiler.cs:163)
    5. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    6. -----
    7. Unable to find player assembly: C:\MyProjectPath\Temp\StagingArea\Data\Managed\Unity.PerformanceTesting.dll
    8. UnityEngine.Debug:LogWarning(Object)
    9. Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLsImpl(BuildReport) (at Library/PackageCache/com.unity.burst@1.3.0/Editor/BurstAotCompiler.cs:285)
    10. Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs(BuildReport) (at Library/PackageCache/com.unity.burst@1.3.0/Editor/BurstAotCompiler.cs:163)
    11. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    Then:
    Build completed with a result of 'Succeeded' in 721 seconds (721332 ms)


    And just like earlier, same errors and nothing gets rendered.
    InvalidOperationException: This should have been initialized by code gen

    InvalidOperationException: Reflection data was not set up by code generation
     
    Last edited: Jul 6, 2020
  25. Interjection

    Interjection

    Joined:
    Jun 18, 2020
    Posts:
    63
    I got it working in Unity 2020.1.0b14 (64-bit) by making a new blank project and lifting over the old one piece by piece.

    1. Made it using the "Universal Render Pipeline" template.
    2. Deleted the sample stuff by Unity (I'd like to have a blank URP template without that demonstration scene, please).
    3. Exited the editor, deleted the Library folder, started the editor again.
    4. Enabled Preview Packages in Project Settings (the option has been moved there rather than having it in the Package Manager, which I find to be a strange move).
    5. Installed Unity Physics (0.4.0-preview.5).
    6. Installed Hybrid Renderer (0.5.2-preview.4).
    7. Changed from ".NET 4.x" API compatibility level to ".NET Standard 2.0". (Left scripting backend as Mono for now.)
    8. Copied the Assets folder from my old project.
    9. Manually re-applied settings/layers/tags (no file copying here).
    10. Made it possible to play in the editor (went from 15 sec between pressing play and actually playing to only 10 sec, nice).
    11. Built the x86_64 exe, felt like it took less time than usual. For some reason the "Build completed with a result of 'Succeeded'" message in the console no longer says how many seconds the build took to complete.
    12. It worked!

    Still getting the warnings about not being able to find "UnityEngine.TestRunner.dll" or "Unity.PerformanceTesting.dll".
     
  26. AlexHolderDev

    AlexHolderDev

    Joined:
    Jul 2, 2014
    Posts:
    35
    This still occurs (Unity & package versions listed below) and the temporary fix of deleting the Library folder is a huge thorn for development, especially in multiplatform games. It also doesn't solve the actual error -- the game runs in Standalone Mono builds without showing errors in any in-game UI, but the player log file still shows the errors occurring.

    Due to specific platform requirements (eg. Nintendo Switch) I can't just upgrade the Unity editor blindly, and also can't upgrade my packages blindly due to other specific package requirements (eg. DOTSNET).

    Version & package info:
    Unity 2019.4.3f1
    Entities 0.11.0-preview.7
    Burst 1.3.0
    Unity Physics 0.3.2-preview
    Hybrid Renderer 0.5.1-preview.18

    Also potentially worth noting: the DOTSNET package is the only thing in the DOTS stack active as soon as the game boots, and these issues appear after it finishes creating the server & client worlds. I have no DOTS coding of my own in the project at all.
    Everything works fine on Nintendo Switch builds, but I get these issues on Standalone Mono & Standalone IL2CPP builds. Mono builds show the errors in some generated in-game UI but allow the game to continue running. IL2CPP builds freeze as soon as the first scene loads.

    I'll try upgrading throughout the week -- packages first, and then upgrading the editor if that fails. This is preventing crossplatform testing though -- everything works fine on the Switch but I do need to test on other platforms.

    If the only fix comes from upgrades that's going to potentially be painful -- the versions listed above are in a nice "sweet spot" of being exactly what all platforms & packages I need are requiring right now. Upgrading messes that up.
     
  27. AlexHolderDev

    AlexHolderDev

    Joined:
    Jul 2, 2014
    Posts:
    35
    I have upgraded every package to the latest version & upgraded Unity to 2010.1b14 and it still does not work in Windows Standalone players. il2cpp players still freeze as soon as my first scene loads, and mono players still have the error messages pop up in the in-game error viewer. The errors are just like the ones from the original poster here. One error call example is shown below:

    Code (CSharp):
    1. InvalidOperationException: This should have been initialized by code gen
    2.   at Unity.Jobs.IJobBurstScheduableExtensions.Schedule[T] (T jobData, Unity.Jobs.JobHandle dependsOn) [0x00043] in D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.jobs@0.2.10-preview.12\Unity.Jobs\IJobBurstScheduable.cs:47
    3.   at Unity.Entities.ChunkIterationUtility.PreparePrefilteredChunkLists (System.Int32 unfilteredChunkCount, Unity.Entities.UnsafeMatchingArchetypePtrList archetypes, Unity.Entities.EntityQueryFilter filter, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode, Unity.Collections.NativeArray`1[System.Byte]& prefilterDataArray, System.Void*& deferredCountData) [0x000cf] in D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\Iterators\ChunkIterationUtility.cs:439
    4.   at Unity.Entities.JobChunkExtensions.ScheduleInternal[T] (T& jobData, Unity.Entities.EntityQuery query, Unity.Jobs.JobHandle dependsOn, Unity.Jobs.LowLevel.Unsafe.ScheduleMode mode, System.Boolean isParallel) [0x00011] in D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\IJobChunk.cs:169
    5.   at Unity.Entities.JobChunkExtensions.Schedule[T] (T jobData, Unity.Entities.EntityQuery query, Unity.Jobs.JobHandle dependsOn) [0x00001] in D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\IJobChunk.cs:94
    6.   at Unity.Entities.ChunkIterationUtility.CreateEntityArray (Unity.Entities.UnsafeMatchingArchetypePtrList matchingArchetypes, Unity.Collections.Allocator allocator, Unity.Entities.ArchetypeChunkEntityType type, Unity.Entities.EntityQuery entityQuery, Unity.Entities.EntityQueryFilter& filter, Unity.Jobs.JobHandle& jobHandle, Unity.Jobs.JobHandle dependsOn) [0x00031] in D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\Iterators\ChunkIterationUtility.cs:156
    7.   at Unity.Entities.EntityQueryImpl.ToEntityArray (Unity.Collections.Allocator allocator, Unity.Entities.EntityQuery outer) [0x00009] in D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\Iterators\EntityQuery.cs:477
    8.   at Unity.Entities.EntityQuery.ToEntityArray (Unity.Collections.Allocator allocator) [0x00000] in D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\Iterators\EntityQuery.cs:1217
    9.   at Unity.Entities.GameObjectConversionUtility.DeclareReferencedObjects (Unity.Entities.World gameObjectWorld, Unity.Entities.Conversion.GameObjectConversionMappingSystem mappingSystem) [0x000dd] in D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities.Hybrid\GameObjectConversion\GameObjectConversionUtility.cs:87
    10.   at Unity.Entities.GameObjectConversionUtility.Convert (Unity.Entities.World conversionWorld) [0x00016] in D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities.Hybrid\GameObjectConversion\GameObjectConversionUtility.cs:141
    11.   at Unity.Entities.ConvertToEntitySystem.Convert () [0x00123] in D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities.Hybrid\ConvertToEntity.cs:175
    12.   at Unity.Entities.ConvertToEntitySystem.OnUpdate () [0x00013] in D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities.Hybrid\ConvertToEntity.cs:67
    13.   at Unity.Entities.ComponentSystem.Update () [0x00050] in D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\ComponentSystem.cs:109
    14.   at Unity.Entities.ComponentSystemGroup.UpdateAllSystems () [0x00090] in D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\ComponentSystemGroup.cs:445
    15. UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
    16. UnityEngine.DebugLogHandler:LogException(Exception, Object)
    17. UnityEngine.Logger:LogException(Exception, Object)
    18. UnityEngine.Debug:LogException(Exception)
    19. Unity.Debug:LogException(Exception) (at D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\Stubs\Unity\Debug.cs:19)
    20. Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\ComponentSystemGroup.cs:450)
    21. Unity.Entities.ComponentSystemGroup:OnUpdate() (at D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\ComponentSystemGroup.cs:398)
    22. Unity.Entities.ComponentSystem:Update() (at D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\ComponentSystem.cs:109)
    23. Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at D:\Coding\GithubRepos\MyProject\Library\PackageCache\com.unity.entities@0.11.1-preview.4\Unity.Entities\ScriptBehaviourUpdateOrder.cs:192)
    24. (Filename: D:/Coding/GithubRepos/MyProject/Library/PackageCache/com.unity.jobs@0.2.10-preview.12/Unity.Jobs/IJobBurstScheduable.cs Line: 47)

    This is the most-upgraded I can be with a Nintendo Switch multiplatform project right now. The Switch build still works perfectly fine and doesn't even get any silent errors like the Windows Mono player does.

    Deleting the Library folder worked once or twice out of the ~6 or so times I've done it before a build. It's both not a consistent solution and also a time-wasting solution for multiplatform projects.

    I have also just tried making a fresh project -- required DOTS packages & DOTSNET & nothing else -- and the fresh project with just the packages listed above (+DOTSNET) works fine. I'm not sure what could've changed in my original project to make it start breaking out of the blue though. Various other DOTSNET users do not get this issue so I would not like to blame that package, and the issue hasn't popped up in Nintendo developer forums.

    I'm going to try & move over my original project into a fresh one, piece by piece, to see if that works. If it doesn't, I'll start thinking that it's something in my Assets
     
  28. peeka

    peeka

    Joined:
    Dec 3, 2014
    Posts:
    113
    i am on unity 2019.4 for me, I got this error whenever I build addressable asset while in IOS configuration, and running the game in editor, if I clear the addressable asset and cause a code change and recompile the error seems to go away until the next time I build addressable asset again.
     
  29. UbiAnthonyB

    UbiAnthonyB

    Joined:
    Jun 28, 2019
    Posts:
    4
    Having this occur on Entities 0.11 on Unity 2019.4.3f1 :(
    Just upgraded entities from 0.10 where this wasn't a problem.

    Apparently, this is fixed in Entities 0.13 officially as of last weekish according to Unity support. But that requires Unity 2020. Womp womp.
     
  30. pixelsplit

    pixelsplit

    Joined:
    Sep 16, 2013
    Posts:
    173
    madgreg likes this.
  31. madgreg

    madgreg

    Joined:
    Aug 29, 2013
    Posts:
    35
    Any news on a fix for 2019.4 ?
     
  32. s_schoener

    s_schoener

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    81
    We are working on a patch release for 0.11 that fixes another instance of this bug. No ETA, unfortunately.
     
  33. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    +1 happens on Unity 2019.4.4f1
    It seems like it happens after project switching.

    Setting Burst to synchronous compilation + reimporting code only fixes the problem, but only temporarily.
     
    ChrisKs likes this.
  34. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Also, it seems to be happening more often when Auto Refresh is disabled in Preferences.