SVG import segfault

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
jalar
Posts: 8
Joined: Wed Jan 10, 2018 1:07 pm

SVG import segfault

Post by jalar »

Hi,
When I try to import an SVG, freecad immediately segfaults.

openat(AT_FDCWD, "/path-to-file.svg", O_RDONLY) = 27
fstat(27, {st_mode=S_IFREG|0644, st_size=2234752, ...}) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x3a9} ---
write(2, "\33[1;31m", 7) = 7
write(2, "Program received signal SIGSEGV,"..., 53Program received signal SIGSEGV, Segmentation fault.
) = 53

#0 /lib/x86_64-linux-gnu/libc.so.6(+0x37140) [0x7fd97f382140]
#1 /lib/x86_64-linux-gnu/libexpat.so.1(XML_SetHashSalt+0x1b) [0x7fd976c411cb]
#2 /usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so(+0x6968) [0x7fd90487a968]
...

Nobody else seems to have this problem, am I missing some dependencies? (ubuntu 17.10, freecad-daily just updated, but same behavior on freecad 0.16)
User avatar
Willem
Veteran
Posts: 1854
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: SVG import segfault

Post by Willem »

Hi, welcome to the forum
Can you upload your SVG file. I do not know with what program it is made.
With a bad SVG file I try to open it in Inkscape and when that succeeds I save it as a normal SVG, very often this trick works
jalar
Posts: 8
Joined: Wed Jan 10, 2018 1:07 pm

Re: SVG import segfault

Post by jalar »

Doesn't help. The -normal.svg is saved from inkscape.

Even if there is something wrong with the SVG, why the segfault?
Attachments
Svg_example4-normal.svg
(808 Bytes) Downloaded 179 times
Svg_example4.svg
(292 Bytes) Downloaded 183 times
User avatar
Willem
Veteran
Posts: 1854
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: SVG import segfault

Post by Willem »

Hi, the SVG file has no problems on my system.

OS: Ubuntu 16.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12920 (Git)
Build type: None
Branch: master
Hash: 8faa9f38bb70a598afc2bc39ea1645d416ab057e
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: Dutch/Netherlands (nl_NL)




phpBB [video]
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: SVG import segfault

Post by Kunda1 »

jalar wrote: Wed Jan 10, 2018 1:19 pm Nobody else seems to have this problem, am I missing some dependencies? (ubuntu 17.10, freecad-daily just updated, but same behavior on freecad 0.16)
This is why we ask to actually paste the contents of Help > About FreeCAD > copy to clipboard
to ascertain this point exactly. Per the forum guidelines.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Chris_G
Veteran
Posts: 2596
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: SVG import segfault

Post by Chris_G »

jalar wrote: Wed Jan 10, 2018 1:19 pm #0 /lib/x86_64-linux-gnu/libc.so.6(+0x37140) [0x7fd97f382140]
#1 /lib/x86_64-linux-gnu/libexpat.so.1(XML_SetHashSalt+0x1b) [0x7fd976c411cb]
#2 /usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so(+0x6968) [0x7fd90487a968]
Maybe a libexpat problem ? :
https://forum.freecadweb.org/viewtopic. ... 68#p190355
jalar
Posts: 8
Joined: Wed Jan 10, 2018 1:07 pm

Re: SVG import segfault

Post by jalar »

I did read the guidlines, but somehow missed that, sorry.

OS: Ubuntu 17.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12920 (Git)
Build type: None
Branch: master
Hash: 8faa9f38bb70a598afc2bc39ea1645d416ab057e
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: Swedish/Sweden (sv_SE)

But in this case, does this really help?
jalar
Posts: 8
Joined: Wed Jan 10, 2018 1:07 pm

Re: SVG import segfault

Post by jalar »

libexpat is the problem.

On Ubuntu 17.10 artful, the libexpat package version is 2.2.3-1 (https://packages.ubuntu.com/artful/libexpat1). Crash on SVG import.

Manually installing libexpat-2.1.0-7ubuntu0.16.04.3 fixes the problem. No crash.
jalar
Posts: 8
Joined: Wed Jan 10, 2018 1:07 pm

Re: SVG import segfault

Post by jalar »

Steps to reproduce:

1) Command-line start `freecad Svg_example4.svg`
2) Segfault
jalar
Posts: 8
Joined: Wed Jan 10, 2018 1:07 pm

Re: SVG import segfault

Post by jalar »

Post Reply