Skip to content

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

@jyjsunny

Description

@jyjsunny

Description

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

There is a video:

Rotating.the.screen.after.entering.an.incorrectly.formatted.date.in.the.search.bar.causes.a.crash.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions