Search Issue Tracker

Fixed in 1.4.2

Votes

0

Found in [Package]

1.4.1

Issue ID

1287777

Regression

No

Burst fails to compile when code is wrapped in #if UNITY_SERVER and UNITY_SERVER is defined in asmdef file

Package: Burst

-

How to reproduce:
1. Open the user's attached project("Burst_UnityServerError.zip")
2. Make sure "Server Build" is enabled
2. Build And Run

Expected results: No InvalidOperationException is thrown and "val:0" is displayed
Acutal results: InvalidOperationException is thrown because Burst fails to compile

Reproducible with: 2019.4.14f1, 2020.1.11f1, 2020.2.0b10, 2021.1.0a4 (Burst 1.3.9 - 1.4.1)
Could not test with: 2018.4.28f1 (Couldn't downgrade)

Notes:
1. Doesn't compile even though EditorUserBuildSettings.enableHeadlessMode=true
2. Reproduces with IL2CPP too

Exception:
InvalidOperationException: Burst failed to compile the function pointer `Void SubParam(Int32 ByRef, Int32)`
at Unity.Burst.BurstCompiler.Compile[T] (T delegateObj, System.Boolean isFunctionPointer) [0x000fa] in <be49e0ec220242af845365f14ed5122b>:0
at Unity.Burst.BurstCompiler.CompileFunctionPointer[T] (T delegateMethod) [0x00000] in <be49e0ec220242af845365f14ed5122b>:0
at TestForJob.TestBurst () [0x00002] in <9f228c1e5b0f4137bd54bf9c2e24afa7>:0
at BurstTest.Start () [0x00000] in <9f228c1e5b0f4137bd54bf9c2e24afa7>:0

  1. Resolution Note (fix version 1.4.2):

    Fixed in Burst 1.4.2 which is available in Unity 2018.4 and above

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.