Page 1 of 1

[20.3] SVG import crash

PostPosted: Wed Feb 19, 2020 12:59 pm
by J.C
Importing an SVG file results in an error:
Code: Select all
bpy.ops.object.delete(use_global=False)
Deleted 1 object(s)
bpy.context.space_data.recent_folders_active = 1
bpy.context.space_data.recent_folders_active = 0
Traceback (most recent call last):
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\__init__.py", line 59, in execute
    return import_svg.load(self, context, filepath=self.filepath)
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\import_svg.py", line 1882, in load
    load_svg(context, filepath, do_colormanage)
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\import_svg.py", line 1872, in load_svg
    loader.parse()
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\import_svg.py", line 1085, in parse
    ob = parseAbstractNode(node, self._context)
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\import_svg.py", line 1856, in parseAbstractNode
    ob.parse()
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\import_svg.py", line 1085, in parse
    ob = parseAbstractNode(node, self._context)
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\import_svg.py", line 1856, in parseAbstractNode
    ob.parse()
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\import_svg.py", line 1085, in parse
    ob = parseAbstractNode(node, self._context)
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\import_svg.py", line 1856, in parseAbstractNode
    ob.parse()
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\import_svg.py", line 1085, in parse
    ob = parseAbstractNode(node, self._context)
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\import_svg.py", line 1856, in parseAbstractNode
    ob.parse()
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\import_svg.py", line 1134, in parse
    pathParser = SVGPathParser(d, self._styles['useFill'])
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\import_svg.py", line 508, in __init__
    self._data = SVGPathData(d)
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\import_svg.py", line 420, in __init__
    token, last_char = read_float(d, i)
  File "C:\Program Files\BlenderOctane20_7\2.81\scripts\addons\io_curve_svg\svg_util.py", line 88, in read_float
    raise Exception('Invalid float value near ' + text[start_index:start_index + 10])
Exception: Invalid float value near .93,4.18,5

location: <unknown location>:-1


The same file is imported fine in official blender builds.

Re: [20.3] SVG import crash

PostPosted: Thu Feb 20, 2020 9:08 am
by linograndiotoy
Can you attach your SVG file reproducing the crash?

Re: [20.3] SVG import crash

PostPosted: Fri Feb 21, 2020 10:14 am
by J.C
linograndiotoy wrote:Can you attach your SVG file reproducing the crash?


Sure, here it is:
svg_sample.zip
(356 Bytes) Downloaded 165 times

Re: [20.3] SVG import crash

PostPosted: Fri Feb 21, 2020 4:31 pm
by ChrisH
J.C. what Blender version(s) did you test with?

I tested with 2.80 and 2.82, both works. I downloaded 2.81 from blender.org, and then I couldn't import the SVG, so it could be specific to 2.81..

Re: [20.3] SVG import crash

PostPosted: Sun Feb 23, 2020 9:42 am
by linograndiotoy
Yes, works fine here in 2.82.

Re: [20.3] SVG import crash

PostPosted: Mon Feb 24, 2020 8:06 am
by J.C
ChrisH wrote:J.C. what Blender version(s) did you test with?

I tested with 2.80 and 2.82, both works. I downloaded 2.81 from blender.org, and then I couldn't import the SVG, so it could be specific to 2.81..


I tested latest 2.81a and up. They import the SVG files without any issue.

Re: [20.3] SVG import crash

PostPosted: Mon Feb 24, 2020 11:21 am
by linograndiotoy
J.C wrote:
ChrisH wrote:J.C. what Blender version(s) did you test with?

I tested with 2.80 and 2.82, both works. I downloaded 2.81 from blender.org, and then I couldn't import the SVG, so it could be specific to 2.81..


I tested latest 2.81a and up. They import the SVG files without any issue.


Perfect then.