5

When logging in to Android Developer Console one can access the crash reports. Since I uploaded the mapping files, the logs are NOT obfuscated but still I am not sure how to read them:

java.lang.NullPointerException: 
    at com.my.app.Path.To.Package.CrashClass.methodA(TheClass.java)
    or                     .methodX (TheClass.java)
    or                     .methodY (TheClass.java)
    or                     .methodY (TheClass.java)
    at com.my.app.Path.To.Package.CallingClass$7.run (CallingClass.java) 
    at android.os.Handler.handleCallback (Handler.java:751) 
    at android.os.Handler.dispatchMessage (Handler.java:95) 
    at android.os.Looper.loop (Looper.java:154) 
    at android.app.ActivityThread.main (ActivityThread.java:6692) 
    at java.lang.reflect.Method.invoke (Method.java) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1468) 
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1358)

I do not understand what the information about methodA, or methodB, etc...

Does this mean, is that a NullPointerException happen in each of these classes?

Is this the call stack within the CrashClass (would be surprising sice methodX does not call methodA or vice versa)?

Andrei Herford
  • 17,570
  • 19
  • 91
  • 225

1 Answers1

0

The answer to another question pointed me to the right solution for this question:

ProGuard can map different methods of a class to the same obfuscated name. For example the two methods MyClass.method1(...) and MyClass.method2(...) could both be mapped to the obfuscated name MyClass.a(...).

Thus when an error occurs in method a on only knows, that this happened in method1 OR method2. This is why the call stack may contain the or-items...

To avoid this problem one can add the following option to the Proguard configuration:

-useuniqueclassmembernames

More information can be found here.

Andrei Herford
  • 17,570
  • 19
  • 91
  • 225