Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsmResolver fails during type lookups in BTD6 #384

Closed
yeah-its-gloria opened this issue Dec 2, 2024 · 1 comment
Closed

AsmResolver fails during type lookups in BTD6 #384

yeah-its-gloria opened this issue Dec 2, 2024 · 1 comment

Comments

@yeah-its-gloria
Copy link
Contributor

yeah-its-gloria commented Dec 2, 2024

Cpp2IL currently fails an assert while trying to process Bloons TD 6's GameAssembly.

// ...
[Verb] [DllOutput] Adding fields, methods, properties, and events (in parallel)...Process terminated. Assertion failed.
   at Cpp2IL.Core.Utils.AsmResolver.AsmResolverUtils.InternalTryLookupTypeSignatureByName(String name, ReadOnlySpan`1 genericParameterNames) in (...)/Cpp2IL.Core/Utils/AsmResolver/AsmResolverUtils.cs:line 274
   at Cpp2IL.Core.Utils.AsmResolver.AsmResolverUtils.InternalTryLookupTypeSignatureByName(String name, ReadOnlySpan`1 genericParameterNames) in (...)/Cpp2IL.Core/Utils/AsmResolver/AsmResolverUtils.cs:line 290
   at Cpp2IL.Core.Utils.AsmResolver.AsmResolverUtils.TryLookupTypeSignatureByName(String name, ReadOnlySpan`1 genericParameterNames) in (...)/Cpp2IL.Core/Utils/AsmResolver/AsmResolverUtils.cs:line 244
   at Cpp2IL.Core.Utils.AsmResolver.AsmResolverAssemblyPopulator.InferExplicitInterfaceImplementations(TypeDefinition type, ReferenceImporter importer) in (...)/Cpp2IL.Core/Utils/AsmResolver/AsmResolverAssemblyPopulator.cs:line 576
   at Cpp2IL.Core.Utils.AsmResolver.AsmResolverAssemblyPopulator.InferExplicitInterfaceImplementations(AssemblyAnalysisContext asmContext) in (...)/Cpp2IL.Core/Utils/AsmResolver/AsmResolverAssemblyPopulator.cs:line 547
   at Cpp2IL.Core.Utils.MiscUtils.<>c__DisplayClass14_0`1.<ExecuteParallel>g__F2|0(T t) in (...)/Cpp2IL.Core/Utils/MiscUtils.cs:line 242
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorResults.GetElement(Int32 index)
   at System.Linq.Parallel.QueryResults`1.get_Item(Int32 index)
   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.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()

The offending type in question is System.Collections.Generic.IEnumerator<NinjaKiwi.Common.ResourceUtils.AssetLibrary<T>.Entry>, where .Entry ends up inside the parsed type's Suffix, causing the assert to fail.

@ds5678
Copy link
Contributor

ds5678 commented Mar 8, 2025

Resolved by #414

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants