Fixed
Status Update
Comments
yb...@google.com <yb...@google.com> #2
This has been fixed internally in https://android-review.googlesource.com/870975 and will be available in Navigation 1.0.0-alpha10.
Now, instead of crashing, we ignore invalid deep links, printing a log message saying as much.
Now, instead of crashing, we ignore invalid deep links, printing a log message saying as much.
[Deleted User] <[Deleted User]> #3
Hi team.
The problem still occurs on version 2.2.0-rc04
The problem still occurs on version 2.2.0-rc04
yb...@google.com <yb...@google.com> #4
Hi, still getting crash for 2.1.0
[Deleted User] <[Deleted User]> #5
still getting crash on version 2.2.0
yb...@google.com <yb...@google.com> #6
getting crash with 2.2.1
ap...@google.com <ap...@google.com> #7
still getting crash with 2.2.1
Description
Version used: 2.0.0
Devices/Android versions reproduced on: N/A
In current version of room if I mark method in DAO with @Transaction, and if it uses any disposable e.g. Single, the generated code will throw main thread access exception at runtime.
I would expect one of two behaviours instead:
1. It would be ideal if room could somehow defer start/end transaction to match thread that is used on Disposable, but I can imagine that this can be not possible.
2. To get compile time warning or error that this may be not the correct way of using @Transaction with mix of asynchronous code.
Example of code:
Method in abstract DAO:
@Transaction
open fun upsert(obj: T): Single<Boolean> {
return insert(obj)
.map { true }
.onErrorResumeNext {
if (it is SQLiteConstraintException)
{ update(obj)
.map { true }
} else {
Single.error(it) }
}
.subscribeOn(Schedulers.io()) }
Generated method:
@Override
public Single<Boolean> upsert(Supplier obj) {
__db.beginTransaction();
try {
Single<Boolean> _result = super.upsert(obj);
__db.setTransactionSuccessful();
return _result;
} finally {
__db.endTransaction();
}
}