Comments (14)
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.
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.
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.
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.
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.
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.
Thanks for letting us know, @matheusPereiraG. Are you using Vico with the view system?
from vico.
Thanks for letting us know, @matheusPereiraG. Are you using Vico with the view system?
No, im using jetpack compose.
from vico.
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.
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:
- Tap button
to second fragment
- Swipe between pages left and right
- 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.
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.
Vico 2.0.0 Alpha 5 addresses this. We also plan on releasing a Vico 1 update with a fix.
from vico.
The aforementioned Vico 1 update, Vico 1.14.0 Alpha 2, is now available.
from vico.
Vico 1.14.0 is rolling out. Cheers!
from vico.
Related Issues (20)
- Marker missing style defined by custom MarkerLabelFormatter HOT 9
- Cannot access CartesianChartHost in my project HOT 2
- Reading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied HOT 6
- Cannot make a LabelFormatter on stacked column chart HOT 11
- Markers only works for the first line series HOT 2
- Crash on changing dataset which contains negative values HOT 3
- Throwing OOM Exception when using Chart in LazyColumn HOT 7
- Marker duplicated HOT 2
- No axisValueOverrider in rememberCandlestickCartesianLayer HOT 4
- Feature Missing - Slide to Position HOT 4
- Text alignment on y-axis label only shown correctly for ALIGN_NORMAL HOT 6
- [View] CartesianChartView always handles touches, even if `isClickable` or `isEnabled` is false HOT 6
- Cannot Round NaN to Float HOT 4
- Crash inside AnimatedVisibility() HOT 4
- ColumnChart with MergeMode.Grouped does not receive callback for all the series added through CartesianMarkerVisibilityListener HOT 2
- TopBottomShader.splitY doesn't do anything HOT 1
- Incorrect floating point rounding in xSpacingMultiplier calculation leads to wrong IllegalStateException HOT 6
- At the end the label of bottom axis is cut off HOT 5
- Couple crashes with `java.util.ConcurrentModificationException` and `java.util.NoSuchElementException: Key null is missing in the map` HOT 7
- Bottom label truncated sometimes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vico.