AmazeFileManager icon indicating copy to clipboard operation
AmazeFileManager copied to clipboard

Crash on DialogFragment Restore Due to Null Dialog

Open buluu97 opened this issue 6 months ago • 1 comments

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.

buluu97 avatar Jul 15 '25 13:07 buluu97

① Open the app and go to the Leak Management page.

Is this the debug app? The leak canary shouldn't be available on release builds.

EmmanuelMess avatar Jul 16 '25 04:07 EmmanuelMess