colinator27 / DogScepter

A work-in-progress modding tool geared toward UNDERTALE/DELTARUNE
MIT License
45 stars 15 forks source link

DogScepter crashing when code chunk cannot be found for GMS2 games #47

Open Miepee opened 2 years ago

Miepee commented 2 years ago

This most notably happens for YYC games. Stack trace is similar to this:

ystem.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) (Object reference not set to an instance of an object.) (Object reference not set to an instance of an object.) (Obje
ct reference not set to an instance of an object.) (Object reference not set to an instance of an object.) (Object reference not set to an instance of an object.) (Object reference not set to an instance of an object.) (Object re
ference not set to an instance of an object.) (Object reference not set to an instance of an object.) (Object reference not set to an instance of an object.) (Object reference not set to an instance of an object.) (Object referen
ce not set to an instance of an object.) (Object reference not set to an instance of an object.)
    System.NullReferenceException: Object reference not set to an instance of an object.
      at DogScepterLib.Project.GML.Decompiler.DecompileCache.<>c__DisplayClass2_0.<.ctor>b__0(Int32 scr) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Project\GML\Decompiler\DecompileContext.cs:32
      at System.Threading.Tasks.Parallel.<>c__DisplayClass33_0`2.<ForEachWorker>b__0(Int32 i)
      at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
      at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
      at System.Threading.Tasks.TaskReplicator.Replica.Execute()
  at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure)
  at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)

  at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException)
  at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)

  at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IList`1 list, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWit
hEverything, 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](IEnumerable`1 source, Action`1 body)
  at DogScepterLib.Project.GML.Decompiler.DecompileCache..ctor(ProjectFile pf) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Project\GML\Decompiler\DecompileContext.cs:30
  at DogScepterCLI.Commands.DumpCommand.ExecuteAsync(IConsole console) in C:\Users\narr\gitrepos\dog-scepter\DogScepterCLI\Commands\DumpCommand.cs:174
  at CliFx.CliApplication.RunAsync(ApplicationSchema applicationSchema, CommandInput commandInput) in D:\a\CliFx\CliFx\CliFx\CliApplication.cs:147
  at CliFx.CliApplication.RunAsync(IReadOnlyList`1 commandLineArguments, IReadOnlyDictionary`2 environmentVariables) in D:\a\CliFx\CliFx\CliFx\CliApplication.cs:191