Fixed
Status Update
Comments
wo...@gmail.com <wo...@gmail.com> #2
since these are in public API (:/) we need to do this in 1.2
[Deleted User] <[Deleted User]> #3
since it is already marked as deprecated, we can probably do it by now.
jf...@gmail.com <jf...@gmail.com> #4
Opening diff shortly
yb...@google.com <yb...@google.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
ah...@gmail.com <ah...@gmail.com> #6
Just wasted a couple of hours and wrote the same issue, but discarded it after seeing this one. Rolling back to 1.1.0-beta2
yb...@google.com <yb...@google.com> #7
#4 it is just a log not a problem, you can safely ignore that one.
jf...@gmail.com <jf...@gmail.com> #8
#7 Are you referring to "E/ROOM: Invalidation tracker is initialized twice :/." Log? I suppose you can ignore that, but in the case of a migration on 1.1.0 it shows that the `room_table_modification_log` was not created after the database was closed and reopened.
yb...@google.com <yb...@google.com> #9
yep, the modification log thing is an error we'll fix. the invalidation tracker thing is just a log that you can ignore in this case.
yb...@google.com <yb...@google.com> #10
I'm working on the fix, meanwhile please do not use 1.1 as it will break invalidation tracking post migration even if it does not crash.
wo...@gmail.com <wo...@gmail.com> #11
Thanks for keeping us updated. Maybe you can wait a little longer in the future between RC and release?
yb...@google.com <yb...@google.com> #12
we normally do (bake RCs 2 weeks). this was the push to ship things at IO :/ (conference deadlines).
and this bug was in beta but unfortunately didn't get caught until now :/
sorry about the issue, we'll ship a 1.1.1 RC soon.
and this bug was in beta but unfortunately didn't get caught until now :/
sorry about the issue, we'll ship a 1.1.1 RC soon.
aa...@gmail.com <aa...@gmail.com> #13
No it's not just a log problem. I added the migration of adding new column of string, in the first launch the first insert fails. So the data is lost.
aa...@gmail.com <aa...@gmail.com> #14
In my case, the error looks like:
Cannot run invalidation tracker. Is the db closed?
java.lang.IllegalStateException: The database '/data/data/com.pushcoin.app.reggie.debug/databases/reggie_transaction.db' is not open.
Cannot run invalidation tracker. Is the db closed?
java.lang.IllegalStateException: The database '/data/data/com.pushcoin.app.reggie.debug/databases/reggie_transaction.db' is not open.
yb...@google.com <yb...@google.com> #15
shipped in 1.1.1-rc1.
that CL only includes this fix so hopefully safe to migrate to .
that CL only includes this fix so hopefully safe to migrate to .
km...@gmail.com <km...@gmail.com> #16
I had same issue like Cannot run invalidation tracker. Is the db closed? on room version 1.0.0, but just log issue. (it didn't occur crash)
And I checked it was fixed on room version 1.1.1-rc1. I wonder when the official 1.1.1 version will be released?
And I checked it was fixed on room version 1.1.1-rc1. I wonder when the official 1.1.1 version will be released?
yb...@google.com <yb...@google.com> #17
we are just letting rc-1 bake to see if any error shows up. going clean so far so might release it in a week or two.
feel free to use it, it does not have any additional features etc.
feel free to use it, it does not have any additional features etc.
wo...@gmail.com <wo...@gmail.com> #18
I see this bug as really critical and would like to see a warning right here:
https://developer.android.com/topic/libraries/architecture/adding-components#room
That it crashes on migrations and strongly recommend users to use a previous version or the RC.
That it crashes on migrations and strongly recommend users to use a previous version or the RC.
tr...@gmail.com <tr...@gmail.com> #19
I'm getting this as well (when inserting a row after migrations), but I'm using the new Jetpack dependencies (androidx.room:room-runtime:2.0.0-alpha1). It sure seems as if the fix isn't included in that, but I wanted to double check in case the issue just hadn't been truly resolved yet.
b9...@gmail.com <b9...@gmail.com> #20
Yup how about androidx 2.0.0-alpha1?
yb...@google.com <yb...@google.com> #21
we'll ship a new version of androidX room to fix that. and hoping to ship 1.1.1 this week, we've not received any bugs and we see many people using it so should be fine by now.
jf...@gmail.com <jf...@gmail.com> #22
Is this fix now ? I'm having this issue!
b9...@gmail.com <b9...@gmail.com> #23
I could see 1.1.1 is shipped at 6/19 but androidX room hasn't released yet. :(
sw...@gmail.com <sw...@gmail.com> #24
I am also facing the same issue
yb...@google.com <yb...@google.com> #25
it is already shipped so please try with the latest version
de...@gmail.com <de...@gmail.com> #26
it is still happened with version 2.2.0-rc01
yb...@google.com <yb...@google.com>
al...@gmail.com <al...@gmail.com> #27
Hitting the same issue in Room 2.2.3. Looks like it was fixed in 1.1.1-rc1 according to some old comments, but it's broken again in Room 2.X.X.
yb...@google.com <yb...@google.com> #28
is it the same table modification log error? Can you share some data, which devices are you seeing it or are you able to reproduce?
vi...@gmail.com <vi...@gmail.com> #29
Crashing on Oneplus 6t Android 10. We're closing the database in onDestroy and seems like the only solution is to not close the database?
Room version 2.2.5
Room version 2.2.5
ch...@gmail.com <ch...@gmail.com> #30
Crashing on Room 2.2.0:
Device:
Pixel XL
Android 10
Security patch: October 6, 2019
Kernel: 3.18.137-g72a7a64494e
1 Fri Sep 27 18:40:34 UTC 2019
Build number: QP1A.191005.007.A3
Device:
Pixel XL
Android 10
Security patch: October 6, 2019
Kernel: 3.18.137-g72a7a64494e
1 Fri Sep 27 18:40:34 UTC 2019
Build number: QP1A.191005.007.A3
ho...@gmail.com <ho...@gmail.com> #31
After few days i found solution!
I got same issue like #4. And it comes on some devices like OnePlus 6t because application relaunch MainActivity at start, so when we call database.close() in activity OnDestroy() we also need set 'null' to database instance (if you use singleton class for working with your database). So i created my own function on my singleton database class and call it on in activity OnDestroy() function. Hope its helpful!
My database class:
abstract class AppDatabase: RoomDatabase() {
abstract fun TestDao(): TestDao
companion object {
@Volatile
private var INSTANCE: AppDatabase? = null
fun getDatabase(context: Context): AppDatabase{
val tempInstance = INSTANCE
if(tempInstance != null){
return tempInstance
}
synchronized(this){
val instance = Room.databaseBuilder(
context.applicationContext,
AppDatabase::class.java,
"database_name"
)
.build()
INSTANCE = instance
return instance
}
}
fun closeConnection() {
if(INSTANCE != null){
Log.i("room", "reset instance")
INSTANCE!!.close()
INSTANCE = null
}
}
}
}
I got same issue like #4. And it comes on some devices like OnePlus 6t because application relaunch MainActivity at start, so when we call database.close() in activity OnDestroy() we also need set 'null' to database instance (if you use singleton class for working with your database). So i created my own function on my singleton database class and call it on in activity OnDestroy() function. Hope its helpful!
My database class:
abstract class AppDatabase: RoomDatabase() {
abstract fun TestDao(): TestDao
companion object {
@Volatile
private var INSTANCE: AppDatabase? = null
fun getDatabase(context: Context): AppDatabase{
val tempInstance = INSTANCE
if(tempInstance != null){
return tempInstance
}
synchronized(this){
val instance = Room.databaseBuilder(
context.applicationContext,
AppDatabase::class.java,
"database_name"
)
.build()
INSTANCE = instance
return instance
}
}
fun closeConnection() {
if(INSTANCE != null){
Log.i("room", "reset instance")
INSTANCE!!.close()
INSTANCE = null
}
}
}
}
Description
Version used: 1.1.0-rc1
Devices/Android versions reproduced on: all
Seeing many crashes when users update to our latest build using Room 1.1.0-rc1. I've included a stack-trace here.
It seems to be crashing once when the user upgrades to this build, then not on future launches of that same build. Maybe Room isn't creating this table in time?