Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Compiler errors - 0.4.0-preview.10

Discussion in 'Entity Component System' started by permalmberg, Jan 5, 2020.

  1. permalmberg

    permalmberg

    Joined:
    Dec 2, 2019
    Posts:
    16
    Hi,

    This might have been reported already, but the search doesn't yield any result so here it is.

    I get these errors when Burst Compilation is enabled.

    Code (CSharp):
    1. C:\code\World2\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\Types\TypeManager.cs(431,13): error: Cannot find the field `TypeInfos` required for supporting TypeManager intrinsics in burst
    2. at Unity.Entities.TypeManager.GetTypeInfo(int typeIndex) (at C:\code\World2\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\Types\TypeManager.cs:430)
    3. at Unity.Entities.ChunkDataUtility.ReplicateComponents(Unity.Entities.Chunk* srcChunk, int srcIndex, Unity.Entities.Chunk* dstChunk, int dstBaseIndex, int count) (at C:\code\World2\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\ChunkDataUtility.cs:268)
    4. at Unity.Entities.EntityComponentStore.InstantiateEntitiesOne(Unity.Entities.EntityComponentStore* this, Unity.Entities.Entity srcEntity, Unity.Entities.Entity* outputEntities, int instanceCount, Unity.Entities.EntityComponentStore.InstantiateRemapChunk* remapChunks, int remapChunksCount) (at C:\code\World2\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\EntityComponentStoreCreateDestroyEntities.cs:432)
    5. at Unity.Entities.EntityComponentStore.InstantiateEntitiesGroup(Unity.Entities.EntityComponentStore* this, Unity.Entities.Entity* srcEntities, int srcEntityCount, Unity.Entities.Entity* outputRootEntities, int instanceCount) (at C:\code\World2\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\EntityComponentStoreCreateDestroyEntities.cs:502)
    6. at Unity.Entities.EntityComponentStore.InstantiateEntities(Unity.Entities.EntityComponentStore* this, Unity.Entities.Entity srcEntity, Unity.Entities.Entity* outputEntities, int instanceCount) (at C:\code\World2\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\EntityComponentStoreCreateDestroyEntities.cs:203)
    7. at Unity.Entities.StructuralChange.InstantiateEntitiesExecute(Unity.Entities.EntityComponentStore* entityComponentStore, Unity.Entities.Entity* srcEntity, Unity.Entities.Entity* outputEntities, int instanceCount) (at C:\code\World2\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\EntityManagerChangeArchetype.cs:135)
    8.  
    9.  
    10. While compiling job: System.Void Unity.Entities.StructuralChange::InstantiateEntitiesExecute(Unity.Entities.EntityComponentStore*,Unity.Entities.Entity*,Unity.Entities.Entity*,System.Int32)
    11.  
    Code (CSharp):
    1. InvalidOperationException: Burst failed to compile the given delegate: Void InstantiateEntitiesExecute(Unity.Entities.EntityComponentStore*, Unity.Entities.Entity*, Unity.Entities.Entity*, Int32)
    2.    attribute: Unity.Burst.BurstCompileAttribute
    3.  
    4. Unity.Burst.BurstCompiler.Compile[T] (T delegateObj) (at Library/PackageCache/com.unity.burst@1.1.2/Runtime/BurstCompiler.cs:120)
    5. Unity.Burst.BurstCompiler.CompileFunctionPointer[T] (T delegateMethod) (at Library/PackageCache/com.unity.burst@1.1.2/Runtime/BurstCompiler.cs:78)
    6. Unity.Entities.StructuralChange.Initialize () (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/EntityManagerChangeArchetype.cs:68)
    7. Unity.Entities.EntityManager..ctor (Unity.Entities.World world) (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/EntityManager.cs:163)
    8. Unity.Entities.World..ctor (System.String name) (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/World.cs:115)
    9. Unity.Entities.DefaultWorldInitialization.Initialize (System.String defaultWorldName, System.Boolean editorWorld) (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Hybrid/Injection/DefaultWorldInitialization.cs:127)
    10. Unity.Entities.AutomaticWorldBootstrap.Initialize () (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Hybrid/Injection/AutomaticWorldBootstrap.cs:15)
    11.  
     
    Mr-Mechanical likes this.
  2. permalmberg

    permalmberg

    Joined:
    Dec 2, 2019
    Posts:
    16
    Can't edit post add this (forum says it is spam-like?!), but it's 2019.3.0f3, Burst 1.1.2.
     
    Mr-Mechanical likes this.
  3. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    It looks like you have burst pinned to an older version. Please remove it from the package manifest file or upgrade to the latest version of burst.
     
    Mr-Mechanical likes this.
  4. Mr-Mechanical

    Mr-Mechanical

    Joined:
    May 31, 2015
    Posts:
    507
    Hello,

    I have similar issue. I've changed the package manifest file to update to burst 1.2.0. I'm on 2019.3.0f3. However with 1.2.0 I receive these errors:

    Code (CSharp):
    1. Unexpected exception Burst.Options.OptionException: Unexpected arguments: `--is-for-function-pointer --managed-function-pointer=0x000000018DF99890`
    2.   at Burst.Compiler.IL.Jit.JitCompilerService.Compile (Burst.Compiler.IL.Jit.JitCompilerService+CompileJob job) [0x0012a] in <3179d4839c86430ca331f2949f40ede5>:0
    3.  
    4. While compiling job: Unity.Entities.StructuralChange, Unity.Entities, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::AddComponentEntitiesBatchExecute(Unity.Entities.EntityComponentStore*, Unity.Entities, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|Unity.Collections.LowLevel.Unsafe.UnsafeList*, Unity.Collections, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
    5.  
    Code (CSharp):
    1. InvalidOperationException: Burst failed to compile the function pointer `Void AddComponentEntitiesBatchExecute(Unity.Entities.EntityComponentStore*, Unity.Collections.LowLevel.Unsafe.UnsafeList*, Int32)`
    2. Unity.Burst.BurstCompiler.Compile[T] (T delegateObj, System.Boolean isFunctionPointer) (at Library/PackageCache/com.unity.burst@1.2.0-preview.11/Runtime/BurstCompiler.cs:160)
    3. Unity.Burst.BurstCompiler.CompileFunctionPointer[T] (T delegateMethod) (at Library/PackageCache/com.unity.burst@1.2.0-preview.11/Runtime/BurstCompiler.cs:78)
    4. Unity.Entities.StructuralChange.Initialize () (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/EntityManagerChangeArchetype.cs:58)
    5. Unity.Entities.EntityManager..ctor (Unity.Entities.World world) (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/EntityManager.cs:163)
    6. Unity.Entities.World..ctor (System.String name) (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/World.cs:115)
    7. Unity.Entities.DefaultWorldInitialization.Initialize (System.String defaultWorldName, System.Boolean editorWorld) (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Hybrid/Injection/DefaultWorldInitialization.cs:127)
    8. Unity.Entities.AutomaticWorldBootstrap.Initialize () (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Hybrid/Injection/AutomaticWorldBootstrap.cs:15)
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Unity.Entities.World.Dispose () (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/World.cs:146)
    3. Unity.Entities.World.DisposeAllWorlds () (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/World.cs:164)
    4. Unity.Entities.DefaultWorldInitialization.DomainUnloadOrPlayModeChangeShutdown () (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Hybrid/Injection/DefaultWorldInitialization.cs:87)
    5. Unity.Entities.DefaultWorldInitializationProxy.OnDisable () (at Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities.Hybrid/Injection/DefaultWorldInitializationProxy.cs:28)
    6.  
     
  5. permalmberg

    permalmberg

    Joined:
    Dec 2, 2019
    Posts:
    16
    @Joachim_Ante
    Pinned? I can assure you that I have not pinned it, at least not intentionally. Where and how do I pin it? And more importantly, unpin it? You mention a file, where do I find it an is there not a UI for it?

    Also, version 0.4.0 is the most recent version that is listed in the package manager. Unless preview.32 - 0.0.12 is more recent than preview.10 - 0.4.0? If so, the package manager does a really bad job in sorting the versions. Edit: It's not more recent based on the publish date.

    Which one is the latest version? @Mr-Mechanical mentions 1.2.0, it's not listed in my package manager.
     
    Last edited: Jan 5, 2020
  6. Mr-Mechanical

    Mr-Mechanical

    Joined:
    May 31, 2015
    Posts:
    507
    Sorry spoke too soon, restarting unity fixes the problem. Go to manifest.json and just delete the line that has burst in it, then burst will be updated to the correct version.
     
  7. permalmberg

    permalmberg

    Joined:
    Dec 2, 2019
    Posts:
    16
    Not sure what is going on... Unity crashed as it does quite often while debugging and now the package manager lists Burst at 1.1.2.
     
  8. Rotary-Heart

    Rotary-Heart

    Joined:
    Dec 18, 2012
    Posts:
    813
    I have an error too, but it's not the same that is posted here:
    Code (CSharp):
    1. Something went wrong while Post Processing the assembly (Unity.Entities.dll) :
    2. Failed to resolve System.Collections.Generic.Stack`1
    3.   at Unity.Entities.CodeGen.TypeReferenceExtensions.CheckedResolve (Mono.Cecil.TypeReference typeReference) [0x00000] in F:\Unity Projects\EOS\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities.CodeGen\CecilExtensionMethods.cs:13
    4.   at Unity.Entities.CodeGen.BlobAssetSafetyVerifier.<VerifyMethod>g__IsTypeRestrictedToBlobAssetStorage|3_0 (Mono.Cecil.TypeReference tr, Unity.Entities.CodeGen.BlobAssetSafetyVerifier+<>c__DisplayClass3_0& ) [0x000a1] in F:\Unity Projects\EOS\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities.CodeGen\BlobAssetSafety\BlobAssetSafetyVerifier.cs:64
    5.   at Unity.Entities.CodeGen.BlobAssetSafetyVerifier.VerifyMethod (Mono.Cecil.MethodDefinition method, System.Collections.Generic.HashSet`1[T] _nonRestrictedTypes) [0x0004d] in F:\Unity Projects\EOS\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities.CodeGen\BlobAssetSafety\BlobAssetSafetyVerifier.cs:90
    6.   at Unity.Entities.CodeGen.BlobAssetSafetyVerifier.AssertNoBlobAssetLeavesBlobAssetStorage () [0x0004d] in F:\Unity Projects\EOS\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities.CodeGen\BlobAssetSafety\BlobAssetSafetyVerifier.cs:37
    7.   at Unity.Entities.CodeGen.BlobAssetSafetyVerifier.PostProcessImpl () [0x00007] in F:\Unity Projects\EOS\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities.CodeGen\BlobAssetSafety\BlobAssetSafetyVerifier.cs:20
    8.   at Unity.Entities.CodeGen.EntitiesILPostProcessor.PostProcess (Mono.Cecil.AssemblyDefinition assemblyDefinition, System.Boolean& madeAChange) [0x00007] in F:\Unity Projects\EOS\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities.CodeGen\EntitiesILPostProcessor.cs:231
    9.   at Unity.Entities.CodeGen.EntitiesILPostProcessors.Process (Unity.CompilationPipeline.Common.ILPostProcessing.ICompiledAssembly compiledAssembly) [0x00038] in F:\Unity Projects\EOS\Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities.CodeGen\EntitiesILPostProcessor.cs:44
    10.   at UnityEditor.Scripting.ScriptCompilation.ILPostProcessing.RunILPostProcessors (UnityEditor.Scripting.ScriptCompilation.ScriptAssembly assembly, System.String outputTempPath) [0x0011b] in <50c2886429a849e8b640d0aca52729fc>:0
    11.   at UnityEditor.Scripting.ScriptCompilation.ILPostProcessing.PostProcess (UnityEditor.Scripting.ScriptCompilation.ScriptAssembly assembly, System.Collections.Generic.List`1[T] messages, System.String outputTempPath) [0x00061] in <50c2886429a849e8b640d0aca52729fc>:0
    That's when updating from 0.3.0 - preview.4
     
    Last edited: Jan 5, 2020
  9. permalmberg

    permalmberg

    Joined:
    Dec 2, 2019
    Posts:
    16
    Now that I've got the correct version of Burst the errors are gone.
     
  10. permalmberg

    permalmberg

    Joined:
    Dec 2, 2019
    Posts:
    16
    Hm, I spoke to soon. Unity crashed again and now I'm back at 0.4.0, but the manifest.json still specifies 1.1.2. There is something obviously wrong with the package management :\
     
  11. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    If your manifest explicitly specifies 1.1.2 then that is the version it will fetch.
    So either you remove it from the manifest.json completetely (So that the correct version of burst will be pulled down as a dependency from entities) or you upgrade burst. Both will solve the problem.
     
    Mr-Mechanical likes this.