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

Runtime EXC_BAD_ACCESS with barchart whiles zoom in #2709

Closed
ReneVella opened this issue Aug 13, 2017 · 9 comments
Closed

Runtime EXC_BAD_ACCESS with barchart whiles zoom in #2709

ReneVella opened this issue Aug 13, 2017 · 9 comments

Comments

@ReneVella
Copy link

ReneVella commented Aug 13, 2017

During run time a EXC_BAD_ACCESS dump is experienced while you try to zoom on the chart using Xcode 8.3.3 and ioscharts 3.0.2. The App has no errors, complies and build successfully. Any help will be very much appreciated as i have been days trying to fix this issue.

screen shot 2017-08-13 at 05 53 01

screen shot 2017-08-13 at 05 54 11

@ReneVella ReneVella changed the title EXC_BAD_ACCESS with barnhart whiles zoom in EXC_BAD_ACCESS with barchart whiles zoom in Aug 13, 2017
@ReneVella ReneVella changed the title EXC_BAD_ACCESS with barchart whiles zoom in Runtime EXC_BAD_ACCESS with barchart whiles zoom in Aug 13, 2017
@liuxuan30
Copy link
Member

liuxuan30 commented Aug 14, 2017

Did you changed ChartsDemo or ChartsDemo just crashes?
You have to look at months first

- (NSString *)stringForValue:(double)value
                        axis:(ChartAxisBase *)axis
{
    return months[(int)value % months.count];
}

this is found in combined chart, but you are using multiple bar chart I think. Did you copy paste them without other ops? This could be a problem

@ReneVella
Copy link
Author

Hi,
i did not change ChartsDemo but copied the relevant code into my App. The ChartsDemo work well with no issues.

what do you mean by "without other ops" ?

@ReneVella
Copy link
Author

I managed to replicate and isolate the issue. It seems that this issue only occurs when i'm not using Storyboards. That is i'm using xib Files in the project navigation. Sill would like to find a solution to this bug ?

@liuxuan30
Copy link
Member

liuxuan30 commented Aug 21, 2017

I still think you have issue for months[(int)value % months.count];.
You can't simply copy code without knowing what's the content of months. When your app crashes you need always to check the crash log rather than "EXC_BAD_ACCESS".
as I don't have your code, you can easily debug on your side what's the reason of crashing.

@ReneVella
Copy link
Author

Hi,

the content of months is the following:-

months = @[
@"Jan", @"Feb", @"Mar",
@"Apr", @"May", @"Jun",
@"Jul", @"Aug", @"Sep",
@"Oct", @"Nov", @"Dec"
];

@ReneVella
Copy link
Author

mode debug info
Printing description of self->months:
(NSObject) NSObject = {
isa = 0xbadd09d9c5a5bead
}
Printing description of self->months:
(NSArray *) months = 0x00000001700cb2f0
Printing description of self->months->isa:
-2.31330477153741e+16
Printing description of self->months->isa:
-2.31330477153741e+16
Printing description of self->months:
(NSObject) NSObject = {
isa = 0xbadd09d9c5a5bead
}
(lldb)

@ReneVella
Copy link
Author

@liuxuan30

is it possible to disable the zooming on the Graph ?

@thierryH91200
Copy link
Contributor

try
chartView.doubleTapToZoomEnabled = false

@ReneVella
Copy link
Author

@thierryH91200

thanks but no luck, i also tried the following:-

_chartView.doubleTapToZoomEnabled = NO;
_chartView.pinchZoomEnabled = NO;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants