Skip to content

crash upon some svg path #2839

@topcheer

Description

@topcheer

Description

      Fatal Exception: java.lang.IllegalArgumentException: Invalid number formating character 'Z' (i=80, s=M290 200 C295 190, 300 180, 310 185 C320 190, 315 200, 300 210 C290 205, 290 200Z)
   at com.horcrux.svg.PathParser.parse_number(PathParser.java:631)
   at com.horcrux.svg.PathParser.parse_list_number(PathParser.java:598)
   at com.horcrux.svg.PathParser.parse(PathParser.java:162)
   at com.horcrux.svg.PathView.setD(PathView.java:28)
   at com.horcrux.svg.RenderableViewManager$PathViewManager.setD(RenderableViewManager.java:674)
   at com.horcrux.svg.RenderableViewManager$PathViewManager.setD(RenderableViewManager.java:663)
   at com.facebook.react.viewmanagers.RNSVGPathManagerDelegate.setProperty(RNSVGPathManagerDelegate.java:111)
   at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:103)
   at com.facebook.react.uimanager.ViewManager.createViewInstance(ViewManager.java:230)
   at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:148)
   at com.facebook.react.fabric.mounting.SurfaceMountingManager.createViewUnsafe(SurfaceMountingManager.java:673)
   at com.facebook.react.fabric.mounting.SurfaceMountingManager.preallocateView(SurfaceMountingManager.java:1083)
   at com.facebook.react.fabric.mounting.mountitems.PreAllocateViewMountItem.execute(PreAllocateViewMountItem.kt:39)
   at com.facebook.react.fabric.mounting.MountItemDispatcher.executeOrEnqueue(MountItemDispatcher.kt:325)
   at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchPreMountItemsImpl(MountItemDispatcher.kt:300)
   at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchPreMountItems(MountItemDispatcher.kt:279)
   at com.facebook.react.fabric.FabricUIManager$DispatchUIFrameCallback.doFrameGuarded(FabricUIManager.java:1513)
   at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.kt:25)
   at com.facebook.react.modules.core.ReactChoreographer.frameCallback$lambda$1(ReactChoreographer.kt:59)
   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1299)
   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1309)
   at android.view.Choreographer.doCallbacks(Choreographer.java:923)
   at android.view.Choreographer.doFrame(Choreographer.java:847)
   at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1283)
   at android.os.Handler.handleCallback(Handler.java:942)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loopOnce(Looper.java:226)
   at android.os.Looper.loop(Looper.java:313)
   at android.app.ActivityThread.main(ActivityThread.java:8762)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Steps to reproduce

Create an svg with specified path, run on Andorid, crash.

Snack or a link to a repository

n/a

SVG version

15.150

React Native version

0.81.2

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Missing reproThis issue need minimum repro scenario

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions