Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 434c4044816dfa614b641c41f1e31103e7145e78
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Sun May 26 10:30:23 2019
Use local ArraySet instead of field BitSet for tables invalid statuses.
State touched within the Refresh Runnable has to be thread safe and
BitSet is not thread-safe and was not synchronized externally. It is
best to take some performance penalty by not having a field. Instead
we create a ArraySet of invalid tables locally for every refresh. This
keeps things simple and we avoid the complexity of synchronizing the
invalid statuses.
Bug: 133457594
Test: Write a multi-threaded test? Lets just say all tests pass. :)
Change-Id: Iddedbf17cef9daf264569b027c8ff199c9813267
M room/runtime/src/main/java/androidx/room/InvalidationTracker.java
https://android-review.googlesource.com/971069
https://goto.google.com/android-sha1/434c4044816dfa614b641c41f1e31103e7145e78
Branch: androidx-master-dev
commit 434c4044816dfa614b641c41f1e31103e7145e78
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Sun May 26 10:30:23 2019
Use local ArraySet instead of field BitSet for tables invalid statuses.
State touched within the Refresh Runnable has to be thread safe and
BitSet is not thread-safe and was not synchronized externally. It is
best to take some performance penalty by not having a field. Instead
we create a ArraySet of invalid tables locally for every refresh. This
keeps things simple and we avoid the complexity of synchronizing the
invalid statuses.
Bug: 133457594
Test: Write a multi-threaded test? Lets just say all tests pass. :)
Change-Id: Iddedbf17cef9daf264569b027c8ff199c9813267
M room/runtime/src/main/java/androidx/room/InvalidationTracker.java
da...@google.com <da...@google.com> #3
Thanks for the bug report, a fix for this will be available in Room 2.1.0-rc01
Description
Devices/Android versions reproduced on: Galaxy s8+ 9.0
E java.lang.ArrayIndexOutOfBoundsException: length=1; index=-1
E at java.util.BitSet.clear(BitSet.java:608)
E at androidx.room.InvalidationTracker$1.run(InvalidationTracker.java:422)
E at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E at java.lang.Thread.run(Thread.java:764)
No any other log, just crash on this log