-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compose Resource incorrectly reads string chunks from a file #4938
Labels
Comments
AChep
added a commit
to AChep/compose-multiplatform
that referenced
this issue
Jun 7, 2024
AChep
added a commit
to AChep/compose-multiplatform
that referenced
this issue
Jun 7, 2024
AChep
added a commit
to AChep/compose-multiplatform
that referenced
this issue
Jun 7, 2024
terrakok
added a commit
that referenced
this issue
Jun 7, 2024
… jvm platforms. (#4943) In some cases the skip and read methods may handle less bytes then expected. The PR fixes it by proper API on the JVM and manual check on the Android. Fixes #4938 ## Testing I manually checked it on the project from the issue. ## Release Notes ### Fixes - Resources - Read exactly requested count of bytes from InputStream on jvm platforms.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
1 similar comment
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
App crashes during base64 decoding of the resources.
If I go to the file itself and read the given range
we can see that the range is correct. However the record data is different to what Compose resources reads:
if we investigate further we see that the
ResourceReader.desktop.kt
has read the following sequence of bytes:if I pause there and execute two different commands:
The idea why it happens is because both
.skip()
and.read()
methods that the current implementation uses can skip and read less than requested.Affected platforms
Versions
To Reproduce
:desktopApp:run
Gradle taskThe text was updated successfully, but these errors were encountered: