Skip to content

Crash on DialogFragment Restore Due to Null Dialog #4433

Open
@buluu97

Description

@buluu97

Describe the bug
The app crashed due to a NullPointerException when launching MainActivity.

To Reproduce
(Possible) Steps to reproduce the behavior:
① Open the app and go to the Leak Management page.
② Tap a button that triggers a dialog (DialogFragment) to appear.
③ Without closing the dialog, perform one of the following actions:
③a Press the Home button to send the app to the background.
③b Rotate the screen (portrait ↔ landscape).
③c Switch the app to dark mode or change the theme.
④ Return to the app (or let the system automatically restart it).
The app crashes at this point: because the DialogFragment is restored, but the Dialog is null.

Expected behavior
It should not crash.

Screenshots

Image Image Image Image Image

Smartphone (please complete the following information):

  • Google Pixel 9 pro
    -Android 9
  • No
  • Version: 3.10

Additional context
Since I don't know how to access the Leak Management page, I'm not entirely sure about the exact reproduction steps. This is my inference based on the previous crash scenario and the error log.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Crash-NullPointerExceptionIssue-BugRelated unexpected behavior or something worth investigating.Issue-Task (low)This isn't a bug, but should be dealt with.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions