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.

0.12.0 - application freezes while rendering SVG

See original GitHub issue

Hey,

Thanks for great work on the svg-transformer!

After upgrade from 0.11.3 to 0.12.0 my application freezes when I’m navigating to screen, that contains imported SVG.

Tested on React Native 0.57.5.

Example SVG, that app freezes on, below:

<svg width="30px" height="52px" viewBox="0 0 30 52" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <defs>
        <linearGradient x1="-6.16521421%" y1="14.7934649%" x2="100%" y2="91.4270586%" id="linearGradient-1">
            <stop stop-color="#FAA461" offset="0%"></stop>
            <stop stop-color="#F75C1C" offset="100%"></stop>
        </linearGradient>
    </defs>
    <g id="ONBOARDING-FULL" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <g id="000-B" transform="translate(-287.000000, -462.000000)" fill="url(#linearGradient-1)">
            <g id="smartphone-(1)" transform="translate(287.000000, 462.000000)">
                <path d="M16.411208,47.8814655 C16.411208,48.6383688 15.7792968,49.2521215 15,49.2521215 C14.2207032,49.2521215 13.588792,48.6383688 13.588792,47.8814655 C13.588792,47.1245623 14.2207032,46.5108095 15,46.5108095 C15.7792968,46.5108095 16.411208,47.1245623 16.411208,47.8814655 Z M3.46153846,9.18965517 L26.5384615,9.18965517 L26.5384615,41.8017241 L3.46153846,41.8017241 L3.46153846,9.18965517 Z M26.3076923,0 C28.3458533,0.00218884138 29.9977464,1.60661374 30,3.5862069 L30,48.4137931 C29.9977464,50.3933863 28.3458533,51.9978112 26.3076923,52 L3.69230769,52 C1.65414669,51.9978112 0.0022536,50.3933863 0,48.4137931 L0,3.5862069 C0.0022536,1.60661374 1.65414669,0.00218884138 3.69230769,0 L26.3076923,0 Z M9.80769231,2.9137931 C9.29792665,2.9137931 8.88461538,3.31522761 8.88461538,3.81034483 C8.88461538,4.30546204 9.29792665,4.70689655 9.80769231,4.70689655 L20.1923077,4.70689655 C20.7020733,4.70689655 21.1153846,4.30546204 21.1153846,3.81034483 C21.1153846,3.31522761 20.7020733,2.9137931 20.1923077,2.9137931 L9.80769231,2.9137931 Z M15,51.045225 C16.7983775,51.0430362 18.2551082,49.6281655 18.2573618,47.8814655 C18.2573618,46.1343278 16.7988282,44.7177061 15,44.7177061 C13.2011718,44.7177061 11.7426382,46.1343278 11.7426382,47.8814655 C11.7426382,49.6286032 13.2011718,51.045225 15,51.045225 Z M28.3846154,42.6982759 L28.3846154,8.29310345 C28.3846154,7.79798623 27.9713041,7.39655172 27.4615385,7.39655172 L2.53846154,7.39655172 C2.02869588,7.39655172 1.61538462,7.79798623 1.61538462,8.29310345 L1.61538462,42.6982759 C1.61538462,43.1933931 2.02869588,43.5948276 2.53846154,43.5948276 L27.4615385,43.5948276 C27.9713041,43.5948276 28.3846154,43.1933931 28.3846154,42.6982759 Z" id="Combined-Shape"></path>
            </g>
        </g>
    </g>
</svg>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
kristerkaricommented, Nov 29, 2018

I made another PR, this time to react-native-svg to get the bug fixed: https://github.com/react-native-community/react-native-svg/pull/860

1reaction
kristerkaricommented, Nov 27, 2018

Okay, with that svg image I can reproduce the bug. Seems to be something related to the font-family, font-size, etc. attributes on the g element that causes it to crash.

I need to check how to fix this later, but for now you can use v0.11.3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Complex SVG is rendering slowly and freezes the page
1. Open one of the provided url's · 2. The page freezes · 3. After a while the page will sometimes "unfreeze" and...
Read more >
resvg - crates.io: Rust Package Registry
resvg is an SVG rendering library. It can be used as a Rust library, as a C library, and as a CLI application...
Read more >
IOS (React-native) app crashes in … | Apple Developer Forums
Hi, I am stuck on this for a few days now. Please help. My ReactNative app crashes in TestFlight but seems to work...
Read more >
Why does IE freeze on Layout when rendering an empty SVG ...
I am currently hitting an issue in IE 10 and 11 where the browser tab is hanging every now and then on Layout...
Read more >
flutter_svg 0.21.0+1 | Flutter Package - Pub.dev
An SVG rendering and widget library for Flutter, which allows painting ... 0.14.4; Apply masks in the correct order when blend modes are...
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