0
Declined

IL2CPP erro

zhang kang 4 months ago updated by Support 4 months ago 4

Exception: IL2CPP error for method 'UnityEngine.Quaternion game4automation.IKCalculator::(UnityEngine.Quaternion)' in assembly 'D:\ZhangKang\IA_dev\Temp\StagingArea\Data\Managed\ikcalculator.dll'

System.NullReferenceException: Object reference not set to an instance of an object.

my unity version is 2020.3.33。 I've been dealing with this problem for too long and don't know what to do。please help me

Exception: IL2CPP error for method 'UnityEngine.Quaternion game4automation.IKCalculator::(UnityEngine.Quaternion)' in assembly 'D:\ZhangKang\IA_dev\Temp\StagingArea\Data\Managed\ikcalculator.dll'

System.NullReferenceException: Object reference not set to an instance of an object.

at Unity.Cecil.Awesome.CFG.ControlFlowGraphBuilder.ConnectBlock(InstructionBlock block)

at Unity.Cecil.Awesome.CFG.ControlFlowGraphBuilder.ConnectBlocks()

at Unity.Cecil.Awesome.CFG.ControlFlowGraphBuilder.CreateGraph()

at Unity.IL2CPP.MethodBodyWriter..ctor(MethodWriteContext context, IGeneratedMethodCodeWriter writer, IRuntimeMetadataAccess metadataAccess)

at Unity.IL2CPP.MethodWriter.WriteMethodBody(MethodWriteContext context, IGeneratedMethodCodeWriter methodBodyWriter, IRuntimeMetadataAccess metadataAccess)

at Unity.IL2CPP.CodeWriters.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, String methodFullName, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef)

at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(AssemblyWriteContext context, IGeneratedMethodCodeWriter writer, MethodReference method, Boolean addToMethodCollection)

at Unity.IL2CPP.SourceWriter.WriteType(SourceWritingContext context, IGeneratedMethodCodeWriter writer, TypeReference type, NPath filePath, Boolean writeMarshalingDefinitions, Boolean addToMethodCollection)

at Unity.IL2CPP.SourceWriters.TypeMethodsSourceWriter.WriteItem(SourceWritingContext context, IGeneratedMethodCodeWriter writer, TypeDefinition item, NPath filePath)

at Unity.IL2CPP.SourceWriters.SourceWriterBase`1.WriteItem(StreamWorkItemData`2 data)

at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`2.WorkerWriteItemsToFile(WorkItemData`2 data)

at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)

UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at :0)

UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at :0)

UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) (at :0)

UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at :0)

UnityEditorInternal.IL2CPPBuilder.Run () (at :0)

UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at :0)

DesktopStandalonePostProcessor.RunIL2CPP (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, System.Collections.Generic.List`1[T] cppPlugins) (at :0)

DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) (at :0)

DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at :0)

Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.

DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at :0)

UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :0)

UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, 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 :0)

UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)

HybridCLR.Editor.Commands.StripAOTDllCommand:GenerateStripedAOTDlls(BuildTarget) (at Library/PackageCache/com.code-philosophy.hybridclr@e5a6952777/Editor/Commands/StripAOTDllCommand.cs:144)

HybridCLR.Editor.Commands.PrebuildCommand:GenerateAll() (at Library/PackageCache/com.code-philosophy.hybridclr@e5a6952777/Editor/Commands/PrebuildCommand.cs:32)

the reason of error is what i choose the hybirdclr/ generate/all 

+1
Under review

Hi, we don't know HybridCLR. But it seems that it makes changes to Unitys il2cpp code. Our ikcalculator is encrypted and this might be the reason that there are issues. Might be very difficult on our side to support HybridCLR which is a very special setup.