coinjar / react-native-wagmi-charts

A sweet & simple chart library for React Native that will make us feel like We're All Gonna Make It.
MIT License
589 stars 116 forks source link

non-std C++ exception when adding snapToPoint={true} #161

Open geraldbb opened 1 year ago

geraldbb commented 1 year ago

When adding snapToPoint={true}, the following error is thrown:

non-std C++ exception

ABI49_0_0RCTFatal
-[ABI49_0_0RCTCxxBridge handleError:]
__43-[ABI49_0_0RCTCxxBridge _initializeBridge:]_block_invoke
ABI49_0_0facebook::ABI49_0_0React::ABI49_0_0RCTMessageThread::tryFunc(std::__1::function<void ()> const&)
invocation function for block in ABI49_0_0facebook::ABI49_0_0React::ABI49_0_0RCTMessageThread::runAsync(std::__1::function<void ()>)
__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__
__CFRunLoopDoBlocks
__CFRunLoopRun
CFRunLoopRunSpecific
+[ABI49_0_0RCTCxxBridge runRunLoop]
__NSThread__start__
_pthread_start
thread_start

Here is the complete code:

<GestureHandlerRootView>
    <LineChart.Provider data={data}>
        <LineChart>
            <LineChart.Path />
            <LineChart.CursorCrosshair snapToPoint={true} />
        </LineChart>
    </LineChart.Provider>
</GestureHandlerRootView>

Dependencies:

├─ react-native-wagmi-charts@2.3.0
│  ├─ d3-interpolate-path@^2.2.3
│  ├─ d3-scale@^2
│  ├─ d3-shape@^3.0.1
│  ├─ react-keyed-flatten-children@^1.3.0
│  └─ react-native-redash@^16.1.1

├─ react-native-gesture-handler@2.12.1
│  ├─ @egjs/hammerjs@^2.0.17
│  ├─ hoist-non-react-statics@^3.3.0
│  ├─ invariant@^2.2.4
│  ├─ lodash@^4.17.21
│  └─ prop-types@^15.7.2

├─ react-native-reanimated@3.3.0
│  ├─ @babel/plugin-transform-object-assign@^7.16.7
│  ├─ @babel/preset-typescript@^7.16.7
│  ├─ convert-source-map@^2.0.0
│  ├─ convert-source-map@2.0.0
│  └─ invariant@^2.2.4
cam-shaw commented 10 months ago

@geraldbb Issue is fixed in this PR, but is yet to be released https://github.com/coinjar/react-native-wagmi-charts/pull/148 As a workaround, add to your dependency resolutions at least this version of d3-array

 "resolutions": {
    "d3-array": "3.1.6",
  },