atrexus / unluau

A decompiler for Luau (Roblox's Lua based programming language: https://luau-lang.org/).
Apache License 2.0
69 stars 18 forks source link

FTL ( Fatal Error ) NullReferenceException encountered #56

Open Dankri12 opened 2 months ago

Dankri12 commented 2 months ago

Description of the issue: When trying to decompile a module script with Unluau, I encounter a NullReferenceException error.

Roblox script by bytecode input.txt

Steps to Reproduce:

  1. Run Unluau.CLI with the --encoding option on the module script.
    Unluau.CLI.exe  --encoding Client -o test\output.txt test\input.txt
  2. Observe the output.

Behavior: The following warnings and fatal error occur:

[03:10:22 WRN] Encountered unhandled code SETUPVAL, skipping
[03:10:22 WRN] Encountered unhandled code FASTCALL2, skipping
[02:36:31 FTL] Unexpected error; please report here: https://github.com/atrexus/unluau/issues

at Unluau.Lifter.LiftBlock(Function function, Registers registers, Int32 pcStart, Int32 pcStop) in C:\Users\hacking\Downloads\unluau\src\Unluau\Lifter\Lifter.cs:line 554

at Unluau.Lifter.LiftBlock(Function function, Registers registers, Int32 pcStart, Int32 pcStop) in C:\Users\hacking\Downloads\unluau\src\Unluau\Lifter\Lifter.cs:line 570

at Unluau.Lifter.LiftProgram() in C:\Users\hacking\Downloads\unluau\src\Unluau\Lifter\Lifter.cs:line 38

at Unluau.Decompiler.Decompile() in C:\Users\hacking\Downloads\unluau\src\Unluau\Decompiler.cs:line 48

at Unluau.CLI.Program.RunOptions(Options options) in C:\Users\hacking\Downloads\unluau\src\Unluau.CLI\Program.cs:line 119

Environment:

  1. OS: windows 10

  2. Unluau version: Unluau 1.0.9-alpha

  3. .NET version: 8.0.203

ChloeDoesThings commented 2 months ago

It seems to be an issue with the lifter, I'll try to help you fix this in the morning since it's like 2:48.

Dankri12 commented 2 months ago

It seems to be an issue with the lifter, I'll try to help you fix this in the morning since it's like 2:48.

Sorry didnt see the message until now, Thats great to hear!

ive experienced that im getting the same issue on a lot of other scripts aswell. during a lot of testing it seems i get the error from large or medium scripts. small scripts aint a problem. or i havent discovered any yet

ChloeDoesThings commented 2 months ago

It seems to be an issue with the lifter, I'll try to help you fix this in the morning since it's like 2:48.

Sorry didnt see the message until now, Thats great to hear!

ive experienced that im getting the same issue on a lot of other scripts aswell. during a lot of testing it seems i get the error from large or medium scripts. small scripts aint a problem. or i havent discovered any yet

I'm so sorry I completely forgot to see what the actual issue was.

Dankri12 commented 2 months ago

It seems to be an issue with the lifter, I'll try to help you fix this in the morning since it's like 2:48.

Sorry didnt see the message until now, Thats great to hear! ive experienced that im getting the same issue on a lot of other scripts aswell. during a lot of testing it seems i get the error from large or medium scripts. small scripts aint a problem. or i havent discovered any yet

I'm so sorry I completely forgot to see what the actual issue was.

No worries, There is no rush. Looking forward to your insights!