Fixed
Status Update
Comments
st...@rewe-digital.com <st...@rewe-digital.com> #2
Cant be reproduced on Google Pixel with Android 7.1.
st...@rewe-digital.com <st...@rewe-digital.com> #3
Cant be reproduced on a Samsung Galaxy S? with Android 6.0.
st...@rewe-digital.com <st...@rewe-digital.com> #4
Can be reproduces on Motorola Moto G 4 with Android 7.0
yb...@google.com <yb...@google.com> #5
it seems like a segmentation fault in the sqlite shipped w/ G4. Not sure if we can do anything about it :(
st...@rewe-digital.com <st...@rewe-digital.com> #6
Thanks for the feedback. We will try to test it on a device different the motorola but with Android 7.0
yb...@google.com <yb...@google.com> #7
Btw, if this is a serious issue, you can consider shipping SQLite with your app and implement the Open Helper that delegates to it (you can provide the open helper in the Room builder). You can check the support-db & support-db-impl artifacts for details.
me...@google.com <me...@google.com> #8
I was not able to re-route this to a partner component, so just created a new buganizer....
me...@google.com <me...@google.com> #9
Stefan, can you please provide a bugreport taken after the issue is reproduced?
st...@rewe-digital.com <st...@rewe-digital.com> #10
Up to now we only can reproduce the bug on Motorola Moto G4 and G5 with Android 7. We can not reproduce on LG G6 with Android 7. So it really seems to be a problem with SQLite on Moto G.
What's even more strange is that we have a branch with sqlight and sqlbrite as persistence framework (the one we startet with before we migrated to Room) an can not reproduce the bug there, although Brite also calls SQLightDatabase::endTransaction in the same way as Room.
We will try to investigate further.
What exactly do you mean with "provide a bugreport"?
Kind Regards
Stefan
What's even more strange is that we have a branch with sqlight and sqlbrite as persistence framework (the one we startet with before we migrated to Room) an can not reproduce the bug there, although Brite also calls SQLightDatabase::endTransaction in the same way as Room.
We will try to investigate further.
What exactly do you mean with "provide a bugreport"?
Kind Regards
Stefan
me...@google.com <me...@google.com> #11
1. Enable Developer Options
Open the Settings app
Scroll to the bottom
Tap About Phone or About Device
Scroll down to the bottom
Tap Build Number 5 times
You will see the message: Congratulations you are now a Developer
Tap back
Tap Developer Options
Turn USB Debugging on
Now you should reproduce the issue and then:
2. Take Bug Report
Open the Settings App
Scroll to the bottom
Tap Developer Options
Tap Take Bug Report
This will generate a bugreport that you can attach here.
Open the Settings app
Scroll to the bottom
Tap About Phone or About Device
Scroll down to the bottom
Tap Build Number 5 times
You will see the message: Congratulations you are now a Developer
Tap back
Tap Developer Options
Turn USB Debugging on
Now you should reproduce the issue and then:
2. Take Bug Report
Open the Settings App
Scroll to the bottom
Tap Developer Options
Tap Take Bug Report
This will generate a bugreport that you can attach here.
st...@rewe-digital.com <st...@rewe-digital.com> #12
Here's the Bug Report generated after the Android Tests causes the crash.
me...@google.com <me...@google.com>
me...@google.com <me...@google.com> #13
Feedback from Motorola:
As seen from the attached bugreport can see Tombstone happening in the process of "de.rewe.digital.deliveryheroturtle.debug" lot of times. At time stamp "07-05 22:31:34"
07-05 22:31:34.181 17776 17793 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 17793 (roidJUnitRunner)
07-05 22:31:34.262 17796 17796 F DEBUG : pid: 17776, tid: 17793, name: roidJUnitRunner >>> de.rewe.digital.deliveryheroturtle.debug <<<
07-05 22:31:34.262 17796 17796 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
After that started "de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest" test (07-13 08:32:17), It's throwing SQLiteException as there is no table with the name of "room_table_modification_log" while compiling this query "SELECT * FROM room_table_modification_log WHERE version > ? ORDER BY version ASC;".
07-13 08:32:17.296 21784 21801 I TestRunner: started: saveTourEmitsOnlyOneGetLoadUnitsEvent(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)
07-13 08:32:17.298 21784 21809 E ROOM : Invalidation tracker is initialized twice :/.
07-13 08:32:17.298 21784 21809 E SQLiteLog: (1) no such table: room_table_modification_log
07-13 08:32:17.300 21784 21784 I MonitoringInstrumentation: Activities that are still in CREATED to STOPPED: 0
07-13 08:32:17.311 21784 21809 E ROOM : Cannot run invalidation tracker. Is the db closed?
07-13 08:32:17.311 21784 21809 E ROOM : android.database.sqlite.SQLiteException: no such table: room_table_modification_log (code 1): , while compiling: SELECT * FROM room_table_modification_log WHERE version > ? ORDER BY version ASC;
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1318)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1293)
07-13 08:32:17.311 21784 21809 E ROOM : at android.arch.persistence.db.framework.FrameworkSQLiteDatabase.query(FrameworkSQLiteDatabase.java:160)
07-13 08:32:17.311 21784 21809 E ROOM : at android.arch.persistence.room.RoomDatabase.query(RoomDatabase.java:156)
07-13 08:32:17.311 21784 21809 E ROOM : at android.arch.persistence.room.InvalidationTracker$2.run(InvalidationTracker.java:354)
07-13 08:32:17.311 21784 21809 E ROOM : at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
07-13 08:32:17.311 21784 21809 E ROOM : at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
07-13 08:32:17.311 21784 21809 E ROOM : at java.lang.Thread.run(Thread.java:761)
07-13 08:32:17.373 21784 21801 I TestRunner: finished: saveTourEmitsOnlyOneGetLoadUnitsEvent(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)
later trying to start "savesInvalidTour(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)" throwing below error.
07-13 08:33:07.382 21912 21927 I TestRunner: started: savesInvalidTour(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)
07-13 08:33:07.429 21912 21927 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 21927 (roidJUnitRunner)
07-13 08:33:07.431 436 436 W : debuggerd: handling request: pid=21912 uid=10127 gid=10127 tid=21927
07-13 08:33:07.535 21930 21930 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-13 08:33:07.535 21930 21930 F DEBUG : Build fingerprint: 'motorola/cedric/cedric:7.0/NPP25.137-72/75:user/release-keys'
07-13 08:33:07.535 21930 21930 F DEBUG : Revision: 'p500'
07-13 08:33:07.535 21930 21930 F DEBUG : ABI: 'arm'
07-13 08:33:07.536 21930 21930 F DEBUG : pid: 21912, tid: 21927, name: roidJUnitRunner >>> de.rewe.digital.deliveryheroturtle.debug <<<
07-13 08:33:07.536 21930 21930 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Here i can see two things:
Case 1 :
After starting of test "saveTourEmitsOnlyOneGetLoadUnitsEvent(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest) throws SQLException.
Case 2:
After starting of test "savesInvalidTour(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)" throws tombstone.
@Reporter, can you please clarify if Case 1 & Case 2 are two different test cases? Because we can see method names are different.
Also, did any products pass with mentioned code snippet? If yes, can you please share a success log for reference?
As seen from the attached bugreport can see Tombstone happening in the process of "de.rewe.digital.deliveryheroturtle.debug" lot of times. At time stamp "07-05 22:31:34"
07-05 22:31:34.181 17776 17793 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 17793 (roidJUnitRunner)
07-05 22:31:34.262 17796 17796 F DEBUG : pid: 17776, tid: 17793, name: roidJUnitRunner >>> de.rewe.digital.deliveryheroturtle.debug <<<
07-05 22:31:34.262 17796 17796 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
After that started "de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest" test (07-13 08:32:17), It's throwing SQLiteException as there is no table with the name of "room_table_modification_log" while compiling this query "SELECT * FROM room_table_modification_log WHERE version > ? ORDER BY version ASC;".
07-13 08:32:17.296 21784 21801 I TestRunner: started: saveTourEmitsOnlyOneGetLoadUnitsEvent(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)
07-13 08:32:17.298 21784 21809 E ROOM : Invalidation tracker is initialized twice :/.
07-13 08:32:17.298 21784 21809 E SQLiteLog: (1) no such table: room_table_modification_log
07-13 08:32:17.300 21784 21784 I MonitoringInstrumentation: Activities that are still in CREATED to STOPPED: 0
07-13 08:32:17.311 21784 21809 E ROOM : Cannot run invalidation tracker. Is the db closed?
07-13 08:32:17.311 21784 21809 E ROOM : android.database.sqlite.SQLiteException: no such table: room_table_modification_log (code 1): , while compiling: SELECT * FROM room_table_modification_log WHERE version > ? ORDER BY version ASC;
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1318)
07-13 08:32:17.311 21784 21809 E ROOM : at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1293)
07-13 08:32:17.311 21784 21809 E ROOM : at android.arch.persistence.db.framework.FrameworkSQLiteDatabase.query(FrameworkSQLiteDatabase.java:160)
07-13 08:32:17.311 21784 21809 E ROOM : at android.arch.persistence.room.RoomDatabase.query(RoomDatabase.java:156)
07-13 08:32:17.311 21784 21809 E ROOM : at android.arch.persistence.room.InvalidationTracker$2.run(InvalidationTracker.java:354)
07-13 08:32:17.311 21784 21809 E ROOM : at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
07-13 08:32:17.311 21784 21809 E ROOM : at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
07-13 08:32:17.311 21784 21809 E ROOM : at java.lang.Thread.run(Thread.java:761)
07-13 08:32:17.373 21784 21801 I TestRunner: finished: saveTourEmitsOnlyOneGetLoadUnitsEvent(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)
later trying to start "savesInvalidTour(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)" throwing below error.
07-13 08:33:07.382 21912 21927 I TestRunner: started: savesInvalidTour(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)
07-13 08:33:07.429 21912 21927 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 21927 (roidJUnitRunner)
07-13 08:33:07.431 436 436 W : debuggerd: handling request: pid=21912 uid=10127 gid=10127 tid=21927
07-13 08:33:07.535 21930 21930 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-13 08:33:07.535 21930 21930 F DEBUG : Build fingerprint: 'motorola/cedric/cedric:7.0/NPP25.137-72/75:user/release-keys'
07-13 08:33:07.535 21930 21930 F DEBUG : Revision: 'p500'
07-13 08:33:07.535 21930 21930 F DEBUG : ABI: 'arm'
07-13 08:33:07.536 21930 21930 F DEBUG : pid: 21912, tid: 21927, name: roidJUnitRunner >>> de.rewe.digital.deliveryheroturtle.debug <<<
07-13 08:33:07.536 21930 21930 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Here i can see two things:
Case 1 :
After starting of test "saveTourEmitsOnlyOneGetLoadUnitsEvent(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest) throws SQLException.
Case 2:
After starting of test "savesInvalidTour(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)" throws tombstone.
@Reporter, can you please clarify if Case 1 & Case 2 are two different test cases? Because we can see method names are different.
Also, did any products pass with mentioned code snippet? If yes, can you please share a success log for reference?
st...@rewe-digital.com <st...@rewe-digital.com> #14
Hello,
thanks for the in depth investigation of the problem!
> can you please clarify if Case 1 & Case 2 are two different test cases?
Yes, they are. Find enclosed a new bug report taken after running the test class TourRepositoryTest containing only the relevant test case "savesInvalidTour" that fails.
I will try to provide a bug report for the success case as soon as possible.
Stefan
thanks for the in depth investigation of the problem!
> can you please clarify if Case 1 & Case 2 are two different test cases?
Yes, they are. Find enclosed a new bug report taken after running the test class TourRepositoryTest containing only the relevant test case "savesInvalidTour" that fails.
I will try to provide a bug report for the success case as soon as possible.
Stefan
st...@rewe-digital.com <st...@rewe-digital.com> #15
Hello,
find enclosed a bug report taken from a Honeywell CT50 with Android 4.4.4 after a successful test run.
Stefan
find enclosed a bug report taken from a Honeywell CT50 with Android 4.4.4 after a successful test run.
Stefan
me...@google.com <me...@google.com> #16
From Motorola:
As seen from provided bugreport (NPP25.137-72-xxxx) here initially started 15 test cases in that 14th case was "savesInvalidTour" but if you while running like this module time this case was "Ignored" .
Later after sometime started 2 test cases in that second case was this ...2d time on-words started failing and throwing tombstone & even 3rd time started only this test case this time too thrown tombstone.
I am bit surprised that while running first time module level 15 cases this test case was ignored second & third time on-words throwing tombstone.
Line 15308: 07-19 10:47:31.145 19227 19242 I TestRunner: run started: 15 tests
Line 15510: 07-19 10:47:33.313 19227 19242 I TestRunner: ignored: savesInvalidTour(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)
Line 15515: 07-19 10:47:33.376 19227 19242 I TestRunner: run finished: 14 tests, 0 failed, 1 ignored
07-19 10:54:33.370 19667 19682 I TestRunner: run started: 2 tests
07-19 10:54:33.444 19667 19682 I TestRunner: started: savesInvalidTour(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)
--------- beginning of crash
07-19 10:54:33.490 19667 19682 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 19682 (roidJUnitRunner)
07-19 10:54:33.494 436 436 W : debuggerd: handling request: pid=19667 uid=10130 gid=10130 tid=19682
07-19 10:54:33.524 6605 15447 I Icing : Indexing DCEAADE94379795E2452642B108B99389559E002 from com.google.android.gms
07-19 10:54:33.526 6605 15447 I Icing : Indexing done DCEAADE94379795E2452642B108B99389559E002
07-19 10:54:33.608 19686 19686 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-19 10:54:33.609 19686 19686 F DEBUG : Build fingerprint: 'motorola/cedric/cedric:7.0/NPP25.137-72/75:user/release-keys'
Looked on attached Honeywell reference logs ...This Test started & thrown "android.database.sqlite.SQLiteConstraintException" and finished.
We will look deeply on this issue & update . By the way is it possible our device do Backup & Reset after fresh device run only the
"savesInvalidTour(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest) " , let us update status?
Is it possible to provide this apk (>>>de.rewe.digital.deliveryheroturtle.debug<<<) and can you provide a test steps reproduce issues.
As seen from provided bugreport (NPP25.137-72-xxxx) here initially started 15 test cases in that 14th case was "savesInvalidTour" but if you while running like this module time this case was "Ignored" .
Later after sometime started 2 test cases in that second case was this ...2d time on-words started failing and throwing tombstone & even 3rd time started only this test case this time too thrown tombstone.
I am bit surprised that while running first time module level 15 cases this test case was ignored second & third time on-words throwing tombstone.
Line 15308: 07-19 10:47:31.145 19227 19242 I TestRunner: run started: 15 tests
Line 15510: 07-19 10:47:33.313 19227 19242 I TestRunner: ignored: savesInvalidTour(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)
Line 15515: 07-19 10:47:33.376 19227 19242 I TestRunner: run finished: 14 tests, 0 failed, 1 ignored
07-19 10:54:33.370 19667 19682 I TestRunner: run started: 2 tests
07-19 10:54:33.444 19667 19682 I TestRunner: started: savesInvalidTour(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest)
--------- beginning of crash
07-19 10:54:33.490 19667 19682 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 19682 (roidJUnitRunner)
07-19 10:54:33.494 436 436 W : debuggerd: handling request: pid=19667 uid=10130 gid=10130 tid=19682
07-19 10:54:33.524 6605 15447 I Icing : Indexing DCEAADE94379795E2452642B108B99389559E002 from com.google.android.gms
07-19 10:54:33.526 6605 15447 I Icing : Indexing done DCEAADE94379795E2452642B108B99389559E002
07-19 10:54:33.608 19686 19686 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-19 10:54:33.609 19686 19686 F DEBUG : Build fingerprint: 'motorola/cedric/cedric:7.0/NPP25.137-72/75:user/release-keys'
Looked on attached Honeywell reference logs ...This Test started & thrown "android.database.sqlite.SQLiteConstraintException" and finished.
We will look deeply on this issue & update . By the way is it possible our device do Backup & Reset after fresh device run only the
"savesInvalidTour(de.rewe.digital.deliveryheroturtle.persistence.repository.TourRepositoryTest) " , let us update status?
Is it possible to provide this apk (>>>de.rewe.digital.deliveryheroturtle.debug<<<) and can you provide a test steps reproduce issues.
st...@rewe-digital.com <st...@rewe-digital.com> #17
Hello,
thanks for investigating this issue!
To clarify:
The test method savesInvalidTour saves tour data that intentionally causes a unique constraint violation exception and verifies that a rollback happens and the expected exception is thrown.
This test runs fine on our main production devices, the Honeywell CT50 with Android 4.4.4, and on various other android devices we use, except of Motorola Moto G with Android 7. Therefore we ignore this test case until we find a way to make it pass on Motorola Moto G.
To provide you with a bug report showing the problem we deleted the Ignore annotation and all other test method in the relevant test class.
Unfortunately we can not simply provide you the APK of our app. But we will try to build a small sample app that ("hopefully") reproduced the issue.
Regards
Stefan
thanks for investigating this issue!
To clarify:
The test method savesInvalidTour saves tour data that intentionally causes a unique constraint violation exception and verifies that a rollback happens and the expected exception is thrown.
This test runs fine on our main production devices, the Honeywell CT50 with Android 4.4.4, and on various other android devices we use, except of Motorola Moto G with Android 7. Therefore we ignore this test case until we find a way to make it pass on Motorola Moto G.
To provide you with a bug report showing the problem we deleted the Ignore annotation and all other test method in the relevant test class.
Unfortunately we can not simply provide you the APK of our app. But we will try to build a small sample app that ("hopefully") reproduced the issue.
Regards
Stefan
st...@rewe-digital.com <st...@rewe-digital.com> #18
For your information: The bug also occures with Android Room Alpha 5.
me...@google.com <me...@google.com>
me...@google.com <me...@google.com> #19
If you provide a test application with this test case that will be helpful for us to reproduce and provide test steps too.
Checked on Honeywell success logs after test started and observed it throws an exception. Is it possible to provide logs for any product which is on Android 7.0 version like Nexus logs or any competitor OEM device logs which on latest 7.0/7.1 OS. It's helpful to compare, thanks!!
In parallel we have requested framework team to look more into this issue.
Checked on Honeywell success logs after test started and observed it throws an exception. Is it possible to provide logs for any product which is on Android 7.0 version like Nexus logs or any competitor OEM device logs which on latest 7.0/7.1 OS. It's helpful to compare, thanks!!
In parallel we have requested framework team to look more into this issue.
st...@rewe-digital.com <st...@rewe-digital.com> #20
Hello.
Regarding the exception thrown: The test expects a SQLiteConstraintException to be thrown and then a transaction rollback. On Honeywell this works fine, on Moto G the rollback causes the SIGSEGV in android.database.sqlite.SQLiteConnection.nativeExecute+102.
I'm on holydays now for two and a half week. I will ask a colleague to provide a bug report from a different Android 7.0 device.
Regarding the sample app: I'm not sure when I can build one but will do it as soon as possible.
Regards
Stefan
Regarding the exception thrown: The test expects a SQLiteConstraintException to be thrown and then a transaction rollback. On Honeywell this works fine, on Moto G the rollback causes the SIGSEGV in android.database.sqlite.SQLiteConnection.nativeExecute+102.
I'm on holydays now for two and a half week. I will ask a colleague to provide a bug report from a different Android 7.0 device.
Regarding the sample app: I'm not sure when I can build one but will do it as soon as possible.
Regards
Stefan
me...@google.com <me...@google.com> #21
From Motorola: Stefan, can you please update reference device to Android 7.0 or 7.1.1 and attach success case logs & sample app with this test case. And provide test execution steps please, thanks!
st...@rewe-digital.com <st...@rewe-digital.com> #22
Hi. I'm currently on holiday with very poor internet access, so sorry for the delay.
The device we you in production, Honeywell CT50 with Android 4.4.4, can not be updated to Android 7.x unfortunately.
I will try to provide a success case log with a Google Phone as soon as possible.
I will also try to build a small sample app and try to reproduce the bug with it as soon as possible too.
Regards
Stefan
The device we you in production, Honeywell CT50 with Android 4.4.4, can not be updated to Android 7.x unfortunately.
I will try to provide a success case log with a Google Phone as soon as possible.
I will also try to build a small sample app and try to reproduce the bug with it as soon as possible too.
Regards
Stefan
st...@rewe-digital.com <st...@rewe-digital.com> #23
Hi,
I created a very small sample application here:https://github.com/stefanscheidt/AndroidRoomExample .
You can reproduce the erroneous behaviour by executing the Android test "TourRepositoryTest" on a Moto G5 with Android 7.0.
The test will fail due to "Instrumentation run failed due to 'Process crashed.'"
On an emulated Nexus 6 with Android 7.1.1 the test is green.
Regards
Stefan
I created a very small sample application here:
You can reproduce the erroneous behaviour by executing the Android test "TourRepositoryTest" on a Moto G5 with Android 7.0.
The test will fail due to "Instrumentation run failed due to 'Process crashed.'"
On an emulated Nexus 6 with Android 7.1.1 the test is green.
Regards
Stefan
st...@rewe-digital.com <st...@rewe-digital.com> #24
Find enclosed the bugreport from my Moto G5 after executing the TourRepositoryTest.
st...@rewe-digital.com <st...@rewe-digital.com> #25
Find enclosed a bugreport from a Google Phone with Android 7.1.1. On this device, the test is green.
me...@google.com <me...@google.com> #26
From Motorola: Thanks for the testing APK. We've identified the root cause, which is a data structure mis-alignment due to an optimization. A fix is made and pending review now.
st...@rewe-digital.com <st...@rewe-digital.com> #27
Great! Thanks!
yb...@google.com <yb...@google.com> #28
i'm marking this as fixed since this is not on us and Motorola already acknowledged the issue.
st...@rewe-digital.com <st...@rewe-digital.com> #29
OK. Thanks!
Description
Version used: 1.0.0-alpha3
Devices/Android versions reproduced on: Motorola MotoG5 with Android 7.0 (API 24)
Executing a "roomDatabase.endTransaction()" on a session with a SQLiteConstraintException (unique constraint violated) and therefor no "roomDatabase.setTransactionSuccessful()" causes a "A/libc: Fatal signal 11 (SIGSEGV), code 1", but only on a Motorola MotoG5 with Android 7. Not reproducable in Simulator with API 24 and 25.
Any help on how to debug the problem further would be welcome!
The relevant part of the stack trace is:
07-05 22:31:34.854 17796-17796/? A/DEBUG: #08 pc 018ae403 /system/framework/arm/boot-framework.oat (offset 0x1601000) (android.database.sqlite.SQLiteConnection.nativeExecute+102)
07-05 22:31:34.854 17796-17796/? A/DEBUG: #09 pc 018b0e89 /system/framework/arm/boot-framework.oat (offset 0x1601000) (android.database.sqlite.SQLiteConnection.execute+260)
07-05 22:31:34.854 17796-17796/? A/DEBUG: #10 pc 018c1111 /system/framework/arm/boot-framework.oat (offset 0x1601000) (android.database.sqlite.SQLiteSession.endTransactionUnchecked+364)
07-05 22:31:34.854 17796-17796/? A/DEBUG: #11 pc 018c18b5 /system/framework/arm/boot-framework.oat (offset 0x1601000) (android.database.sqlite.SQLiteSession.endTransaction+144)
07-05 22:31:34.854 17796-17796/? A/DEBUG: #12 pc 018b9fed /system/framework/arm/boot-framework.oat (offset 0x1601000) (android.database.sqlite.SQLiteDatabase.endTransaction+72)
I do have App Kotlin Code in an interface TourDao like this:
@Dao
interface TourDao {
@Insert
fun insertTour(tour: TourRecord)
@Insert
fun insertCustomerOrder(customerOrder: CustomerOrderRecord)
}
In a class TourRepository:
fun save(tourVO: TourVO): Completable = Completable.fromRunnable { doSave(tourVO) }
.doOnError { print("Saving tour failed: ${it.message}") }
.onErrorResumeNext { throwable: Throwable ->
Completable.error(DataException(ErrorState.DB_ACCESS_ERROR, cause = throwable))
}
private fun doSave(tourVO: TourVO) {
database.beginTransaction()
try {
tourDao.insertTour(TourRecord(id = tourVO.id))
tourVO.orders.forEach { order ->
tourDao.insertCustomerOrder(CustomerOrderRecord(id =
}
database.setTransactionSuccessful()
} finally {
database.endTransaction()
}
}
And a Android Test like this:
@Test
fun savesInvalidTour() {
assertHasNoTour()
val anInvalidTour = aTour("tour")
.withOrders(aOrder("order-1"), aOrder("order-1"))
.build()
tourRepository.save(anInvalidTour).test()
.assertError {
it is DataException
&& it.errorState == ErrorState.DB_ACCESS_ERROR
&& it.cause is SQLiteConstraintException
}
assertHasNoTour()
}
This causes the mentioned crash.