piaoyongren / core-plot

Automatically exported from code.google.com/p/core-plot
0 stars 0 forks source link

message send to deallocated instance - over-realeased objects ? #137

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
add 
-(BOOL)
shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrient
ation
{
    return YES;
}

in ALL controllers in the iphone testapp

2.
go on pie chart, rotate simulator or real phone

3.
2010-05-06 22:06:25.613 CPTestApp-iPhone[6542:207] *** -[CPXYAxis
majorGridLineStyle]: message sent to deallocated instance 0x3d550a0

What is the expected output? What do you see instead?

it seems that after the last cleanup to fix the memory cycle, some objects
are over-realeased... My own app breaks on same object  (CPXY axis).

What version of the product are you using? On what operating system?

rev 745

Please provide any additional information below.

Original issue reported on code.google.com by xrr...@gmail.com on 6 May 2010 at 8:11

GoogleCodeExporter commented 9 years ago

Original comment by eskr...@mac.com on 6 May 2010 at 10:23

GoogleCodeExporter commented 9 years ago
The extra layers for the grid lines aren't being removed along with the axis 
set. When the system tries to redraw 
the plot after a rotation, the grid line layers try to access properties from 
axis objects that no longer exist.

I'll take a crack at fixing it.

Original comment by eskr...@mac.com on 7 May 2010 at 2:47

GoogleCodeExporter commented 9 years ago
I encountered the same issue and fixed it by modifying CPAxis.m. I added
label.axis = nil; /* as line 694 */
axisTitle.axis = nil; /* as line 736 */
minorGridLines.axis = nil; /* as line 1030 */
majorGridLines.axis = nil; /* as line 1044 */

Original comment by stephane...@gmail.com on 10 May 2010 at 9:27

GoogleCodeExporter commented 9 years ago
not enough to fix it for me, 

Original comment by xrr...@gmail.com on 12 May 2010 at 6:34

GoogleCodeExporter commented 9 years ago
This issue was closed by revision ad797030c2.

Original comment by eskr...@mac.com on 14 May 2010 at 3:10