Slide icon indicating copy to clipboard operation
Slide copied to clipboard

Clicking 'Done' in notification settings causes app to crash [replication steps]

Open Controless opened this issue 11 years ago • 7 comments

  1. Disable notifications in the app settings
  2. Swipe the app out of the recents screen
  3. Enable notifications in the app settings and click done

(better replication steps thanks to @recalculated)

Controless avatar Nov 18 '15 19:11 Controless

I think this isn't any longer happening with the newest code because I can't reproduce it.

l3d00m avatar Nov 18 '15 20:11 l3d00m

I am on the newest version (4.3.4) and I can still replicate it.

Controless avatar Nov 18 '15 21:11 Controless

This is definitely fixed, but not pushed to play store yet.

l3d00m avatar Nov 18 '15 21:11 l3d00m

Still occuring even with the latest Slide github code.

Controless avatar Nov 21 '15 19:11 Controless

Are you sure you're compiling using the latest code?

If you're not logged in, it should show a message asking you to log in after clicking the Notification setting...

findViewById(R.id.notifications).setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        if (Authentication.isLoggedIn) {
            LayoutInflater inflater = getLayoutInflater();
            // more stuff here
        } else {
            new AlertDialogWrapper.Builder(Settings.this)
                    .setTitle(R.string.general_login)
                    .setMessage(R.string.err_login)
                    .setPositiveButton(R.string.btn_yes, new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int whichButton) {
                            Intent inte = new Intent(Settings.this, Login.class);
                            Settings.this.startActivity(inte);
                        }
                    }).setNegativeButton(R.string.btn_no, new DialogInterface.OnClickLis{
                public void onClick(DialogInterface dialog, int whichButton) {
                    finish();
                }
            }).show();
        }
    }
}

karlding avatar Nov 22 '15 09:11 karlding

@karlding This bug is different, and occurs when the user is logged in. To clarify the reproduction steps:

  1. Disable notifications in the app settings
  2. Exit the app and swipe it out of the recents screen
  3. Enable notifications in the app settings and click done

ghost avatar Nov 22 '15 14:11 ghost

Confirmed on my end

E/AndroidRuntime(30942): FATAL EXCEPTION: main
E/AndroidRuntime(30942): Process: me.ccrama.redditslide, PID: 30942
E/AndroidRuntime(30942): java.lang.NullPointerException: Attempt to invoke virtual method 'void me.ccrama.redditslide.Notifications.NotificationJobScheduler.cancel(android.content.Context)' on a null object reference
E/AndroidRuntime(30942):        at me.ccrama.redditslide.Activities.Settings$6$4.onClick(Settings.java:198)
E/AndroidRuntime(30942):        at android.view.View.performClick(View.java:4780)
E/AndroidRuntime(30942):        at android.view.View$PerformClick.run(View.java:19866)
E/AndroidRuntime(30942):        at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(30942):        at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(30942):        at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(30942):        at android.app.ActivityThread.main(ActivityThread.java:5254)
E/AndroidRuntime(30942):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(30942):        at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(30942):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/AndroidRuntime(30942):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Alexendoo avatar Nov 22 '15 14:11 Alexendoo