Coder Social home page Coder Social logo

Comments (5)

arkivanov avatar arkivanov commented on May 18, 2024

Thanks for the report. However it's not clear what is the cause. Would it be possible to provide some code of the composables and components mentioned in the stack trace. Also the second exception seems like an internal Compose error, which might be the cause.

from decompose.

ScottPierce avatar ScottPierce commented on May 18, 2024

You are right. Sorry, I'm doing too many things today - I opened up an issue with Compose here - JetBrains/compose-multiplatform#1687

from decompose.

arkivanov avatar arkivanov commented on May 18, 2024

From what I can understand from the stack trace, RootDeviceComponentImpl creates a Router in the init section, which in turn registers to the StateKeeper for stack preservation purposes. The latter has a check which verifies that there are no duplicate keys registered. This should not normally happen (unless there is a bug of course).
But then weird things happen. As far as I see, RootDeviceComponentImpl is being created from the RootComponentImpl.resolveChild method, which is called from RootComposableKt composable function.
It seems the RootDeviceComponentImpl gets duplicated somehow. Maybe because of the crash in Compose. To say something more accurate I would need some code of the mentioned components and composables.

from decompose.

arkivanov avatar arkivanov commented on May 18, 2024

Also worth to see how the very root component is initialised. A common mistake is to instantiate the root component inside a composable function without remember. Ideally it should be instantiated in the main function, before Compose is even started.

from decompose.

ScottPierce avatar ScottPierce commented on May 18, 2024

I wasn't remembering the Components created. This is what caused the issue.

from decompose.

Related Issues (20)

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.