djkaty / Il2CppInspector

Powerful automated tool for reverse engineering Unity IL2CPP binaries
http://www.djkaty.com
GNU Affero General Public License v3.0
2.62k stars 433 forks source link

System.AggregateException: One or more errors occurred. (startIndex cannot be larger than length of string. (Parameter 'startIndex')) #171

Open cj-CM opened 3 years ago

cj-CM commented 3 years ago

Hi djkaty! I'm trying to use this tool but am getting a startIndex cannot be larger than length of string error.

The global-metadata.dat and libil2cpp.so files are here.

Thanks for all your hard work!

Il2CppInspector Command-Line Edition
Version 2021.1
(c) 2017-2021 Katy Coe - www.djkaty.com - www.github.com/djkaty

Using plugin: IL2CPP API Discovery
Using plugin: Binary metadata field order deobfuscator
Using plugin: Metadata strings XOR decryptor
Using plugin: Binary file XOR decryptor
Detected metadata version 24.4
Processed 582448 relocations
Plugin Binary file XOR decryptor: Detecting encryption
Container format: ELF
Container endianness: Little
Architecture word size: 32-bit
Instruction set: ARM
Global offset: 0x0000000000000000
Symbol table(s) found with 2600 entries
No matches in symbol table
Required structures acquired from code heuristics. Initialization function: 0x00000000004A5840
CodeRegistration struct found at 0x000000000282EA1C (file offset 0x0282DA1C)
MetadataRegistration struct found at 0x000000000282EB64 (file offset 0x0282DB64)
IL2CPP binary version 24.4
Analyze IL2CPP data: 5.30 sec
Processing image 0 - ARM / 32-bit
Create .NET type model: 2.05 sec
IL2CPP API discovery was successful
Selected Unity version(s) 2019.4.15 - 2019.4.18 (types: 2019.4.15 - 2019.4.18, APIs: 2019.4.0 - 2019.4.99)
Create C++ application model: 8.33 sec
Unhandled exception. System.AggregateException: One or more errors occurred. (startIndex cannot be larger than length of string. (Parameter 'startIndex'))
 ---> System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string. (Parameter 'startIndex')
   at System.String.Substring(Int32 startIndex, Int32 length)
   at Il2CppInspector.Reflection.TypeInfo.getScopedFullName(Scope scope)
   at Il2CppInspector.Reflection.TypeInfo.GetScopedCSharpName(Scope usingScope, Boolean omitRef, Boolean isPartOfTypeDeclaration)
   at Il2CppInspector.Reflection.TypeInfo.GetScopedCSharpName(Scope usingScope, Boolean omitRef, Boolean isPartOfTypeDeclaration)
   at Il2CppInspector.Outputs.CSharpCodeStubs.generateType(TypeInfo type, IEnumerable`1 namespaces, String prefix)
   at System.Linq.Enumerable.SelectArrayIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Text.StringBuilder.AppendJoinCore[T](Char* separator, Int32 separatorLength, IEnumerable`1 values)
   at System.Text.StringBuilder.AppendJoin[T](String separator, IEnumerable`1 values)
   at Il2CppInspector.Outputs.CSharpCodeStubs.generateType(TypeInfo type, IEnumerable`1 namespaces, String prefix)
   at Il2CppInspector.Outputs.CSharpCodeStubs.<>c__DisplayClass30_0.<writeFile>b__4(TypeInfo type, ParallelLoopState _, Dictionary`2 dict)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass44_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass44_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
   at System.Threading.Tasks.TaskReplicator.Replica`1.ExecuteAction(Boolean& yieldedBeforeCompletion)
   at System.Threading.Tasks.TaskReplicator.Replica.Execute()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure)
   at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source)
   at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException)
   at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEach[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Func`1 localInit, Func`4 body, Action`1 localFinally)
   at Il2CppInspector.Outputs.CSharpCodeStubs.writeFile(String outFile, IEnumerable`1 types, Boolean useNamespaceSyntax, Boolean outputAssemblyAttributes)
   at Il2CppInspector.Outputs.CSharpCodeStubs.WriteSingleFile[TKey](String outFile, Func`2 orderBy)
   at Il2CppInspector.CLI.App.Run(Options options)
   at Il2CppInspector.CLI.App.<>c.<Main>b__7_1(Options options)
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at Il2CppInspector.CLI.App.Main(String[] args)
Generate C# code: 3.55 sec