Code Monkey home page Code Monkey logo

Comments (7)

CensoredUsername avatar CensoredUsername commented on August 9, 2024 1

Adding an extra check around there cannot hurt as well then. I'll make some changes to also catch that.

from unrpyc.

CensoredUsername avatar CensoredUsername commented on August 9, 2024 1

This should all be fixed now.

from unrpyc.

CensoredUsername avatar CensoredUsername commented on August 9, 2024

Fair enough. The easiest way to check for this is to see if the position fields actually fit the expected pattern of 1, 2. If the header is wrong those fields likely contain garbage.

from unrpyc.

CensoredUsername avatar CensoredUsername commented on August 9, 2024

Added some warnings in that file around possible issues of loading old rpyc files, rpyc files that we can detect to be from ren'py 7 (doesn't catch all of them, but at least we can warn people that something is afoot).

Seems either way that the master decompiler is surprisingly good at still decompiling ren'py 7 files. So I'm really considering just getting the old-style argument support in there and at least having dev also be compatible with ren'py 7.

On another note, apparently we're also missing test.testast.If support.

from unrpyc.

madeddy avatar madeddy commented on August 9, 2024

Added some warnings in that file around possible issues of loading old rpyc files

Looks good! I think this will go a long way for getting a first lead on things.

we're also missing test.testast.If support.

I guess this will not be the last thing that sneaked somehow around the Ren'Py docs or changelog. 😉

Btw. Whats now with missing pickletools, huh? Strange...! (I thought at first "how did i manage to breaks this now" with my mini-pull req?)

from unrpyc.

CensoredUsername avatar CensoredUsername commented on August 9, 2024

Btw. Whats now with missing pickletools, huh? Strange...! (I thought at first "how did i manage to breaks this now" with my mini-pull req?)

Apparently an issue in my previous un.rpyc overhauls. Instead of removing all renpy module loaders, I removed everything but the renpy module loaders. Which was fine, until it needed to import a previously not imported module from the stdlib.

from unrpyc.

madeddy avatar madeddy commented on August 9, 2024

The wrong header falls still through with the current dev branch:

Error while decompiling /home/olli/.xlib/RPG/_test/OurBrightDays-0.1.3-pc/game/0_TEST_header_fake.rpyc:
Traceback (most recent call last):
File "/home/olli/Code/Git/unrpyc/unrpyc.py", line 247, in worker
return decompile_rpyc(filename, args.clobber, args.dump, no_pyexpr=args.no_pyexpr,
File "/home/olli/Code/Git/unrpyc/unrpyc.py", line 169, in decompile_rpyc
ast = read_ast_from_file(in_file)
File "/home/olli/Code/Git/unrpyc/unrpyc.py", line 122, in read_ast_from_file
contents = zlib.decompress(contents)
zlib.error: Error -3 while decompressing data: incorrect header check

I used a rpyc file with manipulated header where one char was changed. (RENPY RPC2 -> RENPY RPC3) The same effect can be reached, if one checks in unrpyc.py for a wrong header string.

The complain is misleading as it points at zlib as the culprit or something related to the compressed stream.

from unrpyc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.