react-native-svg: Fatal Exception: java.lang.Error Invalid number formating character 'N'

APP crashes on some Android devices with following stack track when session starts. The crash cannot be reproduced on Emulator or other devices.

The SVG component was used in previous version with react-native-svg: "12.5.0", and no crash issue Although the SVG component has been removed from in current version on the loading screen, the app gets the crash issue.


Current APP info:

  • react-native: 0.71.7
  • react: 18.2.0
  • react-native-svg: 13.14.0

Fatal Exception: java.lang.Error: Invalid number formating character 'N' (i=1, s=MNaN NaN
          A45 45 0 0 1 48 3)
       at com.horcrux.svg.PathParser.parse_number(PathParser.java:627)
       at com.horcrux.svg.PathParser.parse_list_number(PathParser.java:594)
       at com.horcrux.svg.PathParser.parse(PathParser.java:108)
       at com.horcrux.svg.PathView.setD(PathView.java:28)
       at com.horcrux.svg.RenderableViewManager$PathViewManager.setD(RenderableViewManager.java:751)
       at com.horcrux.svg.RenderableViewManager$PathViewManager.setD(RenderableViewManager.java:740)
       at com.facebook.react.viewmanagers.RNSVGPathManagerDelegate.setProperty(RNSVGPathManagerDelegate.java:112)
       at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:46)
       at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:84)
       at com.facebook.react.uimanager.ViewManager.createViewInstance(ViewManager.java:188)
       at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:115)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:281)
       at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:194)
       at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:909)
       at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:1026)
       at com.facebook.react.uimanager.UIViewOperationQueue.access$2600(UIViewOperationQueue.java:47)
       at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1086)
       at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
       at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:175)
       at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:85)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1397)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1408)
       at android.view.Choreographer.doCallbacks(Choreographer.java:1008)
       at android.view.Choreographer.doFrame(Choreographer.java:934)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1382)
       at android.os.Handler.handleCallback(Handler.java:959)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loopOnce(Looper.java:232)
       at android.os.Looper.loop(Looper.java:317)
       at android.app.ActivityThread.main(ActivityThread.java:8501)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 19 (5 by maintainers)

Most upvoted comments

Bob-MYMCL: “the error seems from the lib react-native-progress”

@Bob-MYMC How do you know this? and at what version what this lib taken out of this library (or was it)?

@fullychargedup This issue is caused by NaN values. Please ensure that none of your functions are returning or containing NaN values.

the error seems from the lib react-native-progress