Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

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:
    204
    Could you give us more details about the CPU used on your machine? (ideally CPU-Z report for supported CPU features)
     
  2. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,024
    Here's that info. Again, what's most weird is that it WAS working fine on this computer, but now crashes. Thanks!

    cpu.png
     
  3. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    35
    Would you be able to try to narrow down the job that is failing and post the assembler and IR from the inspector for the job in question?
     
  4. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,024
    Sure....how do I do that?

    The only thing we're using Burst for is Vegetation Studio Pro -- does that help?
     
  5. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,309
    Probably not there is 50+ jobs of most types IJob, IJobParallellFor, IJobParalellForBatch, filter, deferred etc doing calculations.

    Would not help narrow down the compiler issue.
     
  6. TheJavierD

    TheJavierD

    Joined:
    Jan 6, 2017
    Posts:
    18
    Hello,

    We were using Jobs/Burst in our Magic Leap (Lumin OS) project up until 2019.1

    After updating to 2019.2 it refuses to compile

    Lumin is Android based I thought, maybe you guys forgot to flip a switch?, It was working before as far as I understand, please don't take this away from us.

    the error is:

    BuildFailedException: Burst compiler (1.1.2) failed running

    Burst requires in order to build a standalone player for Lumin with ARMV8A_AARCH64
    NativeLinker is not supported for this platform

    Thanks!
     
    Last edited: Aug 5, 2019
  7. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,982
    FWIW, I started receiving the "Burst requires Visual Studio" error message today when building for Windows x86_64 Standalone. I've built successfully with Burst in my project for a year now, but started getting this error when building after updating from Windows 10 v1803 to Windows v1809 (The October 2018 Windows release.)

    I tried a few things (rebooting, downgrading Burst just in case it was an issue in the latest version), but I kept getting the error. Ultimately, based on advice in this thread, I fully uninstalled VS 2019 Community edition, and fully reinstalled it. That got my build working again. I included the "Desktop Development with c++" when reinstalling VS.

    What's a bit strange is that I'm pretty confident I had never installed "Desktop Development with c++" before when installing Visual Studio, yet it worked fine. Perhaps some changes between Windows 10 versions (1803 vs 1809) resulted in certain dependencies no longer being available on my machine, necessitating the "Desktop Development with c++" tools. I'm not sure.

    Anyway, in case anyone else hits this issue, in at least one case, fully reinstalling VS with "Desktop Development with c++" got me up and running again.
     
  8. Griz

    Griz

    Joined:
    Aug 27, 2013
    Posts:
    110
    Couldn't get the Burst 1.1.2 to compile with the Visual Studio 2017, even with it having all of the necessary modules installed.

    The problem got fixed when I've modified VS2019, which i've had around, to also have "Desktop Development with c++", though I haven't used it for Unity projects. Seems that burst checks only the newest installation of the VS for the requirements.
     
  9. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,070
    So in order to work with Burst you need VS? You can't use Burst with a different IDE like Jetbrains Rider?
    Oh and is it possible to use Burst now for Nintendo Switch?
     
  10. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    1,707
    No, I can use Rider fine. I actually recommend it as an editor. You just need to have a particular part of VS installed (which is easiest if you just install it with editor.)
     
  11. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    35
    Can you confirm which android ndk is being used? (Editor Preferences)
    Also which burst version ?
     
  12. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    35
    phobos2077 likes this.
  13. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,982
    Thanks for pointing out that table of toolchain requirements.

    I see that there's no macOS "Target Player Platform" associated with any Windows "Editor Host Platforms". Does that mean that in order to create a macOS build of a game that uses Burst, it's necessary to actually build it on Apple hardware, as it requires XCode to exist on the build machine? In which case, it's not possible to create a macOS build of the game on Windows hardware if "Mac Build Support (Mono)" is included as one of the installed Unity modules? If so, is that the long term plan, or is this a temporary issue? It seems pretty terrible if Burst is solely responsible for not being able to create macOS builds on Windows hardware. (Unless I've misunderstood the table you've linked.)
     
  14. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    24
  15. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    1,982
    Thanks, I'm glad I know that. I'll just planCome to think of it, I created a macOS build of my game some time ago, and it didn't fail to build. But looking over the Burst User Guide page linked above, it reads:

    So, I take it that the macOS Build I created would have generally worked, but it would have been as if I'd simply removed [BurstCompile] from all my jobs?
     
  16. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    35
    Correct
     
    dgoyette likes this.
  17. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    395
    Burst make build fail while it is disabled!

    upload_2019-8-15_14-12-38.png

    How to disable burst at all?
     
  18. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    35
    Hmm, that should work, under ProjectSettings there should be one or more BurstAotSettings_xxxx.json files, can you verify that value for disabled is true for the particular platform you are trying to compile for, e.g.

    "DisableBurstCompilation": true
     
    Jes28 likes this.
  19. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    35
    For those with SSE related crashes (@gecko & @xVergilx) - I've identified the cause of these issues, we have a fix, but i don't have an ETA on a new package yet.
     
    xVergilx likes this.
  20. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    395
    Yes that was the problem :)
    So Bug is Unity dont write into these files when you change inspector values (we Build linux standalone from windows).
    Only manual write to file actually help :)
     
  21. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    35
    I've logged an issue, but i`m wondering if its possible that you don't have the Lumin SDK installed? Prior to 2019.2 burst errors would not cause the build to fail, so its possible this was missed?
    I noticed Lumin is not specifically called out in our documentation for AOT requirements too, so I've made a note to get that updated too.
     
  22. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    395
    OK we will try out.
    Thanks for advice :)
    We definitely dont have Lumin SDK :)
     
  23. TheJavierD

    TheJavierD

    Joined:
    Jan 6, 2017
    Posts:
    18
    Thanks Lee!, if we could use Burst in Lumin OS it would be amazing!.

    Things are definitely properly configured for Lumin OS builds, in 2019.1 we had burst enabled and it appeared to work. Once we tried to update to 2019.2 it stopped letting us build just like I mentioned.

    We can still use the Job system in 2019.2 if we disable burst, but if it actually worked it would be super!.
     
  24. wobes

    wobes

    Joined:
    Mar 9, 2013
    Posts:
    677
  25. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    1,707
    Hmm I thought this was generally meant to work now and my generic systems/jobs seem to work fine for me with burst. Do you have a sample for the situation that is crashing? Platform? IL2CPP or mono?
     
    Last edited: Aug 20, 2019
  26. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    327
    The issue that json file does not be modified via project setting is very annoying. I hope that issue should be fixed soon.
     
  27. wobes

    wobes

    Joined:
    Mar 9, 2013
    Posts:
    677
    It is not crashing for me but it does not get compiled in standalone build just because T is unknown at compile time. So what happens is that Burst does not know that it should be compiled. A job is getting created by Activator through reflection but getting compiled in Editor just because Editor uses JIT, but to build a standalone Burst uses AOT compilation. I would want to somehow tell Burst that these jobs need to be burst compiled in AOT or have JIT support in standalone build.
     
    Last edited: Aug 20, 2019
  28. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    1,707
    Oh you're using Activator. Yeah that's a whole different pile of worms.
     
  29. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    598
    @wobes - have you tried registering the concrete implementations of the generic type? I believe this is required if T is related to generic component types. Have you tried using the Preserve attribute on the Jobs as well, to force them to not be stripped?

    See
    PreserveAttribute
    and
    RegisterGenericComponentTypeAttribute
     
  30. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    1,707
    I don't think stripping is the issue, it has to be explicitly defined at compile time so that burst can compile it.

    RegisterGenericComponentTypeAttribute only works for generic unity components and simply adds them to the type manager.

    Code (CSharp):
    1.  
    2. // Register ComponentData concrete generics
    3. foreach (var registerGenericComponentTypeAttribute in
    4.    assembly.GetCustomAttributes<RegisterGenericComponentTypeAttribute>())
    5. {
    6.    var type = registerGenericComponentTypeAttribute.ConcreteType;
    7.  
    8.    if (typeof(IComponentData).IsAssignableFrom(type) ||
    9.        typeof(ISharedComponentData).IsAssignableFrom(type) ||
    10.        typeof(IBufferElementData).IsAssignableFrom(type))
    11.    {
    12.        componentTypeSet.Add(type);
    13.    }
    14. }
    15.  
    If he simply inherited the systems instead of using Activator it'd work fine as well but it sounds like he wants to dynamically create systems using activator which just isn't supported (and I suspect might never be supported.)
     
    Last edited: Aug 20, 2019
    wobes likes this.
  31. Soaryn

    Soaryn

    Joined:
    Apr 17, 2015
    Posts:
    210
    EDIT: I have managed to resolve my issue, but I had to manually install the Windows 10 SDK. That seems a little inconsistent with the rest of Unity, so hopefully that will be resolved later?

    It would seem I am having an issue with the "Burst requires Visual Studio" as well.
    Version: Unity 2019.3.0a11
    Build Target: Windows

    Attempted adding the module via the unity Hub, but the window flashes up then closes, so no conclusion if it actually installed.

    Visual studio 2019 is installed, though I use Rider for my development.
     
    Last edited: Aug 21, 2019
  32. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    204
    Burst does not support today to have generic abstraction around job.schedule, so all jobs scheduled need to have an explicit usage of their type.
     
  33. DongJoy

    DongJoy

    Joined:
    Jan 25, 2018
    Posts:
    1
    May you tell me when support Accuracy/Precision?
     
  34. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    204
    Not sure to fully understand the question but have you checked the documentation about FloatPrecision and FloatMode?
     
  35. wechat_os_Qy0_X1ITy6VrZHYPJFd58JGlA

    wechat_os_Qy0_X1ITy6VrZHYPJFd58JGlA

    Joined:
    Nov 15, 2018
    Posts:
    57
    Hi,

    When I use Burst 0.2.4-preview.23 to compile. These errors occurred. Can you give me some threads?

     
  36. GaryT_01000111

    GaryT_01000111

    Joined:
    Aug 4, 2017
    Posts:
    2
    Hi
    I tried building using burst but it doesn't build.

    The console shows "BuildFailedException: Burst compiler (1.1.2) failed running"
     
  37. GaryT_01000111

    GaryT_01000111

    Joined:
    Aug 4, 2017
    Posts:
    2
    Never mind that, it was because the windows username has a space. Tried it on another machine and it worked.
    Any way I can have it work with the space? I don't want to change the username as it's a shared laptop and I don't want to mess with other's things.
     
  38. wechat_os_Qy0_X1ITy6VrZHYPJFd58JGlA

    wechat_os_Qy0_X1ITy6VrZHYPJFd58JGlA

    Joined:
    Nov 15, 2018
    Posts:
    57
    When I updated the the Burst and ECS, this error has gone.
     
  39. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    25
    We fixed this bug recently - the fix will be in the next 1.2 preview release, which will hopefully be out later this week.