ActivityDiary icon indicating copy to clipboard operation
ActivityDiary copied to clipboard

Rotating the screen after entering an incorrectly formatted date in the search bar causes a crash

Open jyjsunny opened this issue 3 years ago • 4 comments

Description

Rotating the screen after entering an incorrectly formatted date in the search bar causes a crash

There is a video:

https://user-images.githubusercontent.com/92309998/169066990-73be76b6-8a54-4998-9c63-8d43793c34a3.mov

Steps to reproduce

  1. click on "Diary" on the main menu
  2. click to search
  3. input " "
  4. choose "serach ' ' in dates" to search
  5. rotate the screen
  6. crash and exit

Information

Android version: Android 8 Device: Google Pixel 4 App Version: 136

Stack Trace

: java.lang.RuntimeException: Unable to start activity ComponentInfo{de.rampro.activitydiary/de.rampro.activitydiary.ui.history.HistoryActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference : at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817) : at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892) : at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4754) : at android.app.ActivityThread.-wrap18(Unknown Source:0) : at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1599) : at android.os.Handler.dispatchMessage(Handler.java:105) : at android.os.Looper.loop(Looper.java:164) : at android.app.ActivityThread.main(ActivityThread.java:6541) : at java.lang.reflect.Method.invoke(Native Method) : at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) : Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference : at de.rampro.activitydiary.ui.history.HistoryActivity.setWrongColorSearchText(HistoryActivity.java:523) : at de.rampro.activitydiary.ui.history.HistoryActivity.checkDateFormatAndParse(HistoryActivity.java:505) : at de.rampro.activitydiary.ui.history.HistoryActivity.filterHistoryDates(HistoryActivity.java:338) : at de.rampro.activitydiary.ui.history.HistoryActivity.handleIntent(HistoryActivity.java:231) : at de.rampro.activitydiary.ui.history.HistoryActivity.onCreate(HistoryActivity.java:192) : at android.app.Activity.performCreate(Activity.java:6975) : at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213) : at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770) : ... 10 more

jyjsunny avatar May 18 '22 14:05 jyjsunny

@ramack Hello, Could I ask about the current status of this issue?

Looking forward to your reply!

jyjsunny avatar May 31 '22 05:05 jyjsunny

@ramack Hello, Could I ask about the current status of this issue?

Looking forward to your reply!

@ramack Hello, Could I ask about the current status of this issue?

Looking forward to your reply!

jyjsunny avatar Jun 02 '22 09:06 jyjsunny

Sorry for the long response time, but finally I can confirm this bug. Thanks for reporting, it's easy to reproduce.

ramack avatar Oct 01 '22 19:10 ramack

@ramack Hello! Could you please take a look at the pull request I've linked to the issue?

dmitriy-mokshin avatar Jun 16 '23 09:06 dmitriy-mokshin