Search Unity

Bug Burst fails to compile GLTFast

Discussion in 'Burst' started by Bunnyyyyy, Jun 6, 2023.

  1. Bunnyyyyy

    Bunnyyyyy

    Joined:
    Apr 17, 2023
    Posts:
    4
     
    [BurstCompile, MonoPInvokeCallback(typeof(GetIndexDelegate))]
    static int GetIndexValueUInt8(void* baseAddress, int index)
    { return *((byte*)baseAddress + index); }


    The method in question, Int32 GetIndexValueUInt8(Void*, Int32), is a function pointer defined within the GLTFast package, specifically within its Jobs functionality. Burst is unable to compile this method, which is causing the thrown exception.

    Burst version: 1.8.2
    GLTFast version: 5.0.0 or 5.0.4 (all encountered the same problem)
     
  2. Bunnyyyyy

    Bunnyyyyy

    Joined:
    Apr 17, 2023
    Posts:
    4
    Also I am wondering how to downgrade the version to Burst 1.6.6, I tried with changing manifest.json and packages-lock.json, but the version of Burst downloaded was still 1.8.2. I am using MacOS with M1 Pro chip if this information could be of some help.

    Look forward to reply! Thanks!
     
  3. Bunnyyyyy

    Bunnyyyyy

    Joined:
    Apr 17, 2023
    Posts:
    4
    Additional information: Unity environment is 2021.3.16f1, and cannot be upgraded due to some package limitation. Thanks!
     
  4. MarcoPersson

    MarcoPersson

    Unity Technologies

    Joined:
    Jul 21, 2021
    Posts:
    53
    Hi @Bunnyyyyy
    What compilation error do you get from Burst? And I does it persist if you upgrade Burst to 1.8.4?
     
  5. Bunnyyyyy

    Bunnyyyyy

    Joined:
    Apr 17, 2023
    Posts:
    4
    ------------------------------------------------------------------------------------------------------------------
    1. The errors come like this:

    ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
    Parameter name: subshaderIndex
    UnityEngine.Shader.FindSubshaderTagValue (System.Int32 subshaderIndex, UnityEngine.Rendering.ShaderTagId tagName) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Shaders/Shader.bindings.cs:98)
    UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.IsShaderGraphShader (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData) (at Library/PackageCache/com.unity.shadergraph@12.1.8/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:114)
    UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.StripUnused (UnityEditor.Rendering.BuiltIn.ShaderFeatures features, UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData, UnityEditor.Rendering.ShaderCompilerData compilerData) (at Library/PackageCache/com.unity.shadergraph@12.1.8/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:284)
    UnityEditor.Rendering.BuiltIn.ShaderPreprocessor.OnProcessShader (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippetData, System.Collections.Generic.IList`1[T] compilerDataList) (at Library/PackageCache/com.unity.shadergraph@12.1.8/Editor/Generation/Targets/BuiltIn/Editor/ShaderPreprocessor.cs:348)
    UnityEditor.Build.BuildPipelineInterfaces.OnPreprocessShaders (UnityEngine.Shader shader, UnityEditor.Rendering.ShaderSnippetData snippet, UnityEditor.Rendering.ShaderCompilerData[] data) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:490)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
    Building Library/Bee/artifacts/MacStandalonePlayerBuildProgram/Features/ReadyPlayerMe.AvatarLoader-FeaturesChecked.txt failed with output:
    Failed because this command failed to write the following output files:
    Library/Bee/artifacts/MacStandalonePlayerBuildProgram/Features/ReadyPlayerMe.AvatarLoader-FeaturesChecked.txt
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
    BuildFailedException: Incremental Player build failed!
    UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Modules/BeeBuildPostprocessor.cs:604)
    UnityEditor.OSXStandalone.OSXDesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/build/output/unity/unity/PlatformDependent/OSXPlayer/Extensions/Managed/OSXDesktopStandalonePostProcessor.cs:117)
    UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:28)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:370)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
    Build completed with a result of 'Failed' in 89 seconds (88599 ms)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
    UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ce] in /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPlayerWindowBuildMethods.cs:193
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPlayerWindowBuildMethods.cs:94
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)


    ------------------------------------------------------------------------------------------------------------------
    2. the package manager looks like this:
    I am wondering if it is because I am using 2021.3.16f1 that I am unable to upgrade Burst.
    So I am wondering if there is any chance to downgrade to Burst 1.6.6, if so, how to do that except changing packages-lock.json and manifest.json.

    upload_2023-6-12_11-30-39.png


    Many thanks ahead!!!!!!
     
  6. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    287
    @Bunnyyyyy what made you link that error to Burst? I don't see Burst mentioned anywhere in the error message.