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.

Crash on android when using Mask

See original GitHub issue

Snack: https://snack.expo.io/@folio/expo.svg-example

Removing the mask in the middle makes it not crash.

This same SVG renders correctly on both web and iOS, it’s just Android that crashes.

Svg:

<Svg
  width={22}
  height={22}
  viewBox="0 0 22 22"
  fill="none"
  color="black"
>
  <Svg.Path
    d="M19.142 8.515a1 1 0 0 0 0-1.414l-1.414-1.415a1 1 0 0 0-1.414 0l-8.337 8.337a4 4 0 0 0-1.089 2.037l-.474 2.354 2.355-.474a4 4 0 0 0 2.036-1.088l8.337-8.337z"
    stroke="currentColor"
    strokeWidth={2}
    strokeLinecap="round"
  />
  <Svg.Mask id="prefix__a" fill="#fff">
    <Svg.Path d="M17.5 10.5l-3-3L17 5l3 3-2.5 2.5z" />
  </Svg.Mask>
  <Svg.Path
    d="M14.5 7.5l-1.414-1.414a2 2 0 0 0 0 2.828L14.5 7.5zm3 3l-1.414 1.414a2 2 0 0 0 2.828 0L17.5 10.5zM20 8l1.414 1.414a2 2 0 0 0 0-2.828L20 8zm-3-3l1.414-1.414a2 2 0 0 0-2.828 0L17 5zm-3.914 3.914l3 3 2.828-2.828-3-3-2.828 2.828zm5.828 3l2.5-2.5-2.828-2.828-2.5 2.5 2.828 2.828zm2.5-5.328l-3-3-2.828 2.828 3 3 2.828-2.828zm-5.828-3l-2.5 2.5 2.828 2.828 2.5-2.5-2.828-2.828z"
    fill="currentColor"
    mask="url(#prefix__a)"
  />
  <Svg.Path
    d="M10 5a1 1 0 1 0 0-2v2zM3 3a1 1 0 0 0 0 2V3zm7 0H3v2h7V3zM6 9a1 1 0 0 0 0-2v2zM3 7a1 1 0 0 0 0 2V7zm3 0H3v2h3V7z"
    fill="currentColor"
  />
</Svg>

Stack traces:

03-22 16:15:11.550  9876  9876 E AndroidRuntime: FATAL EXCEPTION: main
03-22 16:15:11.550  9876  9876 E AndroidRuntime: Process: host.exp.exponent, PID: 9876
03-22 16:15:11.550  9876  9876 E AndroidRuntime: java.lang.NullPointerException: Attempt to read from field 'abi32_0_0.host.exp.exponent.modules.api.components.svg.SVGLengthUnitType abi32_0_0.host.exp.exponent.modules.api.components.svg.SVGLength.unit' on a null object reference
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at abi32_0_0.host.exp.exponent.modules.api.components.svg.VirtualView.relativeOnWidth(VirtualView.java:331)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at abi32_0_0.host.exp.exponent.modules.api.components.svg.RenderableView.render(RenderableView.java:270)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at abi32_0_0.host.exp.exponent.modules.api.components.svg.GroupView.drawGroup(GroupView.java:99)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at abi32_0_0.host.exp.exponent.modules.api.components.svg.GroupView.draw(GroupView.java:81)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at abi32_0_0.host.exp.exponent.modules.api.components.svg.RenderableView.render(RenderableView.java:311)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at abi32_0_0.host.exp.exponent.modules.api.components.svg.SvgView.drawChildren(SvgView.java:279)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at abi32_0_0.host.exp.exponent.modules.api.components.svg.SvgView.drawOutput(SvgView.java:232)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at abi32_0_0.host.exp.exponent.modules.api.components.svg.SvgView.onDraw(SvgView.java:89)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.draw(View.java:20207)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19082)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.draw(View.java:19935)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at abi32_0_0.com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:702)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19073)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.draw(View.java:19935)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at abi32_0_0.com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:702)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.draw(View.java:20210)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19082)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.draw(View.java:19935)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at abi32_0_0.com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:702)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19073)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.draw(View.java:19935)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.draw(View.java:20210)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.widget.ScrollView.draw(ScrollView.java:1739)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at abi32_0_0.com.facebook.react.views.scroll.ReactScrollView.draw(ReactScrollView.java:377)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19082)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.draw(View.java:19935)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.draw(View.java:20210)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19082)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.draw(View.java:19935)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:4333)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4112)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at abi32_0_0.com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:702)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19073)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19042)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19042)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19042)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19042)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19042)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19042)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19042)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19042)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19042)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19042)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4317)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4290)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:19042)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:686)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:692)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:801)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewRootImpl.draw(ViewRootImpl.java:3311)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3115)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2484)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1460)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7183)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.Choreographer.doCallbacks(Choreographer.java:761)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.Choreographer.doFrame(Choreographer.java:696)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:873)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:99)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:193)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6718)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
03-22 16:15:11.550  9876  9876 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
SimenBcommented, Mar 27, 2019

The illustration was made in Figma and exported as svg, not sketch. Probably a very similar thing, though! But yeah, I totally agree it should be simplified. Thank you for looking into it!

0reactions
SimenBcommented, Apr 8, 2019

We’ve got a way simpler version now, thanks for the feedback! (And thanks for this awesome lib 😀)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crash on android when using Mask · Issue #980 - GitHub
Removing the mask in the middle makes it not crash. This same SVG renders correctly on both web and iOS, it's just Android...
Read more >
How to Fix Tomb of the Mask App Keeps Crashing Problem in ...
TomboftheMask #Keeps #CrashingHow to Fix Tomb of the Mask App Keeps Crashing Problem in Android & Ios - Fix Crash IssueThis video will...
Read more >
Crash on using Select People Mask - Adobe Support
Lightroom and Adobe Camera Raw crash while opening portrait photos if Select People mask panel is open, by default. Before you start. Keep...
Read more >
Configure Session Replay on crashes for Android - Dynatrace
Mask sensitive data​​ Session Replay on crashes comes with three predefined masking levels: Safest—all the editable texts fields, images, labels, web views, and ......
Read more >
Tomb of the Mask: Color crashes - what to do? Tips & solutions
For example, it can be due to the iOS operating system for Apple devices or the Android operating system for Android devices, which...
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