Fixed
Status Update
Comments
da...@google.com <da...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
[Deleted User] <[Deleted User]> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug: b/264018028
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
https://android-review.googlesource.com/2373449
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
ap...@google.com <ap...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
Description
Version used: 2.1.0-alpha06
Devices/Android versions reproduced on: Doesn't matter
Using a Single in a Dao makes Room generate a Single.fromCallable. The docs in Single.fromCallable say:
If the {@link Callable} throws an exception, the respective {@link Throwable} is
delivered to the downstream via {@link SingleObserver#onError(Throwable)},
except when the downstream has disposed this {@code Single} source.
In this latter case, the {@code Throwable} is delivered to the global error handler via
{@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.exceptions.UndeliverableException UndeliverableException}.
If we subscribe to a Single and dispose before it delivers the EmptyResultSetException, will cause the exception to be sent to the global error handler, which means it will crash.
I think this could be avoided by using Single.create and checking if the emitter still has observers before trying to emit the error.
Can't provide a sample because this is a timing issue.