TeamAmaze / TeamAmaze/AmazeFileManager

MainActivity not attached on copy

Open
#2,696 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-FileOperations 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)

Not usable, trying to copy smart task launcher folder between phones.

Exception

  • App Name: Amaze File Manager
  • Package: com.amaze.filemanager
  • Version: 3.6.1
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux Android 11 - 30
  • Device: camellian
  • Model: M2103K19G
  • Product: camellian_eea
Crash log

java.lang.IllegalArgumentException: View=DecorView@668480[MainActivity] not
attached to window manager
at
android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:572)
at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:476)
at
android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:141)
at android.app.Dialog.dismissDialog(Dialog.java:389)
at android.app.Dialog.dismiss(Dialog.java:371)
at
com.amaze.filemanager.asynchronous.asynctasks.PrepareCopyTask.onPostExecute(PrepareCopyTask.java:195)
at
com.amaze.filemanager.asynchronous.asynctasks.PrepareCopyTask.onPostExecute(PrepareCopyTask.java:69)
at android.os.AsyncTask.finish(AsyncTask.java:771)
at android.os.AsyncTask.access$900(AsyncTask.java:199)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8051)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)


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

Start in asynchronous/asynctasks/PrepareCopyTask.java, especially onPostExecute at line 195, and trace the copy-folder flow that reproduces the crash on Android 11. Run the copy operation with the reported setup and confirm that it no longer crashes when MainActivity is not attached to the window manager.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.