knah / Il2CppAssemblyUnhollower

A tool to generate Managed->IL2CPP proxy assemblies
GNU Lesser General Public License v3.0
499 stars 88 forks source link

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. #90

Closed shacha086 closed 2 years ago

shacha086 commented 2 years ago

AssemblyUnhollower.exe --input=C:\Users\acer\Downloads\cpp2il_out --output=C:\Users\acer\Downloads\unhollower_out --system-libs="D:\SteamLibrary\steamapps\common\Muse Dash\MelonLoader\Managed" Reading assemblies... Done in 00:00:00.0462589 Reading system assemblies... Done in 00:00:00.0641200 Creating rewrite assemblies... Done in 00:00:00.0085166 Computing renames... Done in 00:00:00.0580960 Creating typedefs... Done in 00:00:00.0474784 Computing struct blittability... Done in 00:00:00.0225192 Filling typedefs... Done in 00:00:00.0252629 Filling generic constraints... Done in 00:00:00.0027341 Creating members... Done in 00:00:01.1701857 Scanning method cross-references... Done in 00:00:00.0022779 Finalizing method declarations... Done in 00:00:02.3403118 0 total potentially dead methods Filling method parameters... Done in 00:00:00.2061195 Creating static constructors... Done in 00:00:00.7240450 Creating value type fields... Done in 00:00:00.1959199 Creating enums... Done in 00:00:00.0676022 Creating IntPtr constructors... Done in 00:00:00.0438754 Creating type getters... Done in 00:00:00.0763673 Creating non-blittable struct constructors... Done in 00:00:00.0257452 Creating generic method static constructors... Done in 00:00:00.0404164 Creating field accessors... Done in 00:00:00.8504732 Filling methods... Done in 00:00:01.2348759 Generating implicit conversions... Done in 00:00:00.0712164 Creating properties...

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at AssemblyUnhollower.Passes.Pass70GenerateProperties.DoPass(RewriteGlobalContext context) at AssemblyUnhollower.Program.Main(UnhollowerOptions options) at AssemblyUnhollower.Program.Main(String[] args) Done in 00:00:03.0288213

Game name: Muse dash 64-bit executable dummy dll with Cpp2IL

shacha086 commented 2 years ago

the exception changed after using Il2CppDumper.

This is not duplicated with #48, #62 and #77, because I used the melon loader's mscorlib assembly.

AssemblyUnhollower.exe --input="C:\Users\acer\Downloads\Il2CppDumper-net6-v6.7.25\DummyDll" --output=C:\Users\acer\Downloads\unhollower_out --system-libs="D:\SteamLibrary\steamapps\common\Muse Dash\MelonLoader\Managed" Reading assemblies... Done in 00:00:00.0542315 Reading system assemblies... Done in 00:00:00.0679220 Creating rewrite assemblies... Done in 00:00:00.0086740 Computing renames...

Unhandled Exception: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters) at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name) at Mono.Cecil.MetadataResolver.Resolve(TypeReference type) at Mono.Cecil.TypeReference.Resolve() at AssemblyUnhollower.Passes.Pass05CreateRenameGroups.NameOrRename(TypeReference typeRef, RewriteGlobalContext context) at AssemblyUnhollower.Passes.Pass05CreateRenameGroups.GenericNameToStrings(TypeReference typeRef, RewriteGlobalContext context) at AssemblyUnhollower.Passes.Pass05CreateRenameGroups.GetUnobfuscatedNameBase(RewriteGlobalContext context, TypeDefinition typeDefinition, Boolean allowExtraHeuristics) at AssemblyUnhollower.Passes.Pass05CreateRenameGroups.ProcessType(RewriteGlobalContext context, TypeDefinition originalType, Boolean allowExtraHeuristics) at AssemblyUnhollower.Passes.Pass05CreateRenameGroups.ProcessType(RewriteGlobalContext context, TypeDefinition originalType, Boolean allowExtraHeuristics) at AssemblyUnhollower.Passes.Pass05CreateRenameGroups.ProcessType(RewriteGlobalContext context, TypeDefinition originalType, Boolean allowExtraHeuristics) at AssemblyUnhollower.Passes.Pass05CreateRenameGroups.DoPass(RewriteGlobalContext context) at AssemblyUnhollower.Program.Main(UnhollowerOptions options) at AssemblyUnhollower.Program.Main(String[] args) Done in 00:00:03.9046784

shacha086 commented 2 years ago

duplicated with #12