Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

react native pathjs charts crashes in iPone simulator #101

Closed
1 of 2 tasks
balaskumar opened this issue Mar 2, 2017 · 6 comments
Closed
1 of 2 tasks

react native pathjs charts crashes in iPone simulator #101

balaskumar opened this issue Mar 2, 2017 · 6 comments

Comments

@balaskumar
Copy link

Before filing an issue please ensure the following boxes are checked, if applicable:

  • I have searched for existing issues
  • I have provided detailed instructions that can reproduce the issue (including code and data necessary)
    In preparation for using this package, I was able to clone the repo and successfully run the example on my Mac-mini.
    However as a trial I added one of the example pages (StockLineChartBasic) to my app just to get the feel of the package. My app uses react-native-router-flux for navigation. As soon as I navigate into the new chart page, the app crashes with the stack trace below. I would dearly love to use this charting functionality in my app, so would appreciate any pointers on debugging this problem.

Mar 1 22:19:44 Mac-mini-2 ParkinsonsTracker[22595] : *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM length]: unrecognized selector sent to instance 0x60800005be70'
*** First throw call stack:
(
0 CoreFoundation 0x00000001068d0d4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010575421e objc_exception_throw + 48
2 CoreFoundation 0x0000000106940f04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x0000000106856005 forwarding + 1013
4 CoreFoundation 0x0000000106855b88 _CF_forwarding_prep_0 + 120
5 ParkinsonsTracker 0x00000001049988f7 -[RNSVGPathParser initWithPathString:] + 295
6 ParkinsonsTracker 0x0000000104995a20 +[RCTConvert(RNSVG) CGPath:] + 80
7 ParkinsonsTracker 0x00000001043bc57a __49-[RCTComponentData propBlockForKey:inDictionary:]_block_invoke.223 + 282
8 ParkinsonsTracker 0x00000001043bd1b0 __49-[RCTComponentData propBlockForKey:inDictionary:]_block_invoke.259 + 720
9 ParkinsonsTracker 0x00000001043bd528 __49-[RCTComponentData propBlockForKey:inDictionary:]_block_invoke_2.272 + 40
10 ParkinsonsTracker 0x000000010435af13 RCTPerformBlockWithLogFunction + 483
11 ParkinsonsTracker 0x000000010435b0cf RCTPerformBlockWithLogPrefix + 239
12 ParkinsonsTracker 0x00000001043bd48d __49-[RCTComponentData propBlockForKey:inDictionary:]_block_invoke.267 + 445
13 ParkinsonsTracker 0x00000001043bd985 __37-[RCTComponentData setProps:forView:]_block_invoke + 181
14 CoreFoundation 0x0000000106857dc6 __65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 102

@marzolfb
Copy link
Contributor

marzolfb commented Mar 2, 2017

I'm not entirely sure how one reproduces this, but it appears that maybe related to using react-native-svg (which this lib depends on) + some other libs like ART (as mentioned in software-mansion/react-native-svg#246) or react-native-progress (as mentioned in oblador/react-native-progress#40 (comment)).

Looks like it may be a react-native-svg issue rather an issue with this lib. However, I'd like to understand what the root cause is in case someone us comes here with a similar issue in the future. From reading the comments on those two issues, it seems like several people are blocked on this.

Maybe you could find versions for your dependencies:

npm list react-react-native react-native-svg

and provide this info and discuss with others on those existing react-native-svg issue threads to see if you can come up with something in common that could lead to determining root cause?

@balaskumar
Copy link
Author

Thanks for responding so promptly.
Here is the output of the npm list command:

[email protected] /Users/kumar/Applications/react-native/ParkinsonsTracker
├─┬ [email protected]
│ └── [email protected]
└── [email protected]

I am not sure what it means when it reports 2 versions of react-native-svg as above. Could that be the problem?

@marzolfb
Copy link
Contributor

marzolfb commented Mar 2, 2017

It's possible. Change your version spec in your root package.json for react-native-svg to not go above 4.5.x and then re install the lower version

@sandwichfeet
Copy link

Hi, Just confirming i had the same issue with the following
├─┬ [email protected]
│ └── [email protected]
└── [email protected]

Downgrading [email protected] has fixed it and everything seems to be working fine

@balaskumar
Copy link
Author

Once I went back to svg 4.5, things started working very well.
Thanks to both of you!

@skipsuva
Copy link

I just ran into this problem and downgrading the react-native-svg version to 4.5.0 fixed the issue. Might be worth noting in the Readme?

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

No branches or pull requests

4 participants