Closed vitorpamplona closed 11 months ago
@vitorpamplona is it possible you’re operating on your Okio streams from multiple threads concurrently? Concurrent modifications can trigger errors like this.
Oooh, actually it’s OkHttp to blame for exactly that, and that bug is very recently fixed. https://github.com/square/okhttp/pull/8121
Will ship a new OkHttp 5.0 alpha very soon with that fix.
I don't use okio streams directly. I just used them through OkHttp. I assume OkHttp takes care of the thread handling part.
Do I need to take additional protections when multithreading?
Thank you! ☺️
Looks like there is a possible NPE in
commonCompleteSegmentByteCount
.I can't reproduce this bug but this is a PlayStore stack from an Xperia 5 II running Android 12 (SDK 31)
The code is using versions:
com.squareup.okhttp3:okhttp:5.0.0-alpha.11
com.squareup.okio:okio-jvm:3.6.0
com.squareup.okio:okio:3.6.0