Git Product home page Git Product logo

Comments (5)

chRyNaN avatar chRyNaN commented on May 31, 2024 2

Resolved with release 0.6.0 (10): https://github.com/chRyNaN/serialization-parcelable/releases/tag/0.6.0

from serialization-parcelable.

github-actions avatar github-actions commented on May 31, 2024

Welcome and thanks for contributing! Make sure to leave a detailed explanation of the issue.

from serialization-parcelable.

chRyNaN avatar chRyNaN commented on May 31, 2024

I was able to reproduce the issue. I'm not positive about the cause, but it seemed to be an incorrect function call. It was resolved after the changes made in the following commit where I removed the AndroidParceler class: 92fd90c. I will try and write some tests to make sure that this issue doesn't occur again. The fix will be released in the next version.

from serialization-parcelable.

chRyNaN avatar chRyNaN commented on May 31, 2024

The issue has to do with the Parcel(ByteArray) constructor function implementation for the Android target. The decodeFromParcel function was updated previously to get the parcel.toByteArray() from the parcel parameter and create a new Parcel using that constructor function. Then that Parcel was decoded with a ParcelDecoder. This was added to help some issue with the ByteArrayParcel implementation for other platforms, but it seems that it broke the Android usage. I will investigate further and ensure that both implementations work.

from serialization-parcelable.

chRyNaN avatar chRyNaN commented on May 31, 2024

The issue had to do with the Android implementation of the Parcel(ByteArray) calling setDataPosition(0) and the above mentioned use of creating a new Parcel from the provided parcel in the Parcelable.decodeFromParcel function. The Parcelable.encodeToBundle/Parcelable.decodeFromBundle have to internally manage a size and magic numbers set inside the android.os.Parcel class. Because of this, the size should have been set to 8 (two four byte int values were set). Instead of hardcoding this, since it is TBD which component should be responsible for setting that, I think removing the wrapper creation of a new parcel in the decodeFromParcel function is the solution and seems to work. However, we should be on the lookout for issues on other Kotlin targets.

from serialization-parcelable.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.