RNSVGRect getPath crash on iOS 14.4.0
See original GitHub issueI 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:
- Created 3 years ago
- Reactions:4
- Comments:9
@aayushm9595 How did you resolve the above issue ?
+1