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

[core] ConcurrentModificationException while generating class body #1685

Closed
bagipro opened this issue Sep 28, 2022 · 1 comment
Closed

[core] ConcurrentModificationException while generating class body #1685

bagipro opened this issue Sep 28, 2022 · 1 comment
Labels
bug Core Issues in jadx-core module

Comments

@bagipro
Copy link
Collaborator

bagipro commented Sep 28, 2022

Hey!

APK: https://drive.google.com/file/d/1XBpFGkIORvQkPu8sYaWFpSZ1ZI87QpxR/view?usp=sharing

File com/android/wifitrackerlib/BaseWifiTracker.java:

jadx.core.utils.exceptions.JadxRuntimeException: Failed to generate code for class: com.android.wifitrackerlib.BaseWifiTracker
	at jadx.core.ProcessClass.generateCode(ProcessClass.java:121)
	at jadx.core.dex.nodes.ClassNode.decompile(ClassNode.java:384)
	at jadx.core.dex.nodes.ClassNode.getCode(ClassNode.java:332)
Caused by: jadx.core.utils.exceptions.JadxRuntimeException: Code generation error
	at jadx.core.codegen.CodeGen.wrapCodeGen(CodeGen.java:55)
	at jadx.core.codegen.CodeGen.generateJavaCode(CodeGen.java:34)
	at jadx.core.codegen.CodeGen.generate(CodeGen.java:22)
	at jadx.core.ProcessClass.process(ProcessClass.java:77)
	at jadx.core.ProcessClass.generateCode(ProcessClass.java:115)
	... 2 more
Caused by: java.util.ConcurrentModificationException
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1627)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at jadx.core.codegen.ClassGen.skipMethod(ClassGen.java:331)
	at jadx.core.codegen.ClassGen.addMethod(ClassGen.java:298)
	at jadx.core.codegen.ClassGen.lambda$addInnerClsAndMethods$3(ClassGen.java:272)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1507)
	at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
@bagipro bagipro added bug Core Issues in jadx-core module labels Sep 28, 2022
@skylot
Copy link
Owner

skylot commented Sep 29, 2022

Sadly, I don't understand the root cause of this issue, also I am not lucky enough to reproduce this concurrent issue 😭
Anyway, I handle exception and now in the worst case unneeded inlined method will be kept in code, so it will not break code and code generation 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core Issues in jadx-core module
Projects
None yet
Development

No branches or pull requests

2 participants