Search Unity

Burst errors

Discussion in 'Burst' started by SauronDark, Mar 16, 2019.

  1. SauronDark

    SauronDark

    Joined:
    Mar 2, 2017
    Posts:
    16
    Greeting Unity, i am learning Unity's new ECS, C#'s Jobs and Burst, and i am really Enjoying this new way to develop Game to run most Efficient as possible,

    now i am having trouble with error, but scene playmode and build works well, however Burst compiler isn't functional on build (just tested on android), here is the logcat report says: Unable to find _burst_generated

    however, on editor play mode, burst running flowerless, but still throwing this some (ignore able) errors in console:

    Code (CSharp):
    1. D:\projects\Unity\Mathf-unity-\Library\PackageCache\com.unity.entities@0.0.12-preview.29\Unity.Entities\Types\TypeManager.cs(515,13): error: Loading from a static field `Unity.Entities.TypeManager.StaticTypeLookup`1<Unity.Transforms.Translation>.typeIndex` is not supported by burst
    2.  
    3. at Unity.Entities.TypeManager.GetTypeIndex() (at D:\projects\Unity\Mathf-unity-\Library\PackageCache\com.unity.entities@0.0.12-preview.29\Unity.Entities\Types\TypeManager.cs:515)
    4. at Unity.Entities.EntityCommandBufferData.AddEntityComponentCommand(Unity.Entities.EntityCommandBufferData* this, Unity.Entities.EntityCommandBufferChain* chain, int jobIndex, Unity.Entities.ECBCommand op, Unity.Entities.Entity e, Unity.Transforms.Translation component) (at D:\projects\Unity\Mathf-unity-\Library\PackageCache\com.unity.entities@0.0.12-preview.29\Unity.Entities\EntityCommandBuffer.cs:368)
    5. at Unity.Entities.EntityCommandBuffer.SetComponent(Unity.Entities.EntityCommandBuffer* this, Unity.Entities.Entity e, Unity.Transforms.Translation component) (at D:\projects\Unity\Mathf-unity-\Library\PackageCache\com.unity.entities@0.0.12-preview.29\Unity.Entities\EntityCommandBuffer.cs:792)
    6. at SpawnCubeSystem.SpawnJob.Execute(SpawnCubeSystem.SpawnJob* this, Unity.Entities.Entity entity, int index, ref SpawnCube spawner) (at D:\projects\Unity\Mathf-unity-\Assets\Scripts\Component\SpawnCubeSystem.cs:36)
    7. at Unity.Entities.JobProcessComponentDataExtensions.JobStruct_Process_ED`2<SpawnCubeSystem.SpawnJob,SpawnCube>.ExecuteChunk(ref Unity.Entities.JobProcessComponentDataExtensions.JobStruct_Process_ED`2<SpawnCubeSystem.SpawnJob,SpawnCube> jobData, System.IntPtr bufferRangePatchData, int begin, int end, Unity.Entities.ArchetypeChunk* chunks, int* entityIndices) (at D:\projects\Unity\Mathf-unity-\Library\PackageCache\com.unity.entities@0.0.12-preview.29\Unity.Entities\IJobProcessComponentData.generated.cs:514)
    8. at Unity.Entities.JobProcessComponentDataExtensions.JobStruct_Process_ED`2<SpawnCubeSystem.SpawnJob,SpawnCube>.Execute(ref Unity.Entities.JobProcessComponentDataExtensions.JobStruct_Process_ED`2<SpawnCubeSystem.SpawnJob,SpawnCube> jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, ref Unity.Jobs.LowLevel.Unsafe.JobRanges ranges, int jobIndex) (at D:\projects\Unity\Mathf-unity-\Library\PackageCache\com.unity.entities@0.0.12-preview.29\Unity.Entities\IJobProcessComponentData.generated.cs:491)
    9.  
    10.  
    11. While compiling job: System.Void Unity.Entities.JobProcessComponentDataExtensions/JobStruct_Process_ED`2<SpawnCubeSystem/SpawnJob,SpawnCube>::Execute(Unity.Entities.JobProcessComponentDataExtensions/JobStruct_Process_ED`2<T,U0>&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)
    12.  
    this above is just one whole single error, there are several 19 same identical error but different first paragraph statements (if you need all, let me know)

    also while building project too works and successful, but leaves 3 errors, first one is Empty (idk its just blank error) then other two here as follows:

    Code (CSharp):
    1. Failed running D:\projects\Unity\Mathf-unity-\Library\PackageCache\com.unity.burst@1.0.0-preview.4\.Runtime\bcl.exe --debug=true @C:\Users\Burhanu\AppData\Local\Temp\tmp2a851de8.tmp
    2.  
    3. stdout:
    4.  
    5. (0,0): error: Loading from a static field `Unity.Entities.TypeManager.StaticTypeLookup`1<Unity.Transforms.Translation>.typeIndex` is not supported by burst
    6.  
    7. at Unity.Entities.TypeManager.GetTypeIndex()
    8.  
    9. at Unity.Entities.EntityCommandBufferData.AddEntityComponentCommand(Unity.Entities.EntityCommandBufferData* this, Unity.Entities.EntityCommandBufferChain* chain, int jobIndex, Unity.Entities.ECBCommand op, Unity.Entities.Entity e, Unity.Transforms.Translation component)
    10.  
    11. at Unity.Entities.EntityCommandBuffer.SetComponent(Unity.Entities.EntityCommandBuffer* this, Unity.Entities.Entity e, Unity.Transforms.Translation component)
    12.  
    13. at SpawnCubeSystem.SpawnJob.Execute(SpawnCubeSystem.SpawnJob* this, Unity.Entities.Entity entity, int index, ref SpawnCube spawner)
    14.  
    15. at Unity.Entities.JobProcessComponentDataExtensions.JobStruct_Process_ED`2<SpawnCubeSystem.SpawnJob,SpawnCube>.ExecuteChunk(ref Unity.Entities.JobProcessComponentDataExtensions.JobStruct_Process_ED`2<SpawnCubeSystem.SpawnJob,SpawnCube> jobData, System.IntPtr bufferRangePatchData, int begin, int end, Unity.Entities.ArchetypeChunk* chunks, int* entityIndices)
    16.  
    17. at Unity.Entities.JobProcessComponentDataExtensions.JobStruct_Process_ED`2<SpawnCubeSystem.SpawnJob,SpawnCube>.Execute(ref Unity.Entities.JobProcessComponentDataExtensions.JobStruct_Process_ED`2<SpawnCubeSystem.SpawnJob,SpawnCube> jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, ref Unity.Jobs.LowLevel.Unsafe.JobRanges ranges, int jobIndex)
    18.  
    19.  
    20.  
    21. stderr:
    22.  
    third error:

    Code (CSharp):
    1. System.Exception: D:\projects\Unity\Mathf-unity-\Library\PackageCache\com.unity.burst@1.0.0-preview.4\.Runtime\bcl.exe did not run properly!
    2.  
    3.   at UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x0011f] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:130
    4.  
    5.   at UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) [0x00063] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:73
    6.  
    7.   at Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) [0x005b7] in D:\projects\Unity\Mathf-unity-\Library\PackageCache\com.unity.burst@1.0.0-preview.4\Editor\BurstAotCompiler.cs:358
    8.  
    9.  
    i am on Unity 2019.1b6, with latest packages, and copied link.xml from Unity's HelloCube Example. thankyou in advance :), and really sorry for this long wall of errors :/ please bear with me :)

    note: i tried burst v1.0.0 preview 1, 2 ,3 and 4, and happened same.
     
  2. SauronDark

    SauronDark

    Joined:
    Mar 2, 2017
    Posts:
    16
    editor log attachment
     

    Attached Files:

  3. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    You can't use (yet) ECB calls (Set\Add etc) inside Burst (except Destroy, it's only allowed, all other - no)
     
  4. SauronDark

    SauronDark

    Joined:
    Mar 2, 2017
    Posts:
    16
    i am fairly new, whats ECB calls in burst? (i am new so, yet curious, i tried googling that term, but nothing appeared)

    and basically burst wont work on builds for now till out of preview?
     
  5. sngdan

    sngdan

    Joined:
    Feb 7, 2014
    Posts:
    1,154
    ECB = entity command buffer

    You can use burst in builds today, like for jobs there are restrictions on what is allowed - those restrictions change as unity develops the system
     
  6. SauronDark

    SauronDark

    Joined:
    Mar 2, 2017
    Posts:
    16
    still having problem, i did cleaned project folder and on my completely new PC system, still having problems, in fact now burst stopped working on editor play mode too.

    Attaching project folder, so you guys can test if you want on 2019.1.0b8 and also fresh editor report.

    also sent bug report, but i am not sure about its really a bug or some of my silly mistakes, thats why posting here too.

    PS: i am not a hard core programmer, having just mid level knowledge in that.
     

    Attached Files:

    Last edited: Apr 4, 2019
  7. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    417
    Using the EntityComponentBuffer is not yet supported by burst as the underlying code is not compatible. There is an undergoing work to fix ECB but don't know exactly when it will be fixed.
     
    SauronDark and FROS7 like this.
  8. SauronDark

    SauronDark

    Joined:
    Mar 2, 2017
    Posts:
    16
    so i'll wait eagerly :) and wish you all a good fortune in that.

    i also want to know what about GUI in ECS, as i used it in this test project to simply change the math parameter for positioning cubes and some texts, but to update GUI, i have to use Monobehavior on a GameObject and using static variables in it to Get values into JobComponentSystem's OnUpdate, also GUI are GameObjects itself (i guessed), as i am representing this as a supervillain :p, i know its not a worse thing, but i am curious to know the future plan of GUI and if there is a better way? (except creating my own in ECS).

    also, how can i object Entity pool and disable any unwanted Entities per frame in JobComponentSystem, currently what i am doing is, just moving Entity out of Camera view, which is not helping me at all.

    another thing hit my mind, is it possible a Ijob to execute on GPU?

    thanks again
     
    Last edited: Apr 6, 2019