Skip to content
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

Performance - Out Of Memory #642

Open
fee1-dead opened this issue Oct 7, 2020 · 6 comments
Open

Performance - Out Of Memory #642

fee1-dead opened this issue Oct 7, 2020 · 6 comments

Comments

@fee1-dead
Copy link
Collaborator

fee1-dead commented Oct 7, 2020

I have seen many issues reporting the same issue. So I will open this and merge all the duplicates here.

There are two kinds of messages: Java heap space and GC overhead limit exceeded.

This could be resolved by increasing the heap space with -Xmx such as -Xmx6G, but in other cases, the jar attempted for deobfuscation could be very large and it could not be resolved.

Here are some possible solutions if that is the case.

  • Transform the classes with only one transformer every time
  • Split the jar file into many jars, only deobfuscating a part of the program while having other parts as libraries.
  • Avoid loading redundant classpath jars.
  • Use other tools (e.g. ProGuard)

Could also be related to JavaVM.

@Janmm14
Copy link
Contributor

Janmm14 commented Oct 7, 2020

Lazy loading of classes out of the path jars might help here.

@fee1-dead
Copy link
Collaborator Author

Or, instead of loading classes as class nodes, only use a class which implements ClassVisitor, which only receives the superclass and interface info.

@Janmm14
Copy link
Contributor

Janmm14 commented Oct 7, 2020

Or use the current style of asm api but with SKIP_CODE flag. Visitor API is kind neat as its faster, but we're using the OOP API everywhere here.

@x4e
Copy link

x4e commented Oct 7, 2020

User error, buy more ram

@Maskhe
Copy link

Maskhe commented Jan 18, 2021

then....how to solve this problem?I am not very clear about the solutions mentioned above 😢

@I2rys
Copy link

I2rys commented Oct 16, 2021

Hello @Maskhe,
Use allatori.string.StringEncryptionTransformer as your transformer or increase your java heap space using -Xmx or -Xmx6G and It will be fixed, It worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants