Search Issue Tracker

Active

Votes

0

Found in

5.6.0b3

Issue ID

917343

Regression

No

IL2CPP crashes when two non-existing methods with same declaring types and parameter counts are referenced from a DLL

IL2CPP

-

-

Priority: 3Not yet prioritized for a release

-

Severity: 2No workaround

IL2CPP crashes when two non-existing methods with same declaring types and parameter counts are referenced from a DLL with this callstack:

IL2CPP error for method 'System.Void PlayMakerFSM::NetworkSyncVariables(UnityEngine.BitStream,HutongGames.PlayMaker.FsmVariables)' in D:\Projects\unity\Runtime\Export\Rect.cs:14
Additional information: Object reference not set to an instance of an object.
il2cpp.exe didn't catch exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Unity.IL2CPP.MethodSignatureWriter.CanDevirtualizeMethodCall(MethodDefinition method) in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\MethodSignatureWriter.cs:line 294
at Unity.IL2CPP.MethodSignatureWriter.NeedsHiddenMethodInfo(MethodReference method, MethodCallType callType, Boolean isConstructor) in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\MethodSignatureWriter.cs:line 309
at Unity.IL2CPP.MethodBodyWriter.CallExpressionFor(MethodReference callingMethod, MethodReference unresolvedMethodToCall, MethodCallType callType, List`1 poppedValues, Func`2 addUniqueSuffix, Boolean emitNullCheckForInvocation) in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\MethodBodyWriter.cs:line 2232
at Unity.IL2CPP.MethodBodyWriter.ProcessInstruction(Node node, InstructionBlock block, Instruction& ins) in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\MethodBodyWriter.cs:line 937
at Unity.IL2CPP.MethodBodyWriter.GenerateCodeRecursive(Node node) in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\MethodBodyWriter.cs:line 332
at Unity.IL2CPP.MethodBodyWriter.Generate() in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\MethodBodyWriter.cs:line 233
at Unity.IL2CPP.MethodWriter.WriteMethodBody(MethodReference method, CppCodeWriter methodBodyWriter, IRuntimeMetadataAccess metadataAccess, ISourceAnnotationWriter sourceAnnotationWriter, IIcallMappingService icallMapping, VTableBuilder vtableBuilder) in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\MethodWriter.cs:line 679
at Unity.IL2CPP.MethodWriter.<>c__DisplayClass0_0.<WriteMethodDefinition>b__0(CppCodeWriter bodyWriter, MetadataUsage metadataUsage, MethodUsage methodUsage) in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\MethodWriter.cs:line 69
at Unity.IL2CPP.MethodWriter.WriteMethodWithMetadataInitialization(CppCodeWriter writer, String methodSignature, String methodFullName, Action`3 writeMethodBody, String uniqueIdentifier) in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\MethodWriter.cs:line 169
at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(CppCodeWriter writer, MethodReference method, IMethodCollector methodCollector, IMethodVerifier methodVerifier, ISourceAnnotationWriter sourceAnnotationWriter, IIcallMappingService icallMapping, VTableBuilder vtableBuilder) in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\MethodWriter.cs:line 65
at Unity.IL2CPP.SourceWriter.WriteMethodSourceFiles(NPath outputDirectory, SourceWritingContext sourceWritingContext, String fileName, IEnumerable`1 typeList, IMethodCollector methodCollector, IInteropDataCollector interopDataCollector, Boolean writeMarshalingDefinitions) in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\SourceWriter.cs:line 294
at Unity.IL2CPP.SourceWriter.Write(NPath outputDir, SourceWritingContext sourceWritingContext, ReadOnlyCollection`1 assemblyDefinitions, IMethodCollector methodCollector, IInteropDataCollector interopDataCollector) in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\SourceWriter.cs:line 64
at Unity.IL2CPP.AssemblyConverter.Apply() in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\AssemblyConverter.cs:line 162
at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies(IEnumerable`1 assemblyDirectories, IEnumerable`1 explicitAssemblies, NPath outputDir, NPath dataFolder, NPath symbolsFolder) in D:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\AssemblyConverter.cs:line 58
at il2cpp.Program.DoRun(String[] args) in D:\Projects\unity\External\il2cpp\il2cpp\il2cpp\Program.cs:line 204
at il2cpp.Program.Run(String[] args) in D:\Projects\unity\External\il2cpp\il2cpp\il2cpp\Program.cs:line 103
at il2cpp.Program.Main(String[] args) in D:\Projects\unity\External\il2cpp\il2cpp\il2cpp\Program.cs:line 80

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.