1

I got the following crash report in Google Play Store:

java.lang.NullPointerException: 
  at com.xxx.MainActivity.access$1000 (MainActivity.java)
  or                     .access$900 (MainActivity.java)
  or                     .doStamping (MainActivity.java)
  or                     .handleIntent (MainActivity.java)
  or                     .putLabelOnStableStoppedButton (MainActivity.java)
  or                     .wrongFilePopup (MainActivity.java)
  at com.xxx.MainActivity.access$1502 (MainActivity.java)
  or                     .access$1700 (MainActivity.java)
  or                     .access$200 (MainActivity.java)
  or                     .access$2000 (MainActivity.java)
  or                     .access$800 (MainActivity.java)
  or                     .createDateDetailsSummaryText (MainActivity.java)
  or                     .refreshLabelOnStampButton (MainActivity.java)
  or                     .stampGPSEvent (MainActivity.java)
  or                     .startGPSLogging (MainActivity.java)
  at com.xxx.MainActivity.access$100 (MainActivity.java)
  or                     .access$1402 (MainActivity.java)
  or                     .access$1602 (MainActivity.java)
  or                     .access$1900 (MainActivity.java)
  or                     .access$2400 (MainActivity.java)
  or                     .access$400 (MainActivity.java)
  or                     .access$500 (MainActivity.java)
  or                     .access$602 (MainActivity.java)
  or                     .access$702 (MainActivity.java)
  or                     .btAutoStamping (MainActivity.java)
  or                     .createHtmlTextForButton (MainActivity.java)
  or                     .csvImportFinished (MainActivity.java)
  or                     .displayGetProPopup (MainActivity.java)
  or                     .getValuesAndSaveDialog (MainActivity.java)
  or                     .intentDisplayMap (MainActivity.java)
  or                     .parseIntFromPrefs (MainActivity.java)
  or                     .pickedFileOK (MainActivity.java)
  or                     .showCurrentTripPopUp (MainActivity.java)
  or                     .showStampLimitExceededPopup (MainActivity.java)
  or                     .stopGPSLogging (MainActivity.java)
  or                     .stopTickingBtStamp (MainActivity.java)
  or                     .wrongFilePopup (MainActivity.java)
  at com.xxx.MainActivity$21.onClick (MainActivity.java)
  at android.support.v7.app.AlertController$ButtonHandler.handleMessage (AlertController.java)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loop (Looper.java:154)
  at android.app.ActivityThread.main (ActivityThread.java:6776)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1496)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1386)

I have 2 questions:

  • why does it say "or" all the time? Can I not get a clear statement as to where it crashed?
  • what are all the numbers preceded by ".access$"? I was hoping for line numbers, but it doesn't seem to be the case
j3App
  • 1,510
  • 1
  • 17
  • 26

1 Answers1

2

1: Proguard will often re-use method names which means when it comes to de-obfuscation the map cannot tell the difference, so it has to show you all the possibilities. This question and This question might help.

2: access$ are methods are on inner classes or lambdas where they access the parent class. For example if you had some code like this:

class Outer {
  private boolean field = false;

  class Inner {

    void doSomething() {
      if (field) {
        System.out.println("hello world");
      }
    }
  }
}

Roughly speaking, to do the line "if field" the compiler needs to access Outer.field from Inner. But the bytecode has no concept of an inner class. So it creates a hidden method access$XXX() to get access to Outer.field. Similar things happen if you use a lambda expression.

Nick Fortescue
  • 13,530
  • 1
  • 31
  • 37