Unable to find internal function `System.Environment::get_TickCount`

Hi! I am encountering this error in my ecs project. I can’t target this in code because it appears very randomly. But every time it occurs, there must be 47 errors. And the game seems not to be affected by these. Does anyone have any idea?

Unable to find internal function `System.Environment::get_TickCount`
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Burst.Compiler.IL.Jit.JitBurstInitializeUtility/<>c__DisplayClass5_0:<InvokeBurstInitializeFunction>b__0 (intptr)
Burst.Compiler.IL.Jit.JitBurstInitializeUtility:InvokeBurstInitializeFunction (intptr,string,intptr)
Burst.Compiler.IL.Client.CompilerClient/LoadedLibrary:EnsureInitialized (intptr)
Burst.Compiler.IL.Client.CompilerClient:CallCallback (Burst.Compiler.IL.Client.CompilerClient/RequestedFunctionPointer,Burst.Compiler.IL.Client.CompilerClient/LoadedFunctionPointer)
Burst.Compiler.IL.Client.CompilerClient:MakeFunctionPointersAvailable (Burst.Compiler.IL.Client.CompilerClient/LoadedLibrary)
Burst.Compiler.IL.Client.CompilerClient:OnLibraryCompiled (Burst.Compiler.IL.Server.CompilationMessage/Types/LibraryCompiledMessage)
Burst.Compiler.IL.Client.CompilerClient/<>c__DisplayClass59_0/<<ScheduleCompilation>b__0>d:MoveNext ()
System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1<bool>:SetResult (bool)
Grpc.Core.AsyncStreamReaderExtensions/<ReadAllAsyncCore>d__1`1<Burst.Compiler.IL.Server.CompilationMessage>:MoveNext ()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<bool>:SetResult (bool)
Burst.Compiler.IL.Server.InProcessServerStreamWriter`1/<MoveNext>d__11<Burst.Compiler.IL.Server.CompilationMessage>:MoveNext ()
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

Try looking around in the Burst Inspector. Are there any compilation units there that failed to compile?

Otherwise, are you using Environment.TickCount anywhere in your codebase?

1 Like

Hi! apkdev. I don’t see any of get_TickCount when I searched for this keyword in the vs code. How can I look at failed compilation in burst inspector? is it that the methods whose names failed to compile?

get_TickCount is the compiler-generated “getter” method for the TickCount property in the Environment class. (Hence you need to omit the get_ prefix when searching.) It’s also possible that you’re using the method indirectly via some other method, so it might not be easy to locate.

It may be easier to locate the failing compilation unit (job struct or Burst-compiled static method) using the Burst Inspector. Just go through the list and you should easily notice if any of the jobs contain an error instead of the actual output assembly. Here’s the docs: Burst Inspector window reference | Burst | 1.8.17

The Burst Inspector is convenient for verifying that your code has been compiled correctly and for checking out the actual compiler output. When working with Burst I like to open it periodically to make sure nothing weird is happening. (Ensuring that code is vectorized nicely, etc is weirdly addictive once you get used to it.)

I would add that the error you’re getting definitely looks unintuitive - more like an internal fault than a compilation error - and I hope Burst reports a more helpful description, complete with file/line info in a future version. It’s a weird error that I haven’t encountered myself, so I hope I’m not pointing you in a wrong direction.

2 Likes