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

java.lang.NullPointerException #1425

Closed
Mino260806 opened this issue Mar 25, 2022 · 2 comments
Closed

java.lang.NullPointerException #1425

Mino260806 opened this issue Mar 25, 2022 · 2 comments
Labels

Comments

@Mino260806
Copy link
Contributor

NullPointerException when I try finding usages of apply function (from kotlin)

  • Jadx version: 1.3.4
  • Java version: 11.0.14
  • Java VM: Ubuntu OpenJDK 64-Bit Server VM
  • Platform: Linux (5.13.0-37-generic amd64)
  • Max heap size: 12228 MB
  • Program args: -Xmx12228M
java.lang.NullPointerException
	at jadx.gui.ui.dialog.UsageDialog.lambda$getMethodUseIn$1(UsageDialog.java:78)
	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
	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.gui.ui.dialog.UsageDialog.getMethodUseIn(UsageDialog.java:78)
	at jadx.gui.ui.dialog.UsageDialog.collectUsageData(UsageDialog.java:66)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)


Class: LX/1nY;
AccessFlags: public final 
SuperType: Ljava/lang/Object;
Interfaces: [Lcom/google/common/base/Function;]
SourceFile: null

# fields
.field public final synthetic A00 : LX/1nM;
.field public final synthetic A01 : LX/1nH;
.field public final synthetic A02 : Lcom/google/common/collect/ImmutableSet;


.method public <init>(LX/1nM;LX/1nH;Lcom/google/common/collect/ImmutableSet;)V
    .registers 4
    
    .param p1, "":LX/1nM;
    .param p2, "":LX/1nH;
    .param p3, "":Lcom/google/common/collect/ImmutableSet;
    
                               .line 0
    00356ce8: 5b02 b532               0000: iput-object         p2, p0, LX/1nY;->A01:LX/1nH; # field@32b5
                               .line 2
    00356cec: 5b01 b432               0002: iput-object         p1, p0, LX/1nY;->A00:LX/1nM; # field@32b4
                               .line 4
    00356cf0: 5b03 b632               0004: iput-object         p3, p0, LX/1nY;->A02:Lcom/google/common/collect/ImmutableSet; # field@32b6
                               .line 6
    00356cf4: 7010 ca82 0000          0006: invoke-direct       {p0}, Ljava/lang/Object;-><init>()V # method@82ca
                               .line 9
    00356cfa: 0e00                    0009: return-void         
    
.end method

.method public bridge synthetic apply(Ljava/lang/Object;)Ljava/lang/Object;
    .registers 12
    
    .param p1, "":Ljava/lang/Object;
    
                               .line 0
    0035db5c: 1f0b 2e10               0000: check-cast          p1, LX/1nX; # type@102e
                               .line 2
    0035db60: 54b3 af32               0002: iget-object         v3, p1, LX/1nX;->A01:LX/1nW; # field@32af
                               .line 4
    0035db64: 54b7 b232               0004: iget-object         v7, p1, LX/1nX;->A04:Ljava/lang/String; # field@32b2
                               .line 6
    0035db68: 54b8 b332               0006: iget-object         v8, p1, LX/1nX;->A05:Ljava/lang/String; # field@32b3
                               .line 8
    0035db6c: 6200 b732               0008: sget-object         v0, LX/1nZ;->A00:LX/1nB; # field@32b7
                              .line 10
    0035db70: 7210 0e37 0000          000a: invoke-interface    {v0}, LX/1nB;->AXt()LX/1nD; # method@370e
                              .line 13
    0035db76: 0c02                    000d: move-result-object  v2
                              .line 14
    0035db78: 2204 3110               000e: new-instance        v4, LX/1na; # type@1031
                              .line 16
    0035db7c: 7030 7337 b40a          0010: invoke-direct       {v4, p1, p0}, LX/1na;-><init>(LX/1nX;, LX/1nY;)V # method@3773
                              .line 19
    0035db82: 54a0 b632               0013: iget-object         v0, p0, LX/1nY;->A02:Lcom/google/common/collect/ImmutableSet; # field@32b6
                              .line 21
    0035db86: 6e20 3084 8000          0015: invoke-virtual      {v0, v8}, Ljava/util/AbstractCollection;->contains(Ljava/lang/Object;)Z # method@8430
                              .line 24
    0035db8c: 0a09                    0018: move-result         v9
                              .line 25
    0035db8e: 54b1 ae32               0019: iget-object         v1, p1, LX/1nX;->A00:LX/34L; # field@32ae
                              .line 27
    0035db92: 2205 e316               001b: new-instance        v5, LX/2Hc; # type@16e3
                              .line 29
    0035db96: 7030 4950 b50a          001d: invoke-direct       {v5, p1, p0}, LX/2Hc;-><init>(LX/1nX;, LX/1nY;)V # method@5049
                              .line 32
    0035db9c: 54b6 b032               0020: iget-object         v6, p1, LX/1nX;->A02:LX/1Qv; # field@32b0
                              .line 34
    0035dba0: 2200 3310               0022: new-instance        v0, LX/1nc; # type@1033
                              .line 36
    0035dba4: 760a 7837 0000          0024: invoke-direct/range {v0 .. v9}, LX/1nc;-><init>(LX/34L;, LX/1nD;, LX/1nW;, LX/1nb;, LX/2Hd;, LX/1Qv;, Ljava/lang/String;, Ljava/lang/String;, Z)V # method@3778
                              .line 40
    0035dbaa: 1100                    0027: return-object       v0
    
.end method
@skylot
Copy link
Owner

skylot commented Mar 25, 2022

@Mino260806 today I commit a fix for similar issue (#1422), so please check latest unstable build.
If issue still not fixed, please share a sample apk file, so I can reproduce the issue.

@jpstotz
Copy link
Collaborator

jpstotz commented Mar 25, 2022

This looks like a duplicate of #1422. Please test the latest unstable build.

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

No branches or pull requests

3 participants