-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[core] inlined classes are lot loaded #1379
Comments
@oriori1703 thanks for report! |
@oriori1703 fixed, at least for this case 😃 |
@skylot first of all thanks for the fix. Also, I noticed that Jadx uses a lot of memory while this APK (more than 16 GB). I'm not sure if this is related to this fix, but I'm pretty sure it's from a semi recent change, because it didn't happen before. |
Sad 😕 |
@oriori1703 I commit a fix to prevent endless loop. Anonymous classes with dependency loop will be not inlined and warning will be added ("Loop in anonymous inline"). This will resolve new errors :) |
This commit: af2f14f (added wrong issue number 😞 ) |
And a few more improvements:
@oriori1703 please check these changes. |
Yep, It seems you have fixed all of the errors I was experiencing after the fix, and the ram usage is way better. |
I find a lot of decomplication errors for inlined classes with the cause being that they are not loaded.
it seems to be an issue with double inlined classes (inlined classes inside and inlined classes ).
For example,
X.B5o.A0s
has the following decompiled code without inlining turned on:In it's first line it creates a new instance of
X.B5s
, which is only used there, therefore it is inlined when the option is on. and has only the method calledBfg
, with the following code:In it's last line it creates a new instance of
X.B64
. This class is also only used there, so it is also inlined.I think this double inline is what causes the issue.
jadx.core.utils.exceptions.CodegenException: Error generate insn: 0x000b: INVOKE
(wrap: android.content.Context : 0x0002: INVOKE (r1v0 android.content.Context A[REMOVE]) = (r2v0 'b5o' X.B5o) type: VIRTUAL call: androidx.fragment.app.Fragment.getContext():android.content.Context)
(wrap: android.content.DialogInterface$OnClickListener : 0x0008: CONSTRUCTOR (r0v0 android.content.DialogInterface$OnClickListener A[REMOVE]) = (r2v0 'b5o' X.B5o A[DONT_INLINE]) call: X.B64.(X.B5o):void type: CONSTRUCTOR)
type: STATIC call: X.8zB.A0A(android.content.Context, android.content.DialogInterface$OnClickListener):void in method: X.B5s.Bfg():void, file: classes4.dex
at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:278)
at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:241)
at jadx.core.codegen.RegionGen.makeSimpleBlock(RegionGen.java:90)
at jadx.core.dex.nodes.IBlock.generate(IBlock.java:15)
at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:62)
at jadx.core.dex.regions.Region.generate(Region.java:35)
at jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:62)
at jadx.core.codegen.MethodGen.addRegionInsns(MethodGen.java:267)
at jadx.core.codegen.MethodGen.addInstructions(MethodGen.java:260)
at jadx.core.codegen.ClassGen.addMethodCode(ClassGen.java:369)
at jadx.core.codegen.ClassGen.addMethod(ClassGen.java:304)
at jadx.core.codegen.ClassGen.lambda$addInnerClsAndMethods$3(ClassGen.java:270)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
Caused by: jadx.core.utils.exceptions.JadxRuntimeException: Expected class to be processed at this point, class: X.B64, state: NOT_LOADED
at jadx.core.dex.nodes.ClassNode.ensureProcessed(ClassNode.java:297)
at jadx.core.codegen.InsnGen.makeConstructor(InsnGen.java:676)
at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:386)
at jadx.core.codegen.InsnGen.addWrappedArg(InsnGen.java:140)
at jadx.core.codegen.InsnGen.addArg(InsnGen.java:116)
at jadx.core.codegen.InsnGen.addArg(InsnGen.java:103)
at jadx.core.codegen.InsnGen.generateMethodArguments(InsnGen.java:996)
at jadx.core.codegen.InsnGen.makeInvoke(InsnGen.java:807)
at jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:390)
at jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:271)
... 15 more
*/
https://www.apkmirror.com/apk/instagram/instagram-instagram/instagram-instagram-192-0-0-35-123-release/
The text was updated successfully, but these errors were encountered: