SVG import segfault
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: SVG import segfault
is this an upstream expat issue?
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
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
Re: SVG import segfault
Cannot say, I only know what I told in the bug report.
I do not even know the cause of the segfault, only that an earlier version of the library works.
I do not even know the cause of the segfault, only that an earlier version of the library works.
Re: SVG import segfault
It's a dependency problem that two packages (Coin3d and Python) use different versions of the libexpat library. The Path/CAM guys encountered this issue a couple of months ago. For more details see:
https://forum.freecadweb.org/viewtopic.php?f=10&t=24268
https://forum.freecadweb.org/viewtopic.php?f=15&t=23380
The reason is that Coin3d has its own private expat version that is binary incompatible to the system-wide version and that's why it causes the crash.
As a workaround you should keep your libexpat package downgraded until it's fixed by the package maintainer of Coin3d who preferably fixes the switch to link against the system-wide expat version.
So, the bug you reported can be closed again as not fixable because from FreeCAD point of view there is nothing we can do.
https://forum.freecadweb.org/viewtopic.php?f=10&t=24268
https://forum.freecadweb.org/viewtopic.php?f=15&t=23380
The reason is that Coin3d has its own private expat version that is binary incompatible to the system-wide version and that's why it causes the crash.
As a workaround you should keep your libexpat package downgraded until it's fixed by the package maintainer of Coin3d who preferably fixes the switch to link against the system-wide expat version.
So, the bug you reported can be closed again as not fixable because from FreeCAD point of view there is nothing we can do.
Re: SVG import segfault
OK, thanks for the info!
Re: SVG import segfault
I am running into this problem now as I would like to import an SVG file as geometry and extrude it.
Perhaps a stupid question: how do I go about downgrading libexpat in Ubuntu and to which version?
Thanks in advance!
Perhaps a stupid question: how do I go about downgrading libexpat in Ubuntu and to which version?
Thanks in advance!
Re: SVG import segfault
The packages from Ubuntu xenial work fine :
https://packages.ubuntu.com/xenial/expat
https://packages.ubuntu.com/xenial/libexpat1
I have also this one, but I don't know if it is really needed :
https://packages.ubuntu.com/xenial/libexpat1-dev
Then in the folder where you downloaded the packages :
https://packages.ubuntu.com/xenial/expat
https://packages.ubuntu.com/xenial/libexpat1
I have also this one, but I don't know if it is really needed :
https://packages.ubuntu.com/xenial/libexpat1-dev
Then in the folder where you downloaded the packages :
Code: Select all
sudo dpkg -i ./expat_2.1.0-7ubuntu0.16.04.3_amd64.deb
sudo echo expat hold | sudo dpkg --set-selections
sudo dpkg -i ./libexpat1_2.1.0-7ubuntu0.16.04.3_amd64.deb
sudo echo libexpat1 hold | sudo dpkg --set-selections
sudo dpkg -i ./libexpat1-dev_2.1.0-7ubuntu0.16.04.3_amd64.deb
sudo echo libexpat1-dev hold | sudo dpkg --set-selections
Re: SVG import segfault
Worked! Thanks!
Re: SVG import segfault
I'm experiencing the same behavior with appimage binaries in Debian Testing, both with FreeCAD_0.17.13509.glibc2.17-x86_64.AppImage and with FreeCAD_0.18.13516.glibc2.17-x86_64.AppImage.
I find this weird, since they are supposed to be static, aren't they?
The message I get is pretty much the same, the error too (SEGFAULT when trying to load any svg file produced by Inkscape). Curiously enough, if I import the same file as Drawing, I can see it with no error (but same failure if I import it as "SVG as geometry").
I get the error as follows:
I find this weird, since they are supposed to be static, aren't they?
The message I get is pretty much the same, the error too (SEGFAULT when trying to load any svg file produced by Inkscape). Curiously enough, if I import the same file as Drawing, I can see it with no error (but same failure if I import it as "SVG as geometry").
I get the error as follows:
Code: Select all
$ ./FreeCAD_0.18.13516.glibc2.17-x86_64.AppImage /tmp/drawing.svg
FreeCAD 0.18, Libs: 0.18R13516 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2018
##### #### ### ####
# # # # # #
# ## #### #### # # # # #
#### # # # # # # # ##### # #
# # #### #### # # # # #
# # # # # # # # # ## ## ##
# # #### #### ### # # #### ## ## ##
not a freecad file: .SVG
not a freecad file: .DXF
not a freecad file: .SVG
not a freecad file: .SVG
** (freecad-daily:28319): WARNING **: 18:56:48.837: invalid source position for vertical gradient
** (freecad-daily:28319): WARNING **: 18:56:48.837: invalid source position for vertical gradient
Program received signal SIGSEGV, Segmentation fault.
#0 /lib/x86_64-linux-gnu/libc.so.6(+0x34f00) [0x7f4ee9e33f00]
#1 /lib/x86_64-linux-gnu/libexpat.so.1(XML_SetHashSalt+0x1b) [0x7f4edf8fdfbb]
#2 /tmp/.mount_freecammFrx0/usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so(+0x3e32) [0x7f4e8484be32]
#3 /tmp/.mount_freecammFrx0/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x4d4e) [0x7f4eeba4e24e]
Re: SVG import segfault
it's work, many thanksChris_G wrote: ↑Thu Apr 19, 2018 8:45 am The packages from Ubuntu xenial work fine :
https://packages.ubuntu.com/xenial/expat
https://packages.ubuntu.com/xenial/libexpat1
I have also this one, but I don't know if it is really needed :
https://packages.ubuntu.com/xenial/libexpat1-dev
Re: SVG import segfault
Thank youChris_G wrote: ↑Thu Apr 19, 2018 8:45 am The packages from Ubuntu xenial work fine :
https://packages.ubuntu.com/xenial/expat
https://packages.ubuntu.com/xenial/libexpat1
I have also this one, but I don't know if it is really needed :
https://packages.ubuntu.com/xenial/libexpat1-dev
Then in the folder where you downloaded the packages :Code: Select all
sudo dpkg -i ./expat_2.1.0-7ubuntu0.16.04.3_amd64.deb sudo echo expat hold | sudo dpkg --set-selections sudo dpkg -i ./libexpat1_2.1.0-7ubuntu0.16.04.3_amd64.deb sudo echo libexpat1 hold | sudo dpkg --set-selections sudo dpkg -i ./libexpat1-dev_2.1.0-7ubuntu0.16.04.3_amd64.deb sudo echo libexpat1-dev hold | sudo dpkg --set-selections
This worked for me even with the errors by libexpat:
Code: Select all
amunizp@amunizp-U33Jc:~/Downloads$ sudo dpkg -i ./e
eggbot2.8.0_manual/ expat_2.1.0-7ubuntu0.16.04.3_amd64.deb
amunizp@amunizp-U33Jc:~/Downloads$ sudo dpkg -i ./expat_2.1.0-7ubuntu0.16.04.3_amd64.deb
Selecting previously unselected package expat.
(Reading database ... 555662 files and directories currently installed.)
Preparing to unpack .../expat_2.1.0-7ubuntu0.16.04.3_amd64.deb ...
Unpacking expat (2.1.0-7ubuntu0.16.04.3) ...
Setting up expat (2.1.0-7ubuntu0.16.04.3) ...
Processing triggers for man-db (2.8.3-2) ...
amunizp@amunizp-U33Jc:~/Downloads$ sudo echo expat hold | sudo dpkg --set-selections
amunizp@amunizp-U33Jc:~/Downloads$ sudo dpkg -i ./libexpat1
libexpat1_2.1.0-7ubuntu0.16.04.3_amd64.deb libexpat1-dev_2.1.0-7ubuntu0.16.04.3_amd64.deb
amunizp@amunizp-U33Jc:~/Downloads$ sudo dpkg -i ./libexpat1_2.1.0-7ubuntu0.16.04.3_amd64.deb
dpkg: warning: downgrading libexpat1:amd64 from 2.2.5-3 to 2.1.0-7ubuntu0.16.04.3
(Reading database ... 555667 files and directories currently installed.)
Preparing to unpack .../libexpat1_2.1.0-7ubuntu0.16.04.3_amd64.deb ...
De-configuring libexpat1:i386 (2.2.5-3) ...
Unpacking libexpat1:amd64 (2.1.0-7ubuntu0.16.04.3) over (2.2.5-3) ...
dpkg: error processing package libexpat1:amd64 (--install):
package libexpat1:amd64 2.1.0-7ubuntu0.16.04.3 cannot be configured because libexpat1:i386 is at a different version (2.2.5-3)
dpkg: error processing package libexpat1:i386 (--install):
package libexpat1:i386 2.2.5-3 cannot be configured because libexpat1:amd64 is at a different version (2.1.0-7ubuntu0.16.04.3)
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
libexpat1:amd64
libexpat1:i386
amunizp@amunizp-U33Jc:~/Downloads$ sudo echo libexpat1 hold | sudo dpkg --set-selections
amunizp@amunizp-U33Jc:~/Downloads$ sudo dpkg -i ./libexpat1
libexpat1_2.1.0-7ubuntu0.16.04.3_amd64.deb libexpat1-dev_2.1.0-7ubuntu0.16.04.3_amd64.deb
amunizp@amunizp-U33Jc:~/Downloads$ sudo dpkg -i ./libexpat1-dev_2.1.0-7ubuntu0.16.04.3_amd64.deb
dpkg: warning: downgrading libexpat1-dev:amd64 from 2.2.5-3 to 2.1.0-7ubuntu0.16.04.3
(Reading database ... 555667 files and directories currently installed.)
Preparing to unpack .../libexpat1-dev_2.1.0-7ubuntu0.16.04.3_amd64.deb ...
Unpacking libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) over (2.2.5-3) ...
dpkg: dependency problems prevent configuration of libexpat1-dev:amd64:
libexpat1-dev:amd64 depends on libexpat1 (= 2.1.0-7ubuntu0.16.04.3); however:
Package libexpat1:amd64 is not configured yet.
dpkg: error processing package libexpat1-dev:amd64 (--install):
dependency problems - leaving unconfigured
Processing triggers for doc-base (0.10.8) ...
Processing 1 changed doc-base file...
Registering documents with scrollkeeper...
Errors were encountered while processing:
libexpat1-dev:amd64
amunizp@amunizp-U33Jc:~/Downloads$ sudo echo libexpat1-dev hold | sudo dpkg --set-selections
amunizp@amunizp-U33Jc:~/Downloads$ freecad
FreeCAD 0.17, Libs: 0.17R13541 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2018
##### #### ### ####
# # # # # #
# ## #### #### # # # # #
#### # # # # # # # ##### # #
# # #### #### # # # # #
# # # # # # # # # ## ## ##
# # #### #### ### # # #### ## ## ##
not a freecad file: .BMP
not a freecad file: .JPG
not a freecad file: .JPG
not a freecad file: .STL
processing element 1: svg
existing group transform: []
name: svg1457
done processing element 1
processing element 2: defs
existing group transform: [Matrix ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1))]
name: defs1451
(...)