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

JADX ERROR: UnsupportedOperationException in pass: BlockProcessor #744

Closed
fgfg54321 opened this issue Aug 29, 2019 · 1 comment
Closed
Labels
bug Core Issues in jadx-core module

Comments

@fgfg54321
Copy link

fgfg54321 commented Aug 29, 2019

used version jadx-gui-1.0.0 get two questions

  JADX ERROR: IndexOutOfBoundsException in pass: ClassModifier
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    	at java.util.ArrayList.rangeCheck(Unknown Source)
    	at java.util.ArrayList.get(Unknown Source)
    	at jadx.core.dex.visitors.ClassModifier.removeFieldUsageFromConstructor(ClassModifier.java:113)
    	at jadx.core.dex.visitors.ClassModifier.removeSyntheticFields(ClassModifier.java:87)
    	at jadx.core.dex.visitors.ClassModifier.visit(ClassModifier.java:55)
    	at jadx.core.dex.visitors.ClassModifier.visit(ClassModifier.java:49)
    	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:12)
    	at jadx.core.ProcessClass.process(ProcessClass.java:30)
    	at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:311)
    	at jadx.api.JavaClass.decompile(JavaClass.java:62)
  JADX ERROR: UnsupportedOperationException in pass: BlockProcessor
            java.lang.UnsupportedOperationException
            	at jadx.core.utils.EmptyBitSet.set(EmptyBitSet.java:42)
            	at jadx.core.dex.visitors.blocksmaker.BlockProcessor.calcDominators(BlockProcessor.java:228)
            	at jadx.core.dex.visitors.blocksmaker.BlockProcessor.computeDominators(BlockProcessor.java:212)
            	at jadx.core.dex.visitors.blocksmaker.BlockProcessor.processBlocksTree(BlockProcessor.java:58)
            	at jadx.core.dex.visitors.blocksmaker.BlockProcessor.visit(BlockProcessor.java:45)
            	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:27)
            	at jadx.core.dex.visitors.DepthTraversal.lambda$visit$1(DepthTraversal.java:14)
            	at java.util.ArrayList.forEach(Unknown Source)
            	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)
            	at jadx.core.dex.visitors.DepthTraversal.lambda$visit$0(DepthTraversal.java:13)
            	at java.util.ArrayList.forEach(Unknown Source)
            	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:13)
            	at jadx.core.ProcessClass.process(ProcessClass.java:30)
            	at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:311)
            	at jadx.api.JavaClass.decompile(JavaClass.java:62)

then used version jadx-gui-1.0.0-b1141-db892adf get this:

  JADX ERROR: UnsupportedOperationException in pass: BlockProcessor
        java.lang.UnsupportedOperationException
        	at jadx.core.utils.EmptyBitSet.set(EmptyBitSet.java:42)
        	at jadx.core.dex.visitors.blocksmaker.BlockProcessor.calcDominators(BlockProcessor.java:228)
        	at jadx.core.dex.visitors.blocksmaker.BlockProcessor.computeDominators(BlockProcessor.java:212)
        	at jadx.core.dex.visitors.blocksmaker.BlockProcessor.processBlocksTree(BlockProcessor.java:55)
        	at jadx.core.dex.visitors.blocksmaker.BlockProcessor.visit(BlockProcessor.java:45)

class.zip

@fgfg54321 fgfg54321 added Core Issues in jadx-core module bug labels Aug 29, 2019
@skylot
Copy link
Owner

skylot commented Aug 30, 2019

@fgfg54321 this is really weird dex. All methods contain only NOPs, like this:

.method public clear()V
    .registers 3

    .line 799
    :try_start_0
    nop

    nop
    nop
    nop

    nop
    :try_end_5
    .catch Ljava/io/EOFException; {:try_start_0 .. :try_end_5} :catch_6

    nop

    :catch_6
    nop

    .line 801
    nop
    nop
    nop
    nop
    nop
    nop
.end method

So there is nothing to decompile here :)
And I made a fix to correctly handle such cases.
Thank you for the report! 👍

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