ChartsOrg / ChartsOrg/Charts

[Help] Crash Double Free when init chart

Open
#2,406 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

I use this libraries version swift 3 for my app, but sometimes it crash with error double free, I don't know why, only call init chart with code

```
self.pieChart = PieChartView()
```
and I has tried init with frame but same error

```
self.pieChart = PieChartView(frame: CGRect(x: 0, y: 0, width: 90, height: 90))
```

And trace error from this file PieRadarChartViewBase.swift
```
internal override func initialize()
{
super.initialize()

_tapGestureRecognizer = NSUITapGestureRecognizer(target: self, action: #selector(tapGestureRecognized(_:)))

self.addGestureRecognizer(_tapGestureRecognizer)

#if !os(tvOS)
_rotationGestureRecognizer = NSUIRotationGestureRecognizer(target: self, action: #selector(rotationGestureRecognized(_:)))
self.addGestureRecognizer(_rotationGestureRecognizer) // Double Free here
_rotationGestureRecognizer.isEnabled = rotationWithTwoFingers
#endif
}
```

Please help me trace root cause of this issue, maybe somethings wrong when I call init charts?
I has attach image of xcode for easy to view.
![issue](https://cloud.githubusercontent.com/assets/1286413/25648333/f306d140-2ff4-11e7-980f-022681c3a6f1.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.