Crash


#1

I have a couple of charts on a single page “IOS 7.0.4 / iPhone5” running with data feed in via [selfchart] redrawChart] et al. The page completes and I shutdown the charts thusly:

[[selfupdateChartTimer] invalidate];

    self.updateChartTimer = nil;

    self.chart.delegate = nil;

    self.chart.datasource = nil;

    self.chart = nil;

    self.data = nil;

Then push to the next VC before the ViewDidDisplay completes the App crashes and I get the output:

013-11-16 13:27:45.648 Hipstameter[1223:60b] ShinobiCharts: A datasource has not been set.

From: ShinobiChart at 0x18f9cd10

And this is the stack:

Crash srack

The crash is intermittent, say after running the offending page 3 or 4 times you will be sure to get the crash.


#2

I have done further testing, running my App thru it’s main flow about 50 times with the 2 Charts commented out. It’s solid as a rock. So it does look like there is two problems:

  1. The intermittent crash documented above

  2. A leak. Assuming I don’t get the crash then at about the 10th run through the main flow when the App is at around 118Meg the phone issues an out-of-memory and the App crashes. When I commented out the 2 charts and ran the 50 tests I also go the out-of-memory but the App handled it without a problem.

Cheers

Clay


#3

Hi Clay,

This seems to be a problem with the chart hanging around in the view hierarchy - if you call [self.chart removeFromSuperview] before setting the chart to nil, this should catch the cases where layoutSubviews calls are propagating to it.

Hope this helps!

Rob