Search Unity

Burst for standalone players

Discussion in 'Data Oriented Technology Stack' started by xoofx, Jul 10, 2018.

  1. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    260
    which version of burst are you using?

    Afair, the error should report that you have to add the BurstCompile attribute on the enclosing type as well when using function pointers. If it is still happening on the latest 1.2.0-preview.8 version, let us know, we will improve the error message.
     
    amarcolina likes this.
  2. Dreamback

    Dreamback

    Joined:
    Jul 29, 2016
    Posts:
    189
    I'm trying to make a Standalone Linux build on a Windows PC. I get the error about the Burst Compiler, even after disabling the Burst Compiler. And in Jobs->Burst, Enable Compilation is not checked. This is in Unity 2019.2.11. Note that when I was using 2019.1.12, I got the error but it would still complete the build (I assume that build just didn't use Burst). BurstError.PNG
    Burst_AOT.PNG
     
  3. amarcolina

    amarcolina

    Joined:
    Jun 19, 2014
    Posts:
    18
    Ahh looks like I was only on the latest non-preview release, I should have tried the preview releases, it does indeed look like the error message is more descriptive there. Ok awesome, so all I was missing was the extra [BurstCompile] attribute, awesome! Thanks for the help!
     
  4. Dreamback

    Dreamback

    Joined:
    Jul 29, 2016
    Posts:
    189
    Aha, found the problem earlier in this thread, there's a bug that the menu doesn't write changes to the .json config file, even though the inspector does keep the state of the checkbox. When I manually edited the file, that fixed the problem.
     
  5. Ziboo

    Ziboo

    Joined:
    Aug 30, 2011
    Posts:
    326
    Any news about having CommandBuffer in Bursted Jobs ?
     
  6. siggigg

    siggigg

    Joined:
    Apr 11, 2018
    Posts:
    232
    I think they mentioned at Unite that it would be in the next release?
     
  7. eric_funktroniclabs

    eric_funktroniclabs

    Joined:
    Oct 4, 2018
    Posts:
    19
    Regarding Burst for Lumin, it appears that 1.1.3 is required, but it is not available in my package manager (using staging). Using Unity 2019.2.11f1.

    Is it only available in Unity 2019.3 or something like that?

    [Edit: My manifest was targeting staging, so when I removed that all the new packages appeared and my issue was resolved.]
     
    Last edited: Nov 5, 2019
  8. slime73

    slime73

    Joined:
    May 14, 2017
    Posts:
    45
  9. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    44
    @eric_funktroniclabs I believe 1.1.3 was just the first package to contain the fix, however you should be able to use 1.2.0 previews and beyond as well. Because 1.2.0 is not yet final, you need to enable show preview packages in the package manager options for it to show up.
     
  10. eric_funktroniclabs

    eric_funktroniclabs

    Joined:
    Oct 4, 2018
    Posts:
    19
    I discovered this morning that I had my manifest targeting the `staging` repo, which caused some packages to not appear. Removing that has fixed my issue. I can now upgrade fully and make builds. Thanks!
     
  11. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    147
    Using Burst 1.2.0 preview 9
    Unity 2019.2.10f1

    I get the following error building for UWP:

    BuildFailedException: Burst compiler (1.2.0-preview.9) failed running
    stdout:
    An unexpected exception occurred:
    stderr:
    Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'
    at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
    at Burst.Compiler.IL.AssemblyLoader.Resolve(AssemblyNameReference name)
    at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
    at Mono.Cecil.TypeReference.Resolve()
    at Burst.Compiler.IL.Helpers.CecilExtensions.StrictResolve(TypeReference typeReference)
    at Burst.Bcl.BclApp.FindExecuteMethods(List`1 rootAssemblyPaths)
    at Burst.Bcl.BclApp.GetMethodsToCompileBeforeDynamicDispatch()
    at Burst.Bcl.BclApp.GetMethodsToCompile()
    at Burst.Bcl.Program.Main(String[] args)

    Note, I am also using the following:

    #if ENABLE_WINMD_SUPPORT && UNITY_WSA
    using Windows.ApplicationModel;
    using Windows.ApplicationModel.Store;
    #endif
     
  12. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    44
    @SniperED007 - thanks for the report, this looks to be an uncaught error report in burst. It is likely being caused by the use of a type in the Windows.winmd assembly in some burst compiled code. I`ve logged an issue to improve the error handling, until then, the best I can suggest is to remove the burst compile attribute from some jobs in turn in order to figure out which one contains the reference that burst does not support (cannot resolve).
     
    Last edited: Nov 7, 2019
  13. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    322
    Im getting this
    in Unity 2018.4.11
    using 1.2.0 preview 8 (also tried 9)

    BuildFailedException: Burst compiler (1.2.0-preview.8) failed running
    stdout:
    An unexpected exception occurred:
    stderr:
    Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'CTNLayer, Version=1.2.6652.30480, Culture=neutral, PublicKeyToken=null'
    at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
    at Burst.Compiler.IL.AssemblyLoader.Resolve(AssemblyNameReference name)
    at Burst.Bcl.BclApp.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited)
    at Burst.Bcl.BclApp.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited)
    at Burst.Bcl.BclApp.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited)
    at Burst.Bcl.BclApp.FindExecuteMethods(List`1 rootAssemblyPaths)
    at Burst.Bcl.BclApp.GetMethodsToCompileBeforeDynamicDispatch()
    at Burst.Bcl.BclApp.GetMethodsToCompile()
    at Burst.Bcl.Program.Main(String[] args)
    Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.8/Editor/BurstAotCompiler.cs:725)
    Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.8/Editor/BurstAotCompiler.cs:663)
    Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.8/Editor/BurstAotCompiler.cs:637)
    Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.8/Editor/BurstAotCompiler.cs:332)
    Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.8/Editor/BurstAotCompiler.cs:90)
    UnityEditor.Build.BuildPipelineInterfaces.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:452)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
    Last edited: Dec 10, 2019
  14. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    322
  15. bgrz

    bgrz

    Joined:
    Mar 22, 2015
    Posts:
    45
    @Lee_Hammerton seems like there's a problem with handling paths that contain spaces, getting this on 2019.2.15f:

    My full Windows username is my first and last name, seems like it's not handling a space there properly.
     
  16. siggigg

    siggigg

    Joined:
    Apr 11, 2018
    Posts:
    232
    bgrz likes this.
  17. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    44
    Thanks for the report, this is an issue where burst is scanning for burst compiled code but accidently picks up unrelated assemblies, I`m working on a fix for this now.
     
  18. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    322
    Was there a fix in .11?

    Im now getting this in .11:
    BuildFailedException: Burst compiler (1.2.0-preview.11) failed running
    stdout:
    An unexpected exception occurred:
    stderr:
    System.NullReferenceException: Object reference not set to an instance of an object.
    at Burst.Bcl.BclApp.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited)
    at Burst.Bcl.BclApp.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited)
    at Burst.Bcl.BclApp.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited)
    at Burst.Bcl.BclApp.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited)
    at Burst.Bcl.BclApp.FindExecuteMethods(List`1 rootAssemblyPaths)
    at Burst.Bcl.BclApp.GetMethodsToCompileBeforeDynamicDispatch()
    at Burst.Bcl.BclApp.GetMethodsToCompile()
    at Burst.Bcl.Program.Main(String[] args)
    Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.11/Editor/BurstAotCompiler.cs:725)
    Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.11/Editor/BurstAotCompiler.cs:663)
    Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.11/Editor/BurstAotCompiler.cs:637)
    Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.11/Editor/BurstAotCompiler.cs:332)
    Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.2.0-preview.11/Editor/BurstAotCompiler.cs:90)
    UnityEditor.Build.BuildPipelineInterfaces.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:452)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
     
  19. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    260
    Unfortunately, the fix was not entirely covering that case. We should have a fix for this case and it will be hopefully in the following preview.12.
     
  20. francois85

    francois85

    Joined:
    Aug 11, 2015
    Posts:
    866
    Wondering if someone could help me out, Ive just upgraded to 2019.3.0f3 Current Platform (im on Mac) and Im seeing this error Cannot find the field `TypeInfos` required for supporting TypeManager intrinsics in burst. Any help would be appreciated.

    Code (CSharp):
    1.  
    2.  
    3. ../Unity/AA/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
    4.  at Unity.Entities.TypeManager.GetTypeInfo(int typeIndex) (at ../Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/Types/TypeManager.cs:430)
    5.  at Unity.Entities.ChunkDataUtility.ReplicateComponents(Unity.Entities.Chunk* srcChunk, int srcIndex, Unity.Entities.Chunk* dstChunk, int dstBaseIndex, int count) (at ../Unity/AA/Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/ChunkDataUtility.cs:268)
    6.  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 ../Unity/AA/Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/EntityComponentStoreCreateDestroyEntities.cs:432)
    7.  at Unity.Entities.EntityComponentStore.InstantiateEntitiesGroup(Unity.Entities.EntityComponentStore* this, Unity.Entities.Entity* srcEntities, int srcEntityCount, Unity.Entities.Entity* outputRootEntities, int instanceCount) (at ../Unity/AA/Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/EntityComponentStoreCreateDestroyEntities.cs:502)
    8.  at Unity.Entities.EntityComponentStore.InstantiateEntities(Unity.Entities.EntityComponentStore* this, Unity.Entities.Entity srcEntity, Unity.Entities.Entity* outputEntities, int instanceCount) (at ../Unity/AA/Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/EntityComponentStoreCreateDestroyEntities.cs:203)
    9.  at Unity.Entities.StructuralChange.InstantiateEntitiesExecute(Unity.Entities.EntityComponentStore* entityComponentStore, Unity.Entities.Entity* srcEntity, Unity.Entities.Entity* outputEntities, int instanceCount) (at ../Unity/AA/Library/PackageCache/com.unity.entities@0.4.0-preview.10/Unity.Entities/EntityManagerChangeArchetype.cs:135)
    10.  
    11.  
    12. While compiling job: System.Void Unity.Entities.StructuralChange::InstantiateEntitiesExecute(Unity.Entities.EntityComponentStore*,Unity.Entities.Entity*,Unity.Entities.Entity*,System.Int32)
    13.  
    14.  
    Code (CSharp):
    1.  
    2. {
    3.   "dependencies": {
    4.     "com.unity.burst": "1.1.2",
    5.     "com.unity.collab-proxy": "1.2.16",
    6.     "com.unity.collections": "0.4.0-preview.6",
    7.     "com.unity.entities": "0.4.0-preview.10",
    8.     "com.unity.ext.nunit": "1.0.0",
    9.     "com.unity.ide.rider": "1.1.4",
    10.     "com.unity.ide.vscode": "1.1.3",
    11.     "com.unity.rendering.hybrid": "0.3.1-preview.10",
    12.     "com.unity.test-framework": "1.1.9",
    13.     "com.unity.textmeshpro": "2.0.1",
    14.     "com.unity.timeline": "1.2.9",
    15.     "com.unity.ugui": "1.0.0",
    16.     "com.unity.modules.ai": "1.0.0",
    17.     "com.unity.modules.androidjni": "1.0.0",
    18.     "com.unity.modules.animation": "1.0.0",
    19.     "com.unity.modules.assetbundle": "1.0.0",
    20.     "com.unity.modules.audio": "1.0.0",
    21.     "com.unity.modules.cloth": "1.0.0",
    22.     "com.unity.modules.director": "1.0.0",
    23.     "com.unity.modules.imageconversion": "1.0.0",
    24.     "com.unity.modules.imgui": "1.0.0",
    25.     "com.unity.modules.jsonserialize": "1.0.0",
    26.     "com.unity.modules.particlesystem": "1.0.0",
    27.     "com.unity.modules.physics": "1.0.0",
    28.     "com.unity.modules.physics2d": "1.0.0",
    29.     "com.unity.modules.screencapture": "1.0.0",
    30.     "com.unity.modules.terrain": "1.0.0",
    31.     "com.unity.modules.terrainphysics": "1.0.0",
    32.     "com.unity.modules.tilemap": "1.0.0",
    33.     "com.unity.modules.ui": "1.0.0",
    34.     "com.unity.modules.uielements": "1.0.0",
    35.     "com.unity.modules.umbra": "1.0.0",
    36.     "com.unity.modules.unityanalytics": "1.0.0",
    37.     "com.unity.modules.unitywebrequest": "1.0.0",
    38.     "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    39.     "com.unity.modules.unitywebrequestaudio": "1.0.0",
    40.     "com.unity.modules.unitywebrequesttexture": "1.0.0",
    41.     "com.unity.modules.unitywebrequestwww": "1.0.0",
    42.     "com.unity.modules.vehicles": "1.0.0",
    43.     "com.unity.modules.video": "1.0.0",
    44.     "com.unity.modules.vr": "1.0.0",
    45.     "com.unity.modules.wind": "1.0.0",
    46.     "com.unity.modules.xr": "1.0.0"
    47.   }
    48. }
    49.  
     
  21. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,708
    Update burst to 1.2.0 shut down Unity (may be remove Library\PackagesCache) and start again
     
  22. francois85

    francois85

    Joined:
    Aug 11, 2015
    Posts:
    866
    According to the package manager im on burst 1.2.0 Preview 11 .. it that not correct?
     
  23. francois85

    francois85

    Joined:
    Aug 11, 2015
    Posts:
    866
    Even on a brand new project installing the latest entities package i get a bunch of warnings

    Code (CSharp):
    1.  
    2. Assembly for Assembly Definition File 'Packages/com.unity.entities/DocCodeSamples.Tests/DocCodeSamples.asmdef' will not be compiled, because it has no scripts associated with it.
    3. UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:TickCompilationPipeline(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilationInterface.cs:390)
    4.  
     
  24. francois85

    francois85

    Joined:
    Aug 11, 2015
    Posts:
    866
    OK If anyone else is running into this I fixed it by deleting manifest.json and PackagesCache like eizenhorn suggested. Package Manager is unreliable not displaying all the packages (and it not a filter setting I double checked that) It also showed incorrect package version as installed.

    Anyway Marry Christmas and thanks Unity Dev for all the hard work over the past year, truly insane !!
     
  25. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    202
    Is WebGL Compatibility coming for 2019.3? It really sucks animation rigging can't work on WebGL because of this.
     
  26. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    260
    WebGL and Burst compatibility should be hopefully fixed later this year, but we don't have any precise ETA at the moment.
     
  27. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    118
    I don't know if this has already been discussed, but is it actually possible to use burst for mods, e.g. loading DLL at runtime with burst jobs?
     
    cjxm and Jes28 like this.
  28. Atstec

    Atstec

    Joined:
    Feb 25, 2017
    Posts:
    1
    Hello everyone! Burst compiler does not support armv7? Thanks for any answer.
     
  29. o1o1o1o1o2

    o1o1o1o1o2

    Joined:
    May 22, 2014
    Posts:
    32
    it supports, and 64 also
     
  30. Solovykh

    Solovykh

    Joined:
    Aug 28, 2017
    Posts:
    49
    Burst 1.2.2 breaks Oculus desktop builds :(
     
  31. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    61
    @Solovykh do you have a crash, or error message in the console? Please could you start a new forum thread specific to your problem, so we can more easily track it.
     
  32. Solovykh

    Solovykh

    Joined:
    Aug 28, 2017
    Posts:
    49
unityunity