Giter VIP home page Giter VIP logo

Comments (14)

patrickmichalik avatar patrickmichalik commented on July 23, 2024 1

Thanks for the example, @aleksandra-krzemien! We’ve identified the issue. There’s a race condition, so changing when an affected chart’s data is updated (relative to when the chart is created) may prevent the crash from occurring, but generally, this is a bug. We have a fix and will release an update shortly.

Regarding initial animations, that’s exactly right—HorizontalPager preloads its pages, and a chart’s initial animation is started when the chart enters composition.

from vico.

Josuhu avatar Josuhu commented on July 23, 2024

I would try to solve it somehow but cannot find a away to reach this interface in the Vico API where it is executed.

from vico.

patrickmichalik avatar patrickmichalik commented on July 23, 2024

Hello! Thanks for the report. You’ve mentioned that the reproduction steps are unknown. Does this occur only intermittently, as opposed to every time the Activity is created?

from vico.

Josuhu avatar Josuhu commented on July 23, 2024

It works fine for the first time but starts crashing while app is closed and Activity is recreated or reopened with a new instance. So it seems it does not tolerate background restoration. It has happened after screen rotation as well and once it crashes it is in a crash loop with this exception.

from vico.

patrickmichalik avatar patrickmichalik commented on July 23, 2024

I’ve tried to reproduce the issue by simulating process death and by repeatedly changing the screen orientation, but I’ve not been able to get a crash to occur. Would you be able to share an example?

from vico.

matheusPereiraG avatar matheusPereiraG commented on July 23, 2024

Im also getting this crash and i cannot deterministically reproduce it. The only thing i know of this is that it can occur randomly and mostly when re-populating data onto the graph (Im also using the latest stable version)

from vico.

patrickmichalik avatar patrickmichalik commented on July 23, 2024

Thanks for letting us know, @matheusPereiraG. Are you using Vico with the view system?

from vico.

matheusPereiraG avatar matheusPereiraG commented on July 23, 2024

Thanks for letting us know, @matheusPereiraG. Are you using Vico with the view system?

No, im using jetpack compose.

from vico.

patrickmichalik avatar patrickmichalik commented on July 23, 2024

Thanks, @matheusPereiraG! Unfortunately, we still haven’t been able to reproduce this, whether in Jetpack Compose or in the view system. You’ve mentioned that the crash can occur during data updates. Just to confirm, do these updates coincide with anything notable, such as activity recreation? More or less how often does the crash occur?

from vico.

aleksandra-krzemien avatar aleksandra-krzemien commented on July 23, 2024

I see the same exception, and I prepared a small demo repo (this specific branch). In my case, I have a ComposeView and HorizontalPager where each page contains a graph. I want to animate graph values with some delay, so I use ChartEntryModelProducer and setEntriesSuspending with delay. I'm not sure if this is the right way to update entries with delay, so if not, please let me know. However, with current approach the exception occurs pretty often.

Steps to reproduce:

  1. Tap button to second fragment
  2. Swipe between pages left and right
  3. At some point the exception is thrown.

It's not thrown at the same moment each time, but eventually it occurred for me every time I tested it. The issue appears also when I comment out updating value in the loop, but I think it happens less often then.

ps. This is not the topic of this issue, but in the case above I also noticed that the initial value for different pages is not always animated (when I comment out updating values in a loop). I would really appreciate if you let me know if this is an issue with my setup or is it a bug on your side. If this is not the place for this question, I can create a separate issue.

from vico.

aleksandra-krzemien avatar aleksandra-krzemien commented on July 23, 2024

I found a workaround for the issue (both issues actually) I described above. It seems that the Pager is a part of the issue. If I set entries only when pageIndex == pagerState?.currentPage the exception does not occur.

The animation also works just fine, but it makes perfect sense, as Pager loads more items than are actually visible and I want to animate graph only when particular page is shown.

from vico.

patrickmichalik avatar patrickmichalik commented on July 23, 2024

Vico 2.0.0 Alpha 5 addresses this. We also plan on releasing a Vico 1 update with a fix.

from vico.

patrickmichalik avatar patrickmichalik commented on July 23, 2024

The aforementioned Vico 1 update, Vico 1.14.0 Alpha 2, is now available.

from vico.

patrickmichalik avatar patrickmichalik commented on July 23, 2024

Vico 1.14.0 is rolling out. Cheers!

from vico.

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.