JakeWharton / JakeWharton/ProcessPhoenix

not always restart activity on Android 12

Open
#47 11 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
2.1k
Forks
138
Avg merge
1h 23m
Merged PRs (30d)
11

Description

I am using v2.1.2 and found that the activity won't be restarted on Android 12 sometimes.

When the problem happens, I notice the following errors:
```
I/ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10008000 pkg= cmp=} from uid 10293

W/ActivityTaskManager: Tried to set launchTime (0) < mLastActivityLaunchTime (202472441)

W/ActivityTaskManager: Exception when starting activity
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:571)
at android.app.IApplicationThread$Stub$Proxy.scheduleTransaction(IApplicationThread.java:2732)

W/ActivityTaskManager: Failed to send top-resumed=true to ActivityRecord{9199e95 u0 t1186}
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:571)
at android.app.IApplicationThread$Stub$Proxy.scheduleTransaction(IApplicationThread.java:2732)

W/ActivityTaskManager: Failed to send top-resumed=false to ActivityRecord{9199e95 u0 t1186}
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:571)
at android.app.IApplicationThread$Stub$Proxy.scheduleTransaction(IApplicationThread.java:2732)

I/ActivityTaskManager: Restarting because process died: ActivityRecord{9199e95 u0 t1186}

E/ActivityTaskManager: Second failure launching , giving up
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:571)
at android.app.IApplicationThread$Stub$Proxy.scheduleTransaction(IApplicationThread.java:2732)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file, test, or entry point is identified. Start by reproducing the restart failure on Android 12 with v2.1.2 and compare the reported ActivityTaskManager logs with the app's process-restart flow. Done means the activity reliably restarts instead of reaching the reported second-launch failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.