Status Update
Comments
ra...@google.com <ra...@google.com>
ra...@google.com <ra...@google.com>
at...@bloomberg.net <at...@bloomberg.net> #2
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
su...@google.com <su...@google.com> #3
Tested on Android 12 Emulator with custom executor, but cannot repro this issue.
at...@bloomberg.net <at...@bloomberg.net> #4
-
Second crash in the description is from a real device. Experienced it myself on two different Xiaomi phones, plus lots of crashes from users in the Google Play console.
-
Dynamic features are not used in the application.
As a wild guess, I have downgraded build tools from 31.0.0 to 30.0.3, compileSdk from 31 to 30, and moved all work with Language ID to the service in a separate process (just to be sure that crash can kill secondary process instead of main). This combination is in beta for 2 days by now and I don't see any SIGSEGV crashes.
su...@google.com <su...@google.com> #5
Hmm, I feel the crash might be something related to separate/secondary process.
I also changed compileSdk and targetSDK to 31 but still cannot repro this issue.
Description
Version used: 1.0.0-alpha
Devices/Android versions reproduced on: Emulator API 27
PeriodicWork is rescheduled each time cold start.
So JobService will be registered as many times as cold start.
- Sample project to trigger the issue.
- Reproduction
1. Launch WorkManagerSample app
2. Push [SCHEDULE] button. (will scheduled the 15min interval Worker)
3. Exit app and Clear app history(from the ■ button)
4. Launch WorkManagerSample app again(cold start)
- Result of [>>adb shell dumpsys jobscheduler]. (scheduled 2 jobs...)
JOB #u0a80/4: c32b177 com.example.workmanagersample/androidx.work.impl.background.systemjob.SystemJobService
u0a80 tag=*job*/com.example.workmanagersample/androidx.work.impl.background.systemjob.SystemJobService
Source: uid=u0a80 user=0 pkg=com.example.workmanagersample
JobInfo:
Service: com.example.workmanagersample/androidx.work.impl.background.systemjob.SystemJobService
PERIODIC: interval=+15m0s0ms flex=+15m0s0ms
PERSISTED
Requires: charging=false batteryNotLow=false deviceIdle=false
Extras: {EXTRA_WORK_SPEC_ID=c46ef83e-13b1-4595-888e-b80a4c8a72cf, EXTRA_IS_PERIODIC=true}
Backoff: policy=1 initial=+30s0ms
Has early constraint
Has late constraint
Required constraints: TIMING_DELAY DEADLINE
Satisfied constraints: APP_NOT_IDLE DEVICE_NOT_DOZING
Unsatisfied constraints: TIMING_DELAY DEADLINE
Tracking: TIME
Enqueue time: -4m46s595ms
Run time: earliest=+10m7s569ms, latest=+25m7s569ms
Last successful run: 2018-05-14 04:49:01
Ready: false (job=false user=true !pending=true !active=true !backingup=true comp=true)
JOB #u0a80/5: 93cf1f3 com.example.workmanagersample/androidx.work.impl.background.systemjob.SystemJobService
u0a80 tag=*job*/com.example.workmanagersample/androidx.work.impl.background.systemjob.SystemJobService
Source: uid=u0a80 user=0 pkg=com.example.workmanagersample
JobInfo:
Service: com.example.workmanagersample/androidx.work.impl.background.systemjob.SystemJobService
PERIODIC: interval=+15m0s0ms flex=+15m0s0ms
PERSISTED
Requires: charging=false batteryNotLow=false deviceIdle=false
Extras: {EXTRA_WORK_SPEC_ID=c46ef83e-13b1-4595-888e-b80a4c8a72cf, EXTRA_IS_PERIODIC=true}
Backoff: policy=1 initial=+30s0ms
Has early constraint
Has late constraint
Required constraints: TIMING_DELAY DEADLINE
Satisfied constraints: APP_NOT_IDLE DEVICE_NOT_DOZING
Unsatisfied constraints: TIMING_DELAY DEADLINE
Tracking: TIME
Enqueue time: -2m12s405ms
Run time: earliest=+12m29s338ms, latest=+27m29s338ms
Last successful run: 2018-05-14 04:51:35
Ready: false (job=false user=true !pending=true !active=true !backingup=true comp=true)