KybernetikGames / animancer

Documentation for the Animancer Unity Plugin.
65 stars 8 forks source link

Failed to build on ios #278

Closed sesky4 closed 1 year ago

sesky4 commented 1 year ago

Environment

Description

Works fine in editor. Build successfully for Windows/Mac/Linux. But failed to build for ios. The error message seems to be related with burst compiler, if i turn off burst compiler in Edit - Project Settings - Burst AOT Settings - Enable Burst Compilation, build will success

Library/Bee/artifacts/iOS/AsyncPluginsFromLinker: Failed to find entry-points:
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
Building Library/Bee/artifacts/iOS/AsyncPluginsFromLinker failed with output:
UnityEditor.Build.BuildFailedException: Burst compiler (1.8.4) failed running

stdout:
Overriding backend due to platform constraints : 'burst-llvm-10'
Error: Failed to find entry-points:
System.Exception: Unexpected exception while processing type `Animancer.AnimatedBool/Job` ---> System.Exception: The type `UnityEngine.Animations.ProcessAnimationJobStruct`1<Animancer.AnimatedBool/Job>` does not contain an `Execute` method
  at Burst.Compiler.IL.Server.EntryPointMethodFinder.FindEntryPoints (System.String[] rootAssemblyNames, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Server.ProfileDelegate profileCallback, System.Boolean includeRootAssemblyReferences, System.Boolean splitTargets) [0x00733] in <e897daa8366b4183b121ad602adf2292>:0 
   --- End of inner exception stack trace ---
  at Burst.Compiler.IL.Server.EntryPointMethodFinder.FindEntryPoints (System.String[] rootAssemblyNames, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Server.ProfileDelegate profileCallback, System.Boolean includeRootAssemblyReferences, System.Boolean splitTargets) [0x00837] in <e897daa8366b4183b121ad602adf2292>:0 
  at Burst.Compiler.IL.Server.FindMethodsJob.Execute (Burst.Compiler.IL.Server.CompilerServerJobExecutionContext context) [0x0011e] in <e897daa8366b4183b121ad602adf2292>:0 
stderr:

  at Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x00237] in ./Library/PackageCache/com.unity.burst@1.8.4/Editor/BurstAotCompiler.cs:1706 
  at Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x0004d] in ./Library/PackageCache/com.unity.burst@1.8.4/Editor/BurstAotCompiler.cs:1583 
  at Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x00001] in ./Library/PackageCache/com.unity.burst@1.8.4/Editor/BurstAotCompiler.cs:1558 
  at Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLsImpl (Unity.Burst.Editor.BurstAotCompiler+BurstAOTSettings settings, UnityEditor.Compilation.Assembly[] playerAssemblies) [0x00a3d] in ./Library/PackageCache/com.unity.burst@1.8.4/Editor/BurstAotCompiler.cs:706 
  at Unity.Burst.Editor.BurstAOTCompilerPostprocessor.DoGenerate (UnityEditor.Compilation.Assembly[] assemblies) [0x0001b] in ./Library/PackageCache/com.unity.burst@1.8.4/Editor/BurstAotCompiler.cs:265 
  at Unity.Burst.Editor.BurstAOTCompilerPostprocessor.GenerateNativePluginsForAssemblies (UnityEditor.Build.IGenerateNativePluginsForAssemblies+GenerateArgs args) [0x0008a] in ./Library/PackageCache/com.unity.burst@1.8.4/Editor/BurstAotCompiler.cs:179 
  at UnityEditor.Modules.BeeBuildPostprocessor.GenerateNativePluginsForAssemblies (PlayerBuildProgramLibrary.Data.GenerateNativePluginsForAssembliesArgs args) [0x00050] in /Users/bokken/buildslave/unity/build/Editor/Mono/Modules/BeeBuildPostprocessor.cs:605 
  at Bee.BeeDriver.BuildRequest+<>c__DisplayClass63_0`1[T].<RegisterRPCCallback>b__0 (System.Object o) [0x00000] in /Users/bokken/buildslave/unity/build/Tools/Bee/Bee.BeeDriver2/BuildRequest.cs:66 
  at Bee.BeeDriver.BeeDriver_RunBackend+<>c__DisplayClass1_0.<ProcessRPCRequest>b__0 () [0x00000] in /Users/bokken/buildslave/unity/build/Tools/Bee/Bee.BeeDriver2/BeeDriver_RunBackend.cs:88 
  at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <a44461766a7a46b18786ab80319cad08>:0 
  at System.Threading.Tasks.Task.Execute () [0x00000] in <a44461766a7a46b18786ab80319cad08>:0 
--- End of stack trace from previous location where exception was thrown ---

  at Bee.BeeDriver.BeeDriver_RunBackend.ProcessRPCRequest (Bee.BinLog.RPCActionMessage msg, Bee.BeeDriver.BuildRequest+RPCCallback rpcCallback, IPCConnection ipcConnection, System.Threading.Tasks.Task writePipeConnectionTask, Bee.BeeDriver.InternalState state) [0x000c9] in /Users/bokken/buildslave/unity/build/Tools/Bee/Bee.BeeDriver2/BeeDriver_RunBackend.cs:88 �a}
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

Reproduction

Steps to reproduce the bug:

  1. new empty unity 2D URP template project
  2. import animancer
  3. build for ios
  4. See the error in the Console.
KybernetikGames commented 1 year ago

Animancer.AnimatedBool/Job> does not contain an Execute method makes no sense because animation jobs don't need an Execute method, but you could try adding one (the AnimatedBool.cs script is in Assets\Plugins\Animancer\Utilities\Animation Jobs and the Job struct it's referring to is down the bottom).

Another possibility could be that Burst is getting confused because the Job struct is nested inside the generic AnimatedBool class, so try moving it outside.

Deleting that whole folder (and the Uneven Ground example) is also an option if you aren't using those classes.

Could you please also report this as a Unity bug? I can't because I don't have a Mac to replicate the issue with.

sesky4 commented 1 year ago

@KybernetikGames
thanks, i'm tracking this on https://forum.unity.com/threads/unity-2022-2-12-ios-build-fails-with-burst-1-8-4.1434031/

KybernetikGames commented 1 year ago

I'd recommend submitting an actual bug report via the Help menu in the Unity Editor.