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

RNSVGSvgView drawRect crashes on iPhone 12 Pro with iOS 14.2.1 #1502

Closed
uripre opened this issue Dec 9, 2020 · 4 comments
Closed

RNSVGSvgView drawRect crashes on iPhone 12 Pro with iOS 14.2.1 #1502

uripre opened this issue Dec 9, 2020 · 4 comments
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing repro This issue need minimum repro scenario

Comments

@uripre
Copy link

uripre commented Dec 9, 2020

Hello beloved maintainers 🙏

I received a crash report from one of my users with an iPhone 12 Pro. The app crashes for him every time he opens the app, but allegedly he managed to open it once at the beginning, but not since. After partially symbolicating the crash report, I was able to see it seems to be related with react-native-svg based on the RNSVGxxxx classes, here is the stack trace I have:

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   CoreGraphics                  	0x00000001878b8f68 0x1876a6000 + 2174824
1   CoreGraphics                  	0x00000001878c172c 0x1876a6000 + 2209580
2   CoreGraphics                  	0x00000001879585d4 0x1876a6000 + 2827732
3   CoreGraphics                  	0x00000001879569b8 0x1876a6000 + 2820536
4   CoreGraphics                  	0x00000001878aba1c 0x1876a6000 + 2120220
5   CoreGraphics                  	0x000000018789233c 0x1876a6000 + 2016060
6   MyApp                         	0x00000001023f42cc -[RNSVGRenderable renderTo:rect:] + 1934028 (RNSVGRenderable.m:273)
7   MyApp                         	0x00000001023e23bc __33-[RNSVGGroup renderGroupTo:rect:]_block_invoke + 1860540 (RNSVGGroup.m:59)
8   MyApp                         	0x00000001023e9d3c -[RNSVGNode traverseSubviews:] + 1891644 (RNSVGNode.m:593)
9   MyApp                         	0x00000001023e1d88 -[RNSVGGroup renderGroupTo:rect:] + 1858952 (RNSVGGroup.m:80)
10  MyApp                         	0x00000001023f4338 -[RNSVGRenderable renderTo:rect:] + 1934136 (RNSVGRenderable.m:284)
11  MyApp                         	0x00000001023e23bc __33-[RNSVGGroup renderGroupTo:rect:]_block_invoke + 1860540 (RNSVGGroup.m:59)
12  MyApp                         	0x00000001023e9d3c -[RNSVGNode traverseSubviews:] + 1891644 (RNSVGNode.m:593)
13  MyApp                         	0x00000001023e1d88 -[RNSVGGroup renderGroupTo:rect:] + 1858952 (RNSVGGroup.m:80)
14  MyApp                         	0x00000001023f422c -[RNSVGRenderable renderTo:rect:] + 1933868 (RNSVGRenderable.m:258)
15  MyApp                         	0x00000001023e23bc __33-[RNSVGGroup renderGroupTo:rect:]_block_invoke + 1860540 (RNSVGGroup.m:59)
16  MyApp                         	0x00000001023e9d3c -[RNSVGNode traverseSubviews:] + 1891644 (RNSVGNode.m:593)
17  MyApp                         	0x00000001023e1d88 -[RNSVGGroup renderGroupTo:rect:] + 1858952 (RNSVGGroup.m:80)
18  MyApp                         	0x00000001023f4338 -[RNSVGRenderable renderTo:rect:] + 1934136 (RNSVGRenderable.m:284)
19  MyApp                         	0x00000001023e23bc __33-[RNSVGGroup renderGroupTo:rect:]_block_invoke + 1860540 (RNSVGGroup.m:59)
20  MyApp                         	0x00000001023e9d3c -[RNSVGNode traverseSubviews:] + 1891644 (RNSVGNode.m:593)
21  MyApp                         	0x00000001023e1d88 -[RNSVGGroup renderGroupTo:rect:] + 1858952 (RNSVGGroup.m:80)
22  MyApp                         	0x00000001023f422c -[RNSVGRenderable renderTo:rect:] + 1933868 (RNSVGRenderable.m:258)
23  MyApp                         	0x00000001023e23bc __33-[RNSVGGroup renderGroupTo:rect:]_block_invoke + 1860540 (RNSVGGroup.m:59)
24  MyApp                         	0x00000001023e9d3c -[RNSVGNode traverseSubviews:] + 1891644 (RNSVGNode.m:593)
25  MyApp                         	0x00000001023e1d88 -[RNSVGGroup renderGroupTo:rect:] + 1858952 (RNSVGGroup.m:80)
26  MyApp                         	0x00000001023f4338 -[RNSVGRenderable renderTo:rect:] + 1934136 (RNSVGRenderable.m:284)
27  MyApp                         	0x00000001023e23bc __33-[RNSVGGroup renderGroupTo:rect:]_block_invoke + 1860540 (RNSVGGroup.m:59)
28  MyApp                         	0x00000001023e9d3c -[RNSVGNode traverseSubviews:] + 1891644 (RNSVGNode.m:593)
29  MyApp                         	0x00000001023e1d88 -[RNSVGGroup renderGroupTo:rect:] + 1858952 (RNSVGGroup.m:80)
30  MyApp                         	0x00000001023f4338 -[RNSVGRenderable renderTo:rect:] + 1934136 (RNSVGRenderable.m:284)
31  MyApp                         	0x00000001023f90b4 -[RNSVGSvgView drawToContext:withRect:] + 1953972 (RNSVGSvgView.m:0)
32  MyApp                         	0x00000001023f93c0 -[RNSVGSvgView drawRect:] + 1954752 (RNSVGSvgView.m:0)
33  UIKitCore                     	0x0000000188d52f4c 0x187c3f000 + 17907532
34  QuartzCore                    	0x000000018926c398 0x18910b000 + 1446808
35  QuartzCore                    	0x0000000189133218 0x18910b000 + 164376
36  QuartzCore                    	0x000000018926d514 0x18910b000 + 1451284
37  QuartzCore                    	0x000000018926ce6c 0x18910b000 + 1449580
38  QuartzCore                    	0x000000018927e10c 0x18910b000 + 1519884
39  QuartzCore                    	0x00000001891c3ee0 0x18910b000 + 757472
40  QuartzCore                    	0x00000001891ef36c 0x18910b000 + 934764
41  QuartzCore                    	0x00000001891f06fc 0x18910b000 + 939772
42  CoreFoundation                	0x0000000185dd3358 0x185d33000 + 656216
43  CoreFoundation                	0x0000000185dcd5c4 0x185d33000 + 632260
44  CoreFoundation                	0x0000000185dcdb74 0x185d33000 + 633716
45  CoreFoundation                	0x0000000185dcd21c 0x185d33000 + 631324
46  GraphicsServices              	0x000000019ce4c784 0x19ce49000 + 14212
47  UIKitCore                     	0x0000000188806200 0x187c3f000 + 12349952
48  UIKitCore                     	0x000000018880ba74 0x187c3f000 + 12372596
49  MyApp                      	0x0000000102223f74 main + 32628 (main.m:7)
50  libdyld.dylib                 	0x0000000185a8d6c0 0x185a8c000 + 5824

It doesn't reproduce on any of the other devices I tested it on (but my app still has only a few users so this is the only iPhone 12 Pro that attempted to use it), and it doesn't reproduce on a simulator with an identical spec.

React native info output:

  Binaries:
    Node: 13.12.0 - ~/.nvm/versions/node/v13.12.0/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v13.12.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.2, DriverKit 20.0, macOS 11.0, tvOS 14.2, watchOS 7.1
    Android SDK:
      API Levels: 29, 30
      Build Tools: 28.0.3, 29.0.2, 30.0.2
      System Images: android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.6858069
    Xcode: 12.2/12B45b - /usr/bin/xcodebuild
  Languages:
    Java: 15.0.1 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.3 => 0.63.3 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Library version: 12.1.0

I wasn't able to reproduce this crash locally 😞 Any ideas how to further investigate or any ideas why this might happen?

@uripre
Copy link
Author

uripre commented Dec 10, 2020

I can confirm the app doesn't crash once I remove react-native-svg and the SVG files from the app.

@wangliang1124
Copy link

Have you fixed it?

@Daha62
Copy link

Daha62 commented Sep 3, 2021

haw the same issue

@bohdanprog
Copy link
Member

Hello @uripre, @Daha62,
If the issue still persists, could you share an example and the steps to reproduce it?
Thank you.

@bohdanprog bohdanprog added Missing repro This issue need minimum repro scenario Close when stale This issue is going to be closed when there is no activity for a while labels Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing repro This issue need minimum repro scenario
Projects
None yet
Development

No branches or pull requests

4 participants