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

Crashing on adding the null value to and array #193

Closed
RahulM1987 opened this issue Jul 8, 2015 · 6 comments
Closed

Crashing on adding the null value to and array #193

RahulM1987 opened this issue Jul 8, 2015 · 6 comments

Comments

@RahulM1987
Copy link

First throw call stack:
(
0 CoreFoundation 0x01143746 exceptionPreprocess + 182
1 libobjc.A.dylib 0x00dc6a97 objc_exception_throw + 44
2 CoreFoundation 0x0114366d +[NSException raise:format:] + 141
3 CoreFoundation 0x011009dc _CFPrefsValidateValueForKey + 156
4 CoreFoundation 0x011460f5 -[CFPrefsPlistSource sendMessageSettingValue:forKey:] + 245
5 CoreFoundation 0x010717ea -[CFPrefsPlistSource alreadylocked_setValue:forKey:] + 250
6 CoreFoundation 0x010716d2 -[CFPrefsSource setValue:forKey:] + 82
7 CoreFoundation 0x01071673 ___CFPreferencesSetValueWithContainer_block_invoke + 51
8 CoreFoundation 0x0102b9ef +[CFPrefsSource withSourceForIdentifier:user:byHost:container:perform:] + 1279
9 CoreFoundation 0x01071611 _CFPreferencesSetValueWithContainer + 225
10 CoreFoundation 0x011293b2 _CFPreferencesSetAppValueWithContainer + 66
11 Foundation 0x00989d2f -[NSUserDefaults(NSUserDefaults) setObject:forKey:] + 59
12 MyName 0x000d2e5e -[Graph GetCPUPoints] + 14830
13 MyName 0x000e5f82 -[Graph showGraph:] + 418
14 libobjc.A.dylib 0x00ddc7cd -[NSObject performSelector:withObject:withObject:] + 84
15 UIKit 0x01a29a90 -[UIApplication sendAction:to:from:forEvent:] + 99
16 UIKit 0x01a29a22 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
17 UIKit 0x01b6a18a -[UIControl sendAction:to:forEvent:] + 69
18 UIKit 0x01b6a5a7 -[UIControl _sendActionsForEvents:withEvent:] + 598
19 UIKit 0x01b69811 -[UIControl touchesEnded:withEvent:] + 660
20 UIKit 0x01a81cfa -[UIWindow _sendTouchesForEvent:] + 874
21 UIKit 0x01a827d6 -[UIWindow sendEvent:] + 792
22 UIKit 0x01a406d1 -[UIApplication sendEvent:] + 242
23 UIKit 0x01a50b08 _UIApplicationHandleEventFromQueueEvent + 21484
24 UIKit 0x01a24337 _UIApplicationHandleEventQueue + 2300
25 CoreFoundation 0x0106506f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
+ 15
26 CoreFoundation 0x0105ab7d __CFRunLoopDoSources0 + 253
27 CoreFoundation 0x0105a0d8 __CFRunLoopRun + 952
28 CoreFoundation 0x01059a5b CFRunLoopRunSpecific + 443
29 CoreFoundation 0x0105988b CFRunLoopRunInMode + 123
30 GraphicsServices 0x03b042c9 GSEventRunModal + 192
31 GraphicsServices 0x03b04106 GSEventRun + 104
32 UIKit 0x01a28106 UIApplicationMain + 1526
33 eNlight Cloud 0x000f3afa main + 138
34 libdyld.dylib 0x06fceac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

@danielgindi
Copy link
Collaborator

So do not add the null value to the array.

@RahulM1987
Copy link
Author

it considers the blank string value as 0 and plots the points as from 0.
I don't want to plot the 0 value points from start
The starting point should not be 0 value
How do i set that....

@danielgindi
Copy link
Collaborator

@RahulM1987 Do not insert a value for that index

@RahulM1987
Copy link
Author

That worked thanks a lot ...
Great work bro nice library with zoom in and zoom out working great on both the platforms iOS and Android
Cheers
Thank you :)

@danielgindi
Copy link
Collaborator

danielgindi commented Jul 8, 2015 via email

@VincentSit
Copy link
Contributor

@danielgindi

May I ask how not to insert value for that index? I want to skip some of the xIndex.

I'm using this method, but it's a double, not pointer.

@interface ChartDataEntry : NSObject
- (nonnull instancetype)initWithValue:(double)value xIndex:(NSInteger)xIndex OBJC_DESIGNATED_INITIALIZER;
@end

There is no method called initWithXIndex:(NSInteger)xIndex.

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