Fixed
Status Update
Comments
ra...@google.com <ra...@google.com>
ot...@gmail.com <ot...@gmail.com> #2
since these are in public API (:/) we need to do this in 1.2
ot...@gmail.com <ot...@gmail.com> #3
since it is already marked as deprecated, we can probably do it by now.
ru...@gmail.com <ru...@gmail.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d576cbdc911cba16638a44fd8223391a90a07ef7
Author: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
Date: Tue Aug 11 09:30:34 2020
[GH] Hide deprecated internal API.
## Proposed Changes
* `RoomDatabase.java` has protected `mCallbacks` field which is leaking in the API docs, we should @Hide it.
## Testing
Test: Ran unit tests locally
## Issues Fixed
Fixes: 76109329
This is an imported pull request fromhttps://github.com/androidx/androidx/pull/61 .
Resolves #61
Github-Pr-Head-Sha: 6440daa3a63752c7f9d5ba2a390248cd85bc634f
GitOrigin-RevId: fe92d8466a59b44b218b6ca3cbd57dcda17992f7
Change-Id: Id599cdf5b02b32bdae0166266fb7da967598fe92
A room/runtime/api/current.ignore
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
https://android-review.googlesource.com/1396827
Branch: androidx-master-dev
commit d576cbdc911cba16638a44fd8223391a90a07ef7
Author: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
Date: Tue Aug 11 09:30:34 2020
[GH] Hide deprecated internal API.
## Proposed Changes
* `RoomDatabase.java` has protected `mCallbacks` field which is leaking in the API docs, we should @Hide it.
## Testing
Test: Ran unit tests locally
## Issues Fixed
Fixes: 76109329
This is an imported pull request from
Resolves #61
Github-Pr-Head-Sha: 6440daa3a63752c7f9d5ba2a390248cd85bc634f
GitOrigin-RevId: fe92d8466a59b44b218b6ca3cbd57dcda17992f7
Change-Id: Id599cdf5b02b32bdae0166266fb7da967598fe92
A room/runtime/api/current.ignore
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
ra...@google.com <ra...@google.com> #6
Yes, it will.
ru...@gmail.com <ru...@gmail.com> #7
Seems like it's still not fixed:
Fatal Exception: java.util.ConcurrentModificationException
at java.util.WeakHashMap$HashIterator.next(WeakHashMap.java:165)
at androidx.work.impl.utils.WakeLocks.checkWakeLocks(WakeLocks.java:78)
at androidx.work.impl.background.systemalarm.SystemAlarmService.onAllCommandsCompleted(SystemAlarmService.java:69)
at androidx.work.impl.background.systemalarm.SystemAlarmDispatcher.dequeueAndCheckForCompletion(SystemAlarmDispatcher.java:217)
at androidx.work.impl.background.systemalarm.SystemAlarmDispatcher$DequeueAndCheckForCompletion.run(SystemAlarmDispatcher.java:317)
at android.os.Handler.handleCallback(Handler.java:810)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:189)
at android.app.ActivityThread.main(ActivityThread.java:5532)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:950)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
Fatal Exception: java.util.ConcurrentModificationException
at java.util.WeakHashMap$HashIterator.next(WeakHashMap.java:165)
at androidx.work.impl.utils.WakeLocks.checkWakeLocks(WakeLocks.java:78)
at androidx.work.impl.background.systemalarm.SystemAlarmService.onAllCommandsCompleted(SystemAlarmService.java:69)
at androidx.work.impl.background.systemalarm.SystemAlarmDispatcher.dequeueAndCheckForCompletion(SystemAlarmDispatcher.java:217)
at androidx.work.impl.background.systemalarm.SystemAlarmDispatcher$DequeueAndCheckForCompletion.run(SystemAlarmDispatcher.java:317)
at android.os.Handler.handleCallback(Handler.java:810)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:189)
at android.app.ActivityThread.main(ActivityThread.java:5532)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:950)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
ru...@gmail.com <ru...@gmail.com> #8
Still happened on beta02, Android 5.0.2
ru...@gmail.com <ru...@gmail.com> #9
Sample app here: https://issuetracker.google.com/issues/121345393
It's hard to reproduce with SystemAlarmService.onAllCommandsCompleted. Only managed to do it once but it was just luck. The sample app crashes more often though.
It's hard to reproduce with SystemAlarmService.onAllCommandsCompleted. Only managed to do it once but it was just luck. The sample app crashes more often though.
ra...@google.com <ra...@google.com> #11
Thanks for the bug report and the sample app. Will take another look.
su...@google.com <su...@google.com> #12
Why are you calling a hidden method (WakeLocks#checkWakeLocks) yourself?
ru...@gmail.com <ru...@gmail.com> #13
Just to reproduce the crash faster. I don't call this on the production app.
su...@google.com <su...@google.com>
ru...@gmail.com <ru...@gmail.com> #15
Thanks a lot for fixing it quickly ;)
md...@gmail.com <md...@gmail.com> #16
It still seems to happen for me using beta02:
java.util.WeakHashMap$HashIterator.next (WeakHashMap.java:165)
androidx.work.impl.utils.WakeLocks.checkWakeLocks (WakeLocks.java:78)
androidx.work.impl.background.systemalarm.SystemAlarmService.onAllCommandsCompleted (SystemAlarmService.java:69)
androidx.work.impl.background.systemalarm.SystemAlarmDispatcher.dequeueAndCheckForCompletion (SystemAlarmDispatcher.java:217)
androidx.work.impl.background.systemalarm.SystemAlarmDispatcher$DequeueAndCheckForCompletion.run (SystemAlarmDispatcher.java:317)
android.os.Handler.handleCallback (Handler.java:815)
android.os.Handler.dispatchMessage (Handler.java:104)
android.os.Looper.loop (Looper.java:194)
android.app.ActivityThread.main (ActivityThread.java:5624)
java.lang.reflect.Method.invoke (Method.java)
java.lang.reflect.Method.invoke (Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:959)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:754)
Stacktrace is from a X5pro running Android 5.1.
java.util.WeakHashMap$HashIterator.next (WeakHashMap.java:165)
androidx.work.impl.utils.WakeLocks.checkWakeLocks (WakeLocks.java:78)
androidx.work.impl.background.systemalarm.SystemAlarmService.onAllCommandsCompleted (SystemAlarmService.java:69)
androidx.work.impl.background.systemalarm.SystemAlarmDispatcher.dequeueAndCheckForCompletion (SystemAlarmDispatcher.java:217)
androidx.work.impl.background.systemalarm.SystemAlarmDispatcher$DequeueAndCheckForCompletion.run (SystemAlarmDispatcher.java:317)
android.os.Handler.handleCallback (Handler.java:815)
android.os.Handler.dispatchMessage (Handler.java:104)
android.os.Looper.loop (Looper.java:194)
android.app.ActivityThread.main (ActivityThread.java:5624)
java.lang.reflect.Method.invoke (Method.java)
java.lang.reflect.Method.invoke (Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:959)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:754)
Stacktrace is from a X5pro running Android 5.1.
ra...@google.com <ra...@google.com> #17
Another fix will be available in beta03.
Description
Version used: alpha13
Devices/Android versions reproduced on: 5.1.1
Got this crash through crashlytics. App wasn't in background
Fatal Exception: java.util.ConcurrentModificationException
at java.util.WeakHashMap$HashIterator.next(WeakHashMap.java:165)
at androidx.work.impl.utils.WakeLocks.checkWakeLocks(WakeLocks.java:70)
at androidx.work.impl.background.systemalarm.SystemAlarmService.onAllCommandsCompleted(SystemAlarmService.java:69)
at androidx.work.impl.background.systemalarm.SystemAlarmDispatcher.dequeueAndCheckForCompletion(SystemAlarmDispatcher.java:215)
at androidx.work.impl.background.systemalarm.SystemAlarmDispatcher$DequeueAndCheckForCompletion.run(SystemAlarmDispatcher.java:315)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5675)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)