Status Update
Comments
da...@google.com <da...@google.com> #2
ma...@gmail.com <ma...@gmail.com> #3
da...@google.com <da...@google.com> #4
ma...@gmail.com <ma...@gmail.com> #5
da...@google.com <da...@google.com> #6
However, more I look at the code, more I believe the problem is elsewhere. If the migration fails, there will be no `SQLiteDatabase` and no `getWrappedDb(db)`. According to the code of `SQLiteOpenHelper`, there should be only one query before migration. The list of queries should be:
PRAGMA user_version;
DROP TABLE IF EXISTS `tracking_events` <--- this fails due closed database
DROP TABLE IF EXISTS `items` <-- never happens
More findings caught by my eye:
- I tried to make sure all DAO queries happen on a single thread. No success.
- The crash happens on a small number of users, but users get many crashes. I am afraid the user is unable to launch the app.
- Most crashes come from Samsung devices. But `SQLiteOpenHelper` class were not changed. All lines of stacktrace matches.
- `SQLiteOpenHelper` was constructed only once for `vinted_database.db`. However, meminfo shows something I don't understand:
DATABASES
pgsz dbsz Lookaside(b) cache Dbname
4 512 61 104/135/8 /data/user/0/
4 8 0/0/0 (attached) temp
4 512 25 35/14/2 /data/user/0/
Looks like database was opened two times. There was opened more databases in my app, but no one appears in this list.
What else I could check?
da...@google.com <da...@google.com> #7
See this patch and specifically the test in it:
When the DB is corrupted (outside your control, and very little to do really) then the DB is immediately closed in hopes of creating a new DB (and a new object). What ends up happening is the corrupted object is still used causing the first db operation to fail (in this case a migration or that DROP TABLE IF EXISTS).
ma...@gmail.com <ma...@gmail.com> #8
da...@google.com <da...@google.com> #9
Oh, oh! Thanks for trying it out, will take a deeper look!
ko...@dumps.app <ko...@dumps.app> #10
I started seeing this too, trying to upgrade from 2.7.0-alpha11
to alpha13
(also tried alpha12
)
It looks like it's not handling suspend fun
name mangling correctly when overriding?
da...@google.com <da...@google.com> #11
I think the issue is with internal
functions and not suspend
as those are the ones that are mangled. Sorry a fix for this didn't make it to alpha13, I'll work on a fix soon.
ap...@google.com <ap...@google.com> #12
Project: platform/frameworks/support
Branch: androidx-main
Author: Daniel Santiago Rivera <
Link:
Sanitize DAO Java method names mangled by value classes.
Expand for full commit details
Sanitize DAO Java method names mangled by value classes.
Bug: 384600605
Bug: 388299754
Test: DaoKotlinCodeGenTest.kt
Change-Id: I805ae6828bf45de82f4bcec55af4528ccd16d00a
Files:
- M
room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/util/NamingUtils.kt
- M
room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
- M
room/room-compiler/src/test/test-data/kotlinCodeGen/dataClassRowAdapter_valueClassConverter.kt
Hash: 93666e398595454b46279c8ea2b8e746363971eb
Date: Wed Jan 29 15:54:02 2025
da...@google.com <da...@google.com>
pr...@google.com <pr...@google.com> #13
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.core:core-viewtree:1.0.0-rc01
androidx.room:room-compiler:2.7.0-beta01
androidx.room:room-compiler-processing:2.7.0-beta01
Description
Version used:
Version used: 2.7.0-alpha12
Ksp error due to invalid name: