-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown capture type 1 when decoding specific Alan Wake 2 *.binlua files (1.0.8 alpha) #27
Comments
No, I don't this has anything to do with for loops at all. There seems to be an issue regarding capture types in closures, specifically Would it be possible for you to send me the binary that you were trying to decompile? If you are unable to, the disassembly will be just fine. Thanks for finding this bug, I must of overlooked it. |
Sure, I'll include two files; one that works (weapon_balancing_data.binlua), and one that doesn't (flashlight.binlua). |
I also get another different error on different files; |
@riverence Thank you for all of the bugs, I will get to them as soon as possible. |
After doing some debugging I was able to fix this issue, but another one arose. I noticed that I will continue to look into this issue, but I think the bytecode is flawed. |
Not sure why that would be happening, only thing I can think of that has a slight chance of being the reason is the dependency on the currently-missing |
Ok. I was wrong originally. After debugging for a bit more I saw that the script is creating a new closure ( Thanks again for finding this, I had not accounted for this previously. |
I actually didn't get this from a Roblox game; this is from Alan Wake 2. The game uses Luau for it's scripts (which is one of the first examples of a game other than Roblox using it). Thanks for looking into this! |
Now that the capture issue has been fixed, while it has opened up my scope on the scripts I can actually decompile, I'm getting more variations on this specific error. They don't always produce the same traceback either, which makes me think it's gonna be horrible to actually look into on a consistent basis. On some occasions, it'll actually produce output in the specified file, but it always cuts off at strange locations, like in the middle of a function. I've attached a zip file containing a few files that don't work. |
Take at look at the most recent version, I added a few more things. |
Unfortunately, after building and testing 1.0.9, I'm still getting the object error, specifically on white_light_zone_system.binlua in my previous attachment. |
I'm on v1.0.9-alpha and also getting the same error on two other scripts while using Client encoding. The error seems to be the same as above on code.luau but code2.luau appears to error from the lifer.
|
Just pushed a new change that should fix a few scripts. Not all. |
Just wanted to check in quickly. I have been rewriting Unluau for the past weeks and am adding an IL to facilitate control flow analysis. Hopefully this set up will resolve most issues the alpha version faces. |
nice! hopefully this can help me get through all of the scripts from alan wake 2 c: |
When decoding .binlua files (quite literally luau renamed to binlua, thanks Remedy) simple scripts will work and output something right, but on a good chunk the decompiler will produce this error;
[20:01:12 FTL] Decompilation error Unluau.DecompilerException: Unknown capture type 1 at Unluau.Lifter.LiftBlock(Function function, Registers registers, Int32 pcStart, Int32 pcStop) in C:\Users\infur\Documents\unluau-1.0.8-alpha\src\Unluau\Lifter\Lifter.cs:line 528 at Unluau.Lifter.LiftProgram() in C:\Users\infur\Documents\unluau-1.0.8-alpha\src\Unluau\Lifter\Lifter.cs:line 36 at Unluau.Decompiler.Decompile() in C:\Users\infur\Documents\unluau-1.0.8-alpha\src\Unluau\Decompiler.cs:line 48 at Unluau.CLI.Program.RunOptions(Options options) in C:\Users\infur\Documents\unluau-1.0.8-alpha\src\Unluau.CLI\Program.cs:line 119
Is this an issue regarding support of for loops?
The text was updated successfully, but these errors were encountered: