Search Unity

UWP build failing - burst compiler not running

Discussion in 'Burst' started by Busghella, Oct 22, 2018.

  1. Busghella

    Busghella

    Joined:
    Oct 24, 2016
    Posts:
    7
    Hi everyone :)

    I'm trying to build my project for UWP but I get the errors in the attached images.
    I'm using Unity 2018.3.0b6 with ECS 0.0.12preview16 and IL2CPP as scripting backend.
    The build completes successfully and works in all the scenes that don't use entities or systems (the introduction for example) but as I load the main scene (with entities and systems) everything is black....which is kind of strange since it works perfectly in the editor :(

    Thanks for your help :)

    Inkederror1_LI.jpg Inkederror2_LI.jpg Inkederror3_LI.jpg
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    This may have changed, but as far as I'm aware burst currently only works with

    - Windows
    - MacOS
    - Linux
    - Xbox One
    - PS4
    - Android (ARM v7 and v8+)
    - iOS (ARM v7 and v8+)

    at the moment
     
  3. PLL

    PLL

    Joined:
    Jul 15, 2013
    Posts:
    19
    I have the weird feeling that UWP is not a priority :) Yet, if it does not run with UWP it means that it cannot run on **any** Microsoft VR visor, nor Hololens, where performance is more critical than in other platforms.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    It shoud work with UWP. Can we get a bug report?
     
  5. Busghella

    Busghella

    Joined:
    Oct 24, 2016
    Posts:
    7
    Do you need anything else that is not in the attached screenshots?
     
  6. Busghella

    Busghella

    Joined:
    Oct 24, 2016
    Posts:
    7
    As previously noted, the build succeeds but then all the scenes with ECS are not working in the build so we can visualize the non ECS scenes but the ECS scenes are not working. We attached below the error messages Unity outputs. They are the same we get when we compile the ECS example scenes.

    Failed running D:\Projects\Thesis\Library\PackageCache\com.unity.burst@0.2.4-preview.31\.Runtime\bcl.exe @C:\Users\ERICAS~1\AppData\Local\Temp\tmp45eafcd2.tmp

    stdout:
    stderr:
    'x86-64' is not a recognized processor for this target (ignoring processor)
    '+fxsr' is not a recognized feature for this target (ignoring feature)
    '+mmx' is not a recognized feature for this target (ignoring feature)
    '+sse' is not a recognized feature for this target (ignoring feature)
    '+sse2' is not a recognized feature for this target (ignoring feature)
    '+x87' is not a recognized feature for this target (ignoring feature)
    'x86-64' is not a recognized processor for this target (ignoring processor)
    'x86-64' is not a recognized processor for this target (ignoring processor)
    '+fxsr' is not a recognized feature for this target (ignoring feature)
    '+mmx' is not a recognized feature for this target (ignoring feature)
    '+sse' is not a recognized feature for this target (ignoring feature)
    '+sse2' is not a recognized feature for this target (ignoring feature)
    '+x87' is not a recognized feature for this target (ignoring feature)
    'x86-64' is not a recognized processor for this target (ignoring processor)
    'x86-64' is not a recognized processor for this target (ignoring processor)
    'x86-64' is not a recognized processor for this target (ignoring processor)

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs(BuildReport) (at Library/PackageCache/com.unity.burst@0.2.4-preview.31/Editor/BurstAotCompiler.cs:220)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Exception: D:\Projects\Thesis\Library\PackageCache\com.unity.burst@0.2.4-preview.31\.Runtime\bcl.exe did not run properly!
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@0.2.4-preview.31/Editor/BurstAotCompiler.cs:220)
    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)
     
  7. Busghella

    Busghella

    Joined:
    Oct 24, 2016
    Posts:
    7
    @Tautvydas-Zilys I tried creating a new (empty) project on both 2018.3.b6 and b7 and installing only the Entities package 0.0.12preview16. I switched the platform to uwp (IL2CPP scripting backend) and tried to build but I still get the following errors:


    Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    at Burst.Backend.StandardCompilerBackend.WriteModuleObject(TargetMachine targetMachine, Module module, StringBuilder filename)
    at Burst.Backend.ChainCompilerBackend.WriteModuleObject(TargetMachine targetMachine, Module module, StringBuilder filename)
    at Burst.Compiler.IL.Aot.AotCompiler.Link(Module module, AotCompilerOptions compilerOptions)
    at Burst.Bcl.Program.Main(String[] args)

    Failed running D:\Projects\ECSTestb6\Library\PackageCache\com.unity.burst@0.2.4-preview.31\.Runtime\bcl.exe @C:\Users\ERICAS~1\AppData\Local\Temp\tmp7f1bf3b8.tmp

    stdout:
    stderr:

    Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    at Burst.Backend.StandardCompilerBackend.WriteModuleObject(TargetMachine targetMachine, Module module, StringBuilder filename)
    at Burst.Backend.ChainCompilerBackend.WriteModuleObject(TargetMachine targetMachine, Module module, StringBuilder filename)
    at Burst.Compiler.IL.Aot.AotCompiler.Link(Module module, AotCompilerOptions compilerOptions)
    at Burst.Bcl.Program.Main(String[] args)

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs(BuildReport) (at Library/PackageCache/com.unity.burst@0.2.4-preview.31/Editor/BurstAotCompiler.cs:220)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Exception: D:\Projects\ECSTestb6\Library\PackageCache\com.unity.burst@0.2.4-preview.31\.Runtime\bcl.exe did not run properly!
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@0.2.4-preview.31/Editor/BurstAotCompiler.cs:220)
    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)
     
  8. Busghella

    Busghella

    Joined:
    Oct 24, 2016
    Posts:
    7
    @Tautvydas-Zilys I made a very simple project with one cube rotating. In one scene the cube is still, in the other one it rotates with ECS. Press 0 to switch between the two. If you play it in the editor everything works fine. If you generate the UWP, install it and play it, when you switch to ECS it crashes. I'm using Unity 2018.3.0b7 and ECS 0.0.12preview16.
     

    Attached Files:

    Last edited: Oct 26, 2018
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    I'll take a look.
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    I can reproduce this. We'll fix it.
     
    Busghella likes this.
  11. PLL

    PLL

    Joined:
    Jul 15, 2013
    Posts:
    19
    Any update on this?
     
  12. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Yeah. There are several issues:

    1. Compilation is failing for ARM architecture when building to UWP. This one I don't have a fix for yet, but if you're not planning to run on ARM devices (like raspberry Pi), this shouldn't block you (as the error doesn't abort the build, so other architectures still complete compilation successfully).
    2. Wrong reference assembly gets picked up when building the sample you provided. This one causes crashes at runtime. I have a fix for that, waiting for go into a package. After this was fixed, your sample worked beautifully.
     
    Busghella likes this.
  13. PLL

    PLL

    Joined:
    Jul 15, 2013
    Posts:
    19
    We are building for x86 and x86-64 (the HoloLens and microsoft headsets) so if you can send us a package to make it work or make it available ASAP (by Monday? :) would be wonderful and I would be eternally grateful :D
     
  14. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    417
    We will try to ship a new package tomorrow
     
    Busghella likes this.
  15. Busghella

    Busghella

    Joined:
    Oct 24, 2016
    Posts:
    7
    @xoofx do you have any updates on the release of the package? :)
    I'm having the same issue with the latest beta (2018.3.0b8) so I assume I should be waiting for a new ECS package, correct? :)
     
  16. PLL

    PLL

    Joined:
    Jul 15, 2013
    Posts:
    19
    Any update? It looks like nothing is still working. So no building for *any* Microsoft visor if you use ECS.
     
  17. PLL

    PLL

    Joined:
    Jul 15, 2013
    Posts:
    19
    Any update? :)
     
  18. PLL

    PLL

    Joined:
    Jul 15, 2013
    Posts:
    19
    Updates about this? We are quite desperate since we cannot build the ecs project for any Microsoft visor (not asus not hololens)
     
  19. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    I just talked with @xoofx and he said he shipped the new burst package. You have to update to the latest version manually in package manager, though.
     
  20. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    417
    You can use the latest burst version `0.2.4-preview.37`
     
  21. Aevien

    Aevien

    Joined:
    Mar 26, 2011
    Posts:
    73
    Here is my build IL2CPP log.

    1 Deleted VS 2017
    2 Reinstalled it from Unity Installer
    3 Installed all UWP modules from VS 2017 Installer
     

    Attached Files:

    Last edited: Nov 11, 2018
  22. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    LNK1181 means that it cannot open that particular file. Kernel32.lib is part of Windows 10 SDK. Did you by any chance install it and then deleted it at some point?
     
  23. Aevien

    Aevien

    Joined:
    Mar 26, 2011
    Posts:
    73


    Microsoft SDKs directory and Windows Kits one are exist



    All available Libs installed too. These libs all have Kernel32.lib for both x86 and x64. I spent a day to find out whats wrong, but have no any success result :(
     
  24. Aevien

    Aevien

    Joined:
    Mar 26, 2011
    Posts:
    73
    Hi! After a half of day of searching the problem I found that it is need to be installed all Windows SDK packages in Visual Studio. Now the burst compiler is working for Mono backend! But for IL2CPP there are still some problems. Here is a IL2CPP build log info:
     

    Attached Files:

    Last edited: Nov 11, 2018
  25. Pavel_IG

    Pavel_IG

    Joined:
    Mar 24, 2017
    Posts:
    8
    Hello. I'm trying to build UWP project for hololens, and have issue with burst.
    When i add burst in package manager - all fine in editor, but error when try to build.
    tested in empty project
    unity 2018.4.14f
    empty UWP project with empty scene - build is going
    when add burst - error.
     

    Attached Files:

    • 1.PNG
      1.PNG
      File size:
      20.7 KB
      Views:
      470
  26. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Which scripting backend are you using?
     
  27. Pavel_IG

    Pavel_IG

    Joined:
    Mar 24, 2017
    Posts:
    8
    .Net
     
  28. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    So managed jobs aren't supported on .NET scripting backend, and burst requires them. Sorry, if you need burst you will have to switch to IL2CPP.
     
  29. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    417
    Can you try with the latest preview of burst 1.2.0-preview.11? (note that upgrading the packages requires to restart the editor)
     
  30. Pavel_IG

    Pavel_IG

    Joined:
    Mar 24, 2017
    Posts:
    8
    same error.
    why shouldn't it work on .net?
    I saw the messages above, from 2018, the guys tried to add a burst on hololens (holotoolkit requared .net backend, i think they used it at that time).
     

    Attached Files:

    • 1.PNG
      1.PNG
      File size:
      20 KB
      Views:
      457
  31. BenjaminBachman

    BenjaminBachman

    Joined:
    Feb 1, 2017
    Posts:
    29
    Can somebody tell me if DOTS works on HoloLens 2?
    I don't have a device yet but I believe it is ARM based.
     
  32. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Because we never supported managed jobs on .NET scripting backend. Back in 2018, this was a shiny new experimental feature and at the time .NET scripting backend was already deprecated. It would have required a lot of work to make it work and we deemed it unworthy of that time investment.

    It does if you use IL2CPP scripting backend.
     
  33. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    240
    Just tried with Burst 1.3.6 in Unity 2020.1.0b5 it compiles with default scene. But if use other features got:
    Burst.Backend.CompilerBackendException: Unable to find sleef function `Sleef_fmodd4_neon, Sleef_fmodd2_neon, Sleef_fmod_neon, Sleef_fmodd4_, Sleef_fmodd2_, Sleef_fmod_`
    at Burst.Bcl.BclApp.CompileAndLink(List`1 libraryCompilationRequests)
    at Burst.Bcl.Program.BuildTheThing(BclOptions options, Stopwatch& individualTimer)
    at Burst.Bcl.Program.Main(String[] args)
     
  34. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    300
    @CommunityUS I've verified that is a bug in Burst, we'll work on a fix. Thanks for finding this!
     
  35. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    240
    No problem! Do you need some sample code? One thing i found was playing with the settings. I could get the error to change. From listing these:
    `Sleef_fmodd4_neon, Sleef_fmodd2_neon, Sleef_fmod_neon, Sleef_fmodd4_, Sleef_fmodd2_, Sleef_fmod_`


    To these:
    Sleef_cinz_fastfmodd4_u3500neon, Sleef_cinz_fastfmodd2_u3500neon, Sleef_cinz_fastfmod_u3500neon, Sleef_cinz_fastfmodd4_u3500, Sleef_cinz_fastfmodd2_u3500, Sleef_cinz_fastfmod_u3500, Sleef_cinz_fmodd4_neon, Sleef_cinz_fmodd2_neon, Sleef_cinz_fmod_neon, Sleef_cinz_fmodd4_, Sleef_cinz_fmodd2_, Sleef_cinz_fmod_`


    Using different [BurstCompile(FloatPrecision.Low,FloatMode.Fast)] and [BurstCompile(CompileSynchronously = true)] settings seemed to change the error output. The later Burst 1.3.6 gave better error messages. But I think the problem has been around since 1.2.0 but that is a big assumption as specifics of the error were not given back then.