Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

[BUG] Switching apps while running git operation causes crash #1067

@xdevs23

Description

@xdevs23

Describe the bug
Switching away from APS while it is running a git operation (let's say, synchronizing repository) may cause a crash.
This can be reproduced if the app being switched to is not a launcher.

To Reproduce
Steps to reproduce the behavior:

  1. Open a different app
  2. Open APS
  3. Tap three dots
  4. Tap on "Synchronize repository"
  5. Immediately switch to the other app without closing APS
  6. Observe crash

Expected behavior
Does not crash after switch

Screenshots
Not posting publicly for privacy reasons.

Device information:

  • Device: OnePlus 5
  • OS: halogenOS 10 (AOSP 10 r41)
  • App version 1.12-free from dl.msfjarvis.dev, downloaded on 2020-08-29

Additional context

android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@a6abdd6 is not valid; is your activity running?
	at android.view.ViewRootImpl.setView(ViewRootImpl.java:931)
	at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:387)
	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:95)
	at android.app.Dialog.show(Dialog.java:342)
	at androidx.appcompat.app.AlertDialog$Builder.show(AlertDialog.java:2)
	at com.zeapo.pwdstore.git.BaseGitActivity.launchGitOperation(BaseGitActivity.kt:28)
	at com.zeapo.pwdstore.git.BaseGitActivity$launchGitOperation$1.invokeSuspend(Unknown Source:12)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:13)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7356)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:925)

Biometric Auth (Fingerprint) is enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions