UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other Game Maker: Studio games!)
GNU General Public License v3.0
1.07k stars 205 forks source link

Decompiler Error on old Undertale translation #327

Open WJXhhhx opened 3 years ago

WJXhhhx commented 3 years ago

EXCEPTION! System.NullReferenceException: 未将对象引用设置到对象的实例。 在 UndertaleModLib.Decompiler.Decompiler.AssignmentStatement.ToString(DecompileContext context) 位置 D:\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs:行号 953 在 UndertaleModLib.Decompiler.Decompiler.Decompile(UndertaleCode code, DecompileContext context) 位置 D:\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs:行号 2723 在 UndertaleModTool.UndertaleCodeEditor.<>c__DisplayClass11_0.b__0() 位置 D:\UndertaleModTool\UndertaleModTool\Editors\UndertaleCodeEditor.xaml.cs:行号 304

WJXhhhx commented 3 years ago

Although I don't know if I can understand Chinese. 虽然我不知道能不能看懂中文。

TSR628666 commented 3 years ago

I have the same problem. 我也有相同的问题。

Grossley commented 3 years ago

Old translations cannot be loaded into UndertaleModTool through conventional means due to the cruder tools used back then (Translatale). However, workarounds are being developed right now. If this is an old translated copy of Undertale (as opposed to some miscellaneous untranslated copy), can you send your copy of Undertale (data.win file) to me? I can check to see if this version I am developing can be used to convert your copy of the game to the proper format.

Grossley commented 3 years ago

Otherwise, this seems to be a standard decompilation error, and not enough information is present to adequately resolve it (such as disassembly, what game it is, and any other information).

EXCEPTION!
System.NullReferenceException: The object reference was not set to the instance of the object.
In UndertaleModLib.Decompiler.Decompiler.AssignmentStatement.ToString(DecompileContext context) location D:\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs: line number 953
In UndertaleModLib.Decompiler.Decompiler.Decompile(UndertaleCode code, DecompileContext context) position D:\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs: line number 2723
In UndertaleModTool.UndertaleCodeEditor.<>c__DisplayClass11_0.b__0() position D:\UndertaleModTool\UndertaleModTool\Editors\UndertaleCodeEditor.xaml.cs: line number 304
tioalexis commented 2 years ago

Decompiled

/* EXCEPTION!
   System.NullReferenceException: Object reference not set to an instance of an object.
   at UndertaleModLib.Decompiler.Decompiler.FunctionDefinition.ToString(DecompileContext context) in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs:line 1376
   at UndertaleModLib.Decompiler.Decompiler.AssignmentStatement.ToString(DecompileContext context) in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs:line 1181
   at UndertaleModLib.Decompiler.Decompiler.Decompile(UndertaleCode code, GlobalDecompileContext globalContext) in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModLib\Decompiler\Decompiler.cs:line 3779
   at UndertaleModTool.UndertaleCodeEditor.<>c__DisplayClass30_1.<DecompileCode>b__1() in D:\a\UndertaleModTool\UndertaleModTool\UndertaleModTool\Editors\UndertaleCodeEditor.xaml.cs:line 433
*/

Disassembly: https://pastebin.com/J4Q2L5fU

Source data.win: https://kay-yu.itch.io/holocure

Version 765cf57 (master)