TeamAmaze / TeamAmaze/AmazeFileManager

java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState

Open
#3,128 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

From-Email Issue-Bug
Dominant language
Kotlin
Stars
6.4k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
1

Description

Issue explanation (write below this line)

Hello, I used the ftp feature and this crash happened while I tried to
select a new shared path.
I accidentally went up until "/" in the path, and was not able to select
another path, f.e SD card or internal or emulated.

Exception

  • App Name: Amaze Dateimanager
  • Package: com.amaze.filemanager
  • Version: 3.6.7
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux Android 11 - 30
  • Device: betalm
  • Model: LM-G810
  • Product: betalm_e
Crash log

java.lang.RuntimeException: Unable to destroy activity
{com.amaze.filemanager/com.amaze.filemanager.ui.activities.MainActivity}:
java.lang.IllegalStateException: Can not perform this action after
onSaveInstanceState
at
android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5211)
at
android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5241)
at
android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:5538)
at
android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5468)
at
android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:69)
at
android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at
android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2084)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7888)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:981)
Caused by: java.lang.IllegalStateException: Can not perform this action
after onSaveInstanceState
at
androidx.fragment.app.FragmentManager.checkStateLoss(FragmentManager.java:1832)
at
androidx.fragment.app.FragmentManager.enqueueAction(FragmentManager.java:1872)
at
androidx.fragment.app.BackStackRecord.commitInternal(BackStackRecord.java:329)
at androidx.fragment.app.BackStackRecord.commit(BackStackRecord.java:294)
at
androidx.fragment.app.DialogFragment.dismissInternal(DialogFragment.java:352)
at androidx.fragment.app.DialogFragment.dismiss(DialogFragment.java:304)
at
com.amaze.filemanager.ui.activities.MainActivity.onFolderChooserDismissed(MainActivity.java:2361)
at
com.afollestad.materialdialogs.folderselector.FolderChooserDialog.onDismiss(FolderChooserDialog.java:142)
at
androidx.fragment.app.DialogFragment.onDestroyView(DialogFragment.java:747)
at androidx.fragment.app.Fragment.performDestroyView(Fragment.java:3187)
at
androidx.fragment.app.FragmentStateManager.destroyFragmentView(FragmentStateManager.java:739)
at
androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:346)
at
androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:112)
at
androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1636)
at
androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3112)
at
androidx.fragment.app.FragmentManager.dispatchDestroy(FragmentManager.java:3091)
at
androidx.fragment.app.FragmentController.dispatchDestroy(FragmentController.java:334)
at
androidx.fragment.app.FragmentActivity.onDestroy(FragmentActivity.java:322)
at
androidx.appcompat.app.AppCompatActivity.onDestroy(AppCompatActivity.java:242)
at
com.amaze.filemanager.ui.activities.MainActivity.onDestroy(MainActivity.java:1377)
at android.app.Activity.performDestroy(Activity.java:8264)
at
android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1345)
at
android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5196)
... 13 more


--
Mit besten Grüßen
Andreas Lenhardt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read MainActivity.onFolderChooserDismissed at MainActivity.java:2361 and the FolderChooserDialog dismissal path in the stack trace. Reproduce the FTP shared-path flow by navigating to "/" and selecting another storage path. Done means the activity can be relaunched or destroyed without the reported IllegalStateException.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.