1
votes

I have a problem with Core Plot on a iPad App that I've developed. My entire app uses ARC.

My app as 9 viewControllers, in each viewcontroller there is a Core Plot graph with 2 or 3 scatter plots.

After iterating those views for 8 or 9 times (back and forward) some graphs disappears and the error log of the iPad shows the following:

Sep  7 18:12:24 Mio-iPad backboardd[26] <Error>: CoreAnimation: failed to map 2263232 bytes (3)
Sep  7 18:12:24 Mio-iPad backboardd[26] <Error>: CoreAnimation: missing mask layer 0x0
Sep  7 18:12:24 Mio-iPad backboardd[26] <Error>: CoreAnimation: serialization error from context 1173490153
Sep  7 18:12:24 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: failed to map 2263232 bytes (3)
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: missing mask layer 0x0
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: serialization error from context 1173490153
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506
Sep  7 18:12:25 Mio-iPad backboardd[26] <Error>: CoreAnimation: rendering error 506

I'm not getting any memory warning (didReceiveMemoryWarning) before the graphs disappears. I've used also the Allocation instrument but the trend doesn't grow up during the iterations.

The strange thing is also: If I run the app in this way: view1 --> view2 --> view3 --> view4 --> view5 --> view6 --> view7 the graphs doesn't disappear (after 200 iterations).

If I run the app in this way: view1 --> view2 --> view3 --> view4 --> view5 --> view6 --> view7 --> view8 the graphs disappear after 49 iterations

If I run the app in this way: view1 --> view2 --> view3 --> view4 --> view5 --> view6 --> view7 --> view8 --> last view the graphs disappear after 7 iterations.

Is also interesting to know that: view3 and view6, view4 and view7, view5 and view8 are specular (they are two classes presenting the same graphs with only different variables)

This is the way I've created the dealloc method (since I'm using ARC), are there any issues?

-(void)dealloc
{    
    touchPlotBall = nil; //(CPTScatterPlot)
    dataSourceLinePlot= nil; //(CPTScatterPlot)
    dataSourceSLinePlot = nil; //(CPTScatterPlot)

    [scatterPlotViewValue removeFromSuperview];  //(CPTGraphHostingView)
    scatterPlotViewValue=nil; //(CPTGraphHostingView)

    [scatterPlotViewBall removeFromSuperview]; //(CPTGraphHostingView)
    scatterPlotViewBall=nil; //(CPTGraphHostingView)

    self.delegate = nil; //(id<view7ControllerDelegate> delegate;)

}

Has anyone an answer or suggestion on this problem?

Thanks in advice

1
What version of Core Plot are you using?Eric Skroch
I'm using Core Plot 1.3 and I also tried to use the last pre-release version, without solving the issue.Vasco A.
is this solved ? I am using SwiftCharts but getting same erroriOS Geek

1 Answers

0
votes

I would recommend to follow my answer only if your job is not done by core plot.

In the past I too was using core plot but it is bit complex process.

Its better to have an alternate solution.

Like you can use javascript,css,html and with such support you can load it as html string in webview easily with very less effort.

Have a look at this http://www.rgraph.net/ which I started using and it would be a boon for ios developer to have complex and variety of charts to use with less effort.