Search Unity

  1. Unity 2020.2 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Bug [Burst] Could not find `burst.initialize`

Discussion in 'Data Oriented Technology Stack' started by iamarugin, Nov 30, 2020.

  1. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    569
    Unity 2020.1.12
    Burst 1.4.1

    Sometimes I get the following error in the console during play mode:

    Code (CSharp):
    1. Unexpected exception System.InvalidOperationException: Could not find `burst.initialize` function in library '7FFCF38A0000' ---> System.InvalidOperationException: Unable to load function entry `burst.initialize`
    2.   at Burst.Backend.UnmanagedLibrary+WindowsUnmanagedLibrary.GetFunctionByName (System.IntPtr libraryHandle, System.String functionName) [0x00025] in <004b2bef11fb4c94aedd2162289437e6>:0
    3.   at Burst.Backend.UnmanagedLibrary.GetFunctionByName (System.IntPtr libraryHandle, System.String functionName) [0x00000] in <004b2bef11fb4c94aedd2162289437e6>:0
    4.   at Burst.Compiler.IL.Jit.JitCacheLibraryManager.CallBurstInitializeFunction (System.IntPtr libraryPtr, Burst.Compiler.IL.Jit.GetExternalFunctionPointerDelegate getExternalFunctionPointer) [0x00062] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    5.    --- End of inner exception stack trace ---
    6.   at Burst.Compiler.IL.Jit.JitCacheLibraryManager.CallBurstInitializeFunction (System.IntPtr libraryPtr, Burst.Compiler.IL.Jit.GetExternalFunctionPointerDelegate getExternalFunctionPointer) [0x000c5] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    7.   at Burst.Compiler.IL.Jit.JitCacheLibraryManager+<>c__DisplayClass7_2.<TryGetOrLoadLibrary>b__1 () [0x00000] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    8.   at Burst.Compiler.IL.Jit.JitCacheMethodValue.GetCachedPtrForAssemblies (System.Boolean ensureBurstInitializeHasBeenCalled, System.IntPtr& cachedPtr) [0x0004c] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    9.   at Burst.Compiler.IL.Jit.JitCompiler.CompileMethods (Mono.Cecil.MethodReference[] methodReferences, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x0027a] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    10.   at Burst.Compiler.IL.Jit.JitCompiler.CompileMethod (Mono.Cecil.MethodReference methodReference, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x0001c] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    11.   at Burst.Compiler.IL.Jit.JitCompilerService+CompilerThreadContext.Compile (Burst.Compiler.IL.Jit.JitCompilerService+CompileJob job) [0x00468] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    12.  
    13. While compiling job: System.Void Unity.Jobs.IJobExtensions/JobStruct`1<Space.BodyRaycastSystem/Space.<>c__DisplayClass_OnUpdate_LambdaJob1>::Execute(T&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)
    14. at <empty>:line 0
    15.  
    After that if I try to close unity it get stuck.
    It looks like it appears pretty random, but I think it always related to recompilation of Burst code.
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    2,687
    not related to 2020.1 as this also happens in 19.4 with burst 1.4.1 and entities 0.11 as well.

    i'm assuming it's a burst issue.

    Burst 1.4.2 just came out today, hoping it fixes it (haven't tested yet)
     
  3. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    113
    We'd need a repro if we have any hope of solving this. As @tertle says, trying Burst 1.4.2 as a first step is a good shout!
     
  4. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    2,687
    We updated to 1.4.2 today and it seems to have solved it. Should be able to confirm tomorrow.
     
    Last edited: Dec 1, 2020
    sheredom likes this.
  5. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    569
    Oops, this post should be in DOTS forum, not in 2020.2 beta. Sorry about that.
     
  6. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    569
    Issue still persist in 1.4.2
    If I will find stable reproducable, I will open the case and let you know.
     
    sheredom likes this.
  7. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    569
    upload_2020-12-2_18-18-4.png
    A little more info: this happens immediately after that exception
    After reopening Unity everything works as expected
     
  8. reshen817

    reshen817

    Joined:
    Sep 9, 2012
    Posts:
    1
    As a temporary workaround, restarting Unity fixes it.

    In Unity 2020.1.15f1 Personal.

    Here's a stack trace for when it occurs on my machine:

    Code (CSharp):
    1. Unexpected exception System.InvalidOperationException: Could not find `burst.initialize` function in library '7FF9CB120000' ---> System.InvalidOperationException: Unable to load function entry `burst.initialize`
    2.   at Burst.Backend.UnmanagedLibrary+WindowsUnmanagedLibrary.GetFunctionByName (System.IntPtr libraryHandle, System.String functionName) [0x00025] in <004b2bef11fb4c94aedd2162289437e6>:0
    3.   at Burst.Backend.UnmanagedLibrary.GetFunctionByName (System.IntPtr libraryHandle, System.String functionName) [0x00000] in <004b2bef11fb4c94aedd2162289437e6>:0
    4.   at Burst.Compiler.IL.Jit.JitCacheLibraryManager.CallBurstInitializeFunction (System.IntPtr libraryPtr, Burst.Compiler.IL.Jit.GetExternalFunctionPointerDelegate getExternalFunctionPointer) [0x00062] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    5.    --- End of inner exception stack trace ---
    6.   at Burst.Compiler.IL.Jit.JitCacheLibraryManager.CallBurstInitializeFunction (System.IntPtr libraryPtr, Burst.Compiler.IL.Jit.GetExternalFunctionPointerDelegate getExternalFunctionPointer) [0x000c5] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    7.   at Burst.Compiler.IL.Jit.JitCacheLibraryManager+<>c__DisplayClass7_2.<TryGetOrLoadLibrary>b__1 () [0x00000] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    8.   at Burst.Compiler.IL.Jit.JitCacheMethodValue.GetCachedPtrForAssemblies (System.Boolean ensureBurstInitializeHasBeenCalled, System.IntPtr& cachedPtr) [0x0004c] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    9.   at Burst.Compiler.IL.Jit.JitCompiler.CompileMethods (Mono.Cecil.MethodReference[] methodReferences, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x0027a] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    10.   at Burst.Compiler.IL.Jit.JitCompiler.CompileMethod (Mono.Cecil.MethodReference methodReference, Burst.Compiler.IL.Jit.JitOptions jitOptions) [0x0001c] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    11.   at Burst.Compiler.IL.Jit.JitCompilerService+CompilerThreadContext.Compile (Burst.Compiler.IL.Jit.JitCompilerService+CompileJob job) [0x00468] in <991cfc0e5dc843b2a9bb6d6c2e81a171>:0
    12.  
    13. While compiling job: System.Void Unity.Entities.JobChunkExtensions/JobChunkProducer`1<DOTS.Systems.FuelUsageSystem/DOTS.Systems.<>c__DisplayClass_OnUpdate_LambdaJob0>::Execute(Unity.Entities.JobChunkExtensions/JobChunkWrapper`1<T>&,System.IntPtr,System.IntPtr,Unity.Jobs.LowLevel.Unsafe.JobRanges&,System.Int32)
    14. at <empty>:line 0
    15.  
     
    BigRookGames likes this.
unityunity