Skip to content
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

[Pie Charts] Destroying chart while the chart is animating causes null error. #2187

Open
vtange opened this issue Oct 4, 2017 · 2 comments
Labels
C-bug Category: This is a bug

Comments

@vtange
Copy link

vtange commented Oct 4, 2017

  • c3 v0.4.17:
  • d3 3.5.17:
  • Chrome:
  • Mac OSX:

When .destroy() is called on a pie chart while it is animating (you have to be lucky and time this one accurately), you can get a null pointer exception. Because .destroy() sets every property of $$ to null, near-future calls to stuff like $$.data.targets or $$.config.data_types will throw a null error since $$.data and $$.config are set to null.

screen shot 2017-08-03 at 3 19 57 pm

@martinpitt
Copy link

The Cockpit tests reproduce this crash reliably, both in CI and locally. So I'm happy to test a potential fix for this.

martinpitt added a commit to martinpitt/cockpit that referenced this issue Jul 23, 2018
This gets triggered by the CPUUsage DonutChart in
pkg/kubernetes/scripts/virtual-machines/components/VmMetricsTab.jsx.

This seems to be some race condition when switching pages, which
supposedly also means "(un)render in React". Cockpit code has no control
over this, and it also does not break the user experience, so ignore the
exception.

See c3js/c3#2187 and simlilar issues
bcbcarl/react-c3js#22 or
c3js/c3#1205.
larskarlitski pushed a commit to cockpit-project/cockpit that referenced this issue Jul 27, 2018
This gets triggered by the CPUUsage DonutChart in
pkg/kubernetes/scripts/virtual-machines/components/VmMetricsTab.jsx.

This seems to be some race condition when switching pages, which
supposedly also means "(un)render in React". Cockpit code has no control
over this, and it also does not break the user experience, so ignore the
exception.

See c3js/c3#2187 and simlilar issues
bcbcarl/react-c3js#22 or
c3js/c3#1205.
martinpitt added a commit to martinpitt/cockpit that referenced this issue Jul 27, 2018
This gets triggered by the CPUUsage DonutChart in
pkg/kubernetes/scripts/virtual-machines/components/VmMetricsTab.jsx.

This seems to be some race condition when switching pages, which
supposedly also means "(un)render in React". Cockpit code has no control
over this, and it also does not break the user experience, so ignore the
exception.

See c3js/c3#2187 and simlilar issues
bcbcarl/react-c3js#22 or
c3js/c3#1205.

Cherry-picked from master commit 436bfe4.
martinpitt added a commit to cockpit-project/cockpit that referenced this issue Jul 29, 2018
This gets triggered by the CPUUsage DonutChart in
pkg/kubernetes/scripts/virtual-machines/components/VmMetricsTab.jsx.

This seems to be some race condition when switching pages, which
supposedly also means "(un)render in React". Cockpit code has no control
over this, and it also does not break the user experience, so ignore the
exception.

See c3js/c3#2187 and simlilar issues
bcbcarl/react-c3js#22 or
c3js/c3#1205.

Cherry-picked from master commit 436bfe4.
@panthony panthony added the C-bug Category: This is a bug label Aug 9, 2019
@web-developer-kg
Copy link

This is still not fixed. I think it's unacceptable. You can check this snippet here to reproduce: https://codesandbox.io/s/smoosh-wind-ogn4y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

4 participants