Cpp2IL
Cpp2IL copied to clipboard
Potential null type in dummy assembly attribute construction
Seen on a V29 game, specifically "Kill The King" by Quantum Lion Labs.
Stacktrace:
Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: il2CppType
at Cpp2IL.Core.Utils.AsmResolverUtils.GetTypeSignatureFromIl2CppType(ModuleDefinition module, Il2CppType il2CppType) in C:\Users\Sam\RiderProjects\Cpp2IL\Cpp2IL.Core\Utils\AsmResolverUtils.cs:line 114
at Cpp2IL.Core.Utils.AsmResolverAssemblyPopulator.FromAnalyzedAttributeArgument(AssemblyDefinition parentAssembly, BaseCustomAttributeParameter parameter) in C:\Users\Sam\RiderProjects\Cpp2IL\Cpp2IL.Core\Utils\AsmResolverAssemblyPopulator.cs:line 108
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at AsmResolver.DotNet.Signatures.CustomAttributeSignature..ctor(IEnumerable`1 fixedArguments, IEnumerable`1 namedArguments)
at Cpp2IL.Core.Utils.AsmResolverAssemblyPopulator.CopyCustomAttributes(HasCustomAttributes source, IList`1 destination) in C:\Users\Sam\RiderProjects\Cpp2IL\Cpp2IL.Core\Utils\AsmResolverAssemblyPopulator.cs:line 139
at Cpp2IL.Core.Utils.AsmResolverAssemblyPopulator.PopulateCustomAttributes(AssemblyAnalysisContext asmContext) in C:\Users\Sam\RiderProjects\Cpp2IL\Cpp2IL.Core\Utils\AsmResolverAssemblyPopulator.cs:line 171
at Cpp2IL.Core.Utils.MiscUtils.<>c__DisplayClass13_0`1.<ExecuteParallel>b__0(T t) in C:\Users\Sam\RiderProjects\Cpp2IL\Cpp2IL.Core\Utils\MiscUtils.cs:line 262
at System.Linq.Parallel.PartitionedDataSource`1.ListContiguousIndexRangeEnumerator.MoveNext(T& currentElement, Int32& currentKey)
at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
at System.Linq.Parallel.SpoolingTaskBase.Work()
at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
at System.Linq.Parallel.MergeExecutor`1.Execute[TKey](PartitionedStream`2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId)
at System.Linq.Parallel.PartitionedStreamMerger`1.Receive[TKey](PartitionedStream`2 partitionedStream)
at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
at System.Linq.Parallel.QueryOperator`1.GetOpenedEnumerator(Nullable`1 mergeOptions, Boolean suppressOrder, Boolean forEffect, QuerySettings querySettings)
at System.Linq.Parallel.QueryOpeningEnumerator`1.OpenQuery()
at System.Linq.Parallel.QueryOpeningEnumerator`1.MoveNext()
at System.Linq.ParallelEnumerable.ToList[TSource](ParallelQuery`1 source)
at Cpp2IL.Core.CorePlugin.AsmResolverDummyDllOutputFormat.DoOutput(ApplicationAnalysisContext context, String outputRoot) in C:\Users\Sam\RiderProjects\Cpp2IL\Cpp2IL.Core\CorePlugin\AsmResolverDummyDllOutputFormat.cs:line 48
at Cpp2IL.Program.MainWithArgs(Cpp2IlRuntimeArgs runtimeArgs) in C:\Users\Sam\RiderProjects\Cpp2IL\Cpp2IL\Program.cs:line 340
at Cpp2IL.Program.Main(String[] args) in C:\Users\Sam\RiderProjects\Cpp2IL\Cpp2IL\Program.cs:line 268
Stack implies an Enum parameter with either null enum type or null underlying primitive type.
Note that some cleanup to this code has been implemented in 454c729bda1f5df720357871308fe8bae93fddfc, which may have reduced the issue.