colinator27 / DogScepter

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

NullReference Exception trying build AST from node. #39

Open Miepee opened 2 years ago

Miepee commented 2 years ago

Encountered several games which create the following stacktraces trying to decompile all code:

Failed to decompile code for "gml_Object_obj_player1_Step_0": System.NullReferenceException: Object reference not set to an instance of an object.
   at DogScepterLib.Project.GML.Decompiler.ASTBuilder.BuildFromNode(DecompileContext dctx, ASTNode start, Node baseNode, Stack`1 existingStack) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Project\GML\Decompiler\ASTBuilder
.cs:line 71
   at DogScepterLib.Project.GML.Decompiler.ASTBuilder.FromContext(DecompileContext ctx) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Project\GML\Decompiler\ASTBuilder.cs:line 14
   at DogScepterLib.Project.GML.Decompiler.DecompileContext.DecompileSegment(GMCode codeEntry, BlockList existingList) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Project\GML\Decompiler\DecompileContext.cs:line 246
   at DogScepterLib.Project.GML.Decompiler.DecompileContext.DecompileWholeEntry(GMCode codeEntry) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Project\GML\Decompiler\DecompileContext.cs:line 207
   at DogScepterLib.Project.GML.Decompiler.DecompileContext.DecompileWholeEntryString(GMCode codeEntry) in C:\Users\narr\gitrepos\dog-scepter\DogScepterLib\Project\GML\Decompiler\DecompileContext.cs:line 186
   at DogScepterCLI.Commands.DumpCommand.<>c__DisplayClass36_1.<ExecuteAsync>b__0(GMCode elem) in C:\Users\narr\gitrepos\dog-scepter\DogScepterCLI\Commands\DumpCommand.cs:line 199

Games in question are: Spelldown, master chef, goose no lose, blade