question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RNSVGRect getPath crash on iOS 14.4.0

See original GitHub issue

I got this crash on production app also below is the crashlytics stack trace. It happens on a report screen which use some imported SVG icons and also render bar chart using react-native-chart-kit.

I have tried to find any negative value and push an update but the crash is still present and I do not know what cause this crash.

Our current versions are react-native: 0.63.4 react-native-svg: 12.1.0 react-native-chart-kit: 6.6.1 (the crash screen use this library to display bar chart)

The bar chart

const BAR_CHART_CONFIG = {
  barPercentage: 0.25,
  backgroundColor: COLOR.PRIMARY_LIGHT,
  backgroundGradientFrom: COLOR.PRIMARY_LIGHT,
  backgroundGradientTo: COLOR.PRIMARY_LIGHT,
  color: () => COLOR.PRIMARY,
  decimalPlaces: 0,
  fillShadowGradient: COLOR.PRIMARY,
  fillShadowGradientOpacity: 1,
  height: 5000,
  propsForBackgroundLines: {
    stroke: '#F3F3F3',
  },
}
const window = Dimensions.get('window')
const barChartWidth = Math.ceil(parseInt(window.width, 10)) - 10

<BarChart
  data={barChartData}
  chartConfig={BAR_CHART_CONFIG}
  fromZero={true}
  height={200}
  width={Math.ceil(parseInt(window.width, 10)) - SPACING.BIG}
  withInnerLines
  yLabelsOffset={SPACING.HUGE}
  showBarTops={false}
/>

The icon used

<svg width="19" height="10" viewBox="0 0 19 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.542 0.104492L18.333 0.895508L9.5 9.72852L0.666992 0.895508L1.45801 0.104492L9.5 8.14648L17.542 0.104492Z" fill="#000"/>
</svg>

Stack trace

Crashed: com.apple.main-thread 0 libsystem_kernel.dylib 0x1add4984c __pthread_kill + 8 1 libsystem_pthread.dylib 0x1ca6309e8 pthread_kill + 212 2 libsystem_c.dylib 0x18ab058f4 abort + 100 3 libsystem_c.dylib 0x18ab04cf4 err + 286 4 CoreGraphics 0x183853720 CGPathAddUnevenCornersRoundedRect + 486 5 KOTRAriel 0x1047fe890 -[RNSVGRect getPath:] + 103 (RNSVGRect.m:103) 6 KOTRAriel 0x1048000d0 -[RNSVGRenderable renderLayerTo:rect:] + 355 (RNSVGRenderable.m:355) 7 KOTRAriel 0x1047ffa1c -[RNSVGRenderable renderTo:rect:] + 284 (RNSVGRenderable.m:284) 8 KOTRAriel 0x1047edaa0 __33-[RNSVGGroup renderGroupTo:rect:]_block_invoke + 59 (RNSVGGroup.m:59) 9 KOTRAriel 0x1047f5420 -[RNSVGNode traverseSubviews:] + 593 (RNSVGNode.m:593) 10 KOTRAriel 0x1047ed46c -[RNSVGGroup renderGroupTo:rect:] + 80 (RNSVGGroup.m:80) 11 KOTRAriel 0x1047ffa1c -[RNSVGRenderable renderTo:rect:] + 284 (RNSVGRenderable.m:284) 12 KOTRAriel 0x1047edaa0 _33-[RNSVGGroup renderGroupTo:rect:]block_invoke + 59 (RNSVGGroup.m:59) 13 KOTRAriel 0x1047f5420 -[RNSVGNode traverseSubviews:] + 593 (RNSVGNode.m:593) 14 KOTRAriel 0x1047ed46c -[RNSVGGroup renderGroupTo:rect:] + 80 (RNSVGGroup.m:80) 15 KOTRAriel 0x1047ffa1c -[RNSVGRenderable renderTo:rect:] + 284 (RNSVGRenderable.m:284) 16 KOTRAriel 0x104804798 -[RNSVGSvgView drawToContext:withRect:] + 196 (RNSVGSvgView.m:196) 17 KOTRAriel 0x104804aa4 -[RNSVGSvgView drawRect:] + 228 (RNSVGSvgView.m:228) 18 UIKitCore 0x184b7e588 -[UIView(CALayerDelegate) drawLayer:inContext:] + 584 19 QuartzCore 0x185084064 -[CALayer drawInContext:] + 308 20 QuartzCore 0x184f555a8 CABackingStoreUpdate + 176 21 QuartzCore 0x18508d5a4 invocation function for block in CA::Layer::display() + 52 22 QuartzCore 0x1850837e4 -[CALayer _display] + 1680 23 QuartzCore 0x1850967fc CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 416 24 QuartzCore 0x184fe1d7c CA::Context::commit_transaction(CA::Transaction*, double, double*) + 416 25 QuartzCore 0x18500bf40 CA::Transaction::commit() + 728 26 QuartzCore 0x18500d1f0 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92 27 CoreFoundation 0x181d8987c CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 32 28 CoreFoundation 0x181d83f50 __CFRunLoopDoObservers + 604 29 CoreFoundation 0x181d84498 __CFRunLoopRun + 960 30 CoreFoundation 0x181d83ba0 CFRunLoopRunSpecific + 572 31 GraphicsServices 0x198aec598 GSEventRunModal + 160 32 UIKitCore 0x1846752f4 -[UIApplication _run] + 1052 33 UIKitCore 0x18467a874 UIApplicationMain + 164 34 KOTRAriel 0x10443ee00 main + 7 (main.m:7) 35 libdyld.dylib 0x181a62568 start + 4

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:9

github_iconTop GitHub Comments

1reaction
sangameshrentlycommented, Sep 27, 2021

@aayushm9595 How did you resolve the above issue ?

0reactions
RonanMaguire1commented, Aug 11, 2022

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

RNSVGRect getPath crash on iOS 14.4.0 · Issue #1540 - GitHub
It happens on a report screen which use some imported SVG icons and also render bar chart using react-native-chart-kit. I have tried to...
Read more >
Simulator iOS 14 crashes with dyld: Symbol not found: _vfork
When I start my App on iOS 14 Simulators, the App crashes with the following error and I don't know what to do....
Read more >
Developers - RNSVGRect crash issue on iOS 14 - - Bountysource
Hi, our React Native app uses the react-native-svg library and some of our users with iOS 14 are constantly catching crashes, but we...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found