hotchemi / Android-Rate

Android-Rate is a library to help you promote your android app by prompting users to rate the app after using it for a few days.
http://hotchemi.github.io/Android-Rate
MIT License
724 stars 216 forks source link

Crash reports #75

Closed thinkpozzitive closed 8 years ago

thinkpozzitive commented 8 years ago

Hi hotchemi,

I've been receiving crash reports related to the AppRate library but for the likes of me I cannot reproduce it, nor can I figure out why it is happening, so I'm pasting below the information I have and maybe you have a recommendation.

All the information I have on the crash log:

Fatal Exception: java.lang.NullPointerException: Attempt to read from field 'boolean a.a.a.a.h' on a null object reference
       at hotchemi.android.rate.AppRate.with(Unknown Source)
       at com.app.myapp.myActivity$1$1.run(Unknown Source)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:135)
       at android.app.ActivityThread.main(ActivityThread.java:5343)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)

What I'm doing is, after a specific user action, I use a 1 second delay (like below) to then show the rate dialog:

Handler handler = new Handler();
handler.postDelayed(new Runnable() {
    @Override
    public void run() {
      // Show a dialog if meets conditions
      AppRate.showRateDialogIfMeetsConditions(myActivity.this);
    }
}, 1000);
hotchemi commented 8 years ago
  1. Could u decrypt the stack trace with mapping.txt? I'd like to see the detail.
  2. Could u show me where u initialize the AppRate(with with). The stack trace shows AppRate.with.
  3. Why r u launching the dialog with 1 second delay? I think it may cause the problem.