FC Crash on .svg import

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!
micksulley
Posts: 78
Joined: Fri May 11, 2018 9:28 am

FC Crash on .svg import

Postby micksulley » Mon Jul 23, 2018 8:36 pm

I am experiencing a crash when I import a .svg file. Tried on 0.18 AppImage and also 0.17 from the repository. Here is what I did -
Open FC,
Part Design - create body, create sketch, close sketch, pad to create object
Draft - Import - select .svg file - select Open svg as geometry - FC crashes

I have done this in the past and it has worked. I have recently upgraded from Mint 18.3 to Mint 19, don't know if that could be the problem...

I have run both releases from a terminal to see the error, both give segmentation fault

i have attached the terminal output from both, and the .svg file, although I have tried other .svg files with the same result

0.18 AppImage
OS: Linux Mint 19 Tara
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13959 (Git) AppImage
Build type: None
Branch: master
Hash: 2f18182b6dff87f8857787c854e39ca4d441f993
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)

0.17
OS: Linux Mint 19 Tara
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13528 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 5c3f7bf8ec51e2c7187789f7edba71a7aa82a88b
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
Attachments
adr.svg
(13 KiB) Downloaded 79 times
FC18Crash.txt
(6.44 KiB) Downloaded 15 times
FC17Crash.txt
(5.35 KiB) Downloaded 15 times
micksulley
Posts: 78
Joined: Fri May 11, 2018 9:28 am

Re: FC Crash on .svg import

Postby micksulley » Mon Jul 23, 2018 8:55 pm

Just realised that I have FC on my laptop which is still on Mint 18. Tried it on that and it works, so I guess it must be a Mint problem not an FC problem.
I am reporting it on the Mint forum

Mick
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FC Crash on .svg import

Postby NormandC » Mon Jul 23, 2018 9:41 pm

Actually, I think it's a libexpat1 packaging issue, it's a library FreeCAD depends on. On some recent Ubuntu version (and I assume Mint, since most of their libraries are taken directly from Ubuntu repositories) , it crashes. You'll find a topic about this here.
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FC Crash on .svg import

Postby NormandC » Mon Jul 23, 2018 9:45 pm

micksulley wrote:
Mon Jul 23, 2018 8:36 pm
I have recently upgraded from Mint 18.3 to Mint 19
I'm getting the same crash on Ubuntu 18.04 LTS. Mint 19 must be based on it.

OS: Ubuntu 18.04 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13528 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 5c3f7bf8ec51e2c7187789f7edba71a7aa82a88b
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Canada (fr_CA)
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FC Crash on .svg import

Postby NormandC » Mon Jul 23, 2018 9:48 pm

TheMarkster
Posts: 1061
Joined: Thu Apr 05, 2018 1:53 am

Re: FC Crash on .svg import

Postby TheMarkster » Mon Jul 23, 2018 10:56 pm

I imported your file for you.

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14061 (Git)
Build type: Release
Branch: master
Hash: c4fc02cbcfff975712e977dc08f859fba71ba0ad
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
Attachments
adr-import.FCStd
(45.28 KiB) Downloaded 16 times
micksulley
Posts: 78
Joined: Fri May 11, 2018 9:28 am

Re: FC Crash on .svg import

Postby micksulley » Tue Jul 24, 2018 5:14 pm

Thanks for that.
I have fixed it, for anyone with the same problem here is what I did -

downloaded from https://pkgs.org/download/libexpat1
Ubuntu 16.04 versions
libexpat1_2.1.0-7ubuntu0.16.04.3_i386.deb
libexpat1_2.1.0-7ubuntu0.16.04.3_amd64.deb
cd Download
sudo dpkg -i libexpat1_2.1.0-7ubuntu0.16.04.3_amd64.deb
sudo dpkg -i libexpat1_2.1.0-7ubuntu0.16.04.3_i386.deb
Tested - it works!!!
(and flag libexpat1 to not update)
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: FC Crash on .svg import

Postby NormandC » Tue Jul 24, 2018 6:24 pm

FYI, kkremitzki is working this summer to improve management of FreeCAD's many dependencies. As part of this project he is repackaging many libraries in Debian. Hopefully the work he's doing will trickle down on Ubuntu and Linux Mint. I asked him about this specific libexpat1 issue following your topic, and he plans on fixing the Coin3d package.

https://forum.freecadweb.org/viewtopic. ... 70#p246267
micksulley
Posts: 78
Joined: Fri May 11, 2018 9:28 am

Re: FC Crash on .svg import

Postby micksulley » Tue Jul 24, 2018 7:36 pm

Great news, thank you
zoli_ce
Posts: 1
Joined: Thu Jan 17, 2019 8:31 pm

Re: FC Crash on .svg import

Postby zoli_ce » Thu Jan 17, 2019 9:12 pm

Hi All,
just in case you'd find my home-made quick and safe solution useful --
I have been using the AppImage recently and I wonder why it is not yet revealed (at least I haven't found it elsewhere):
AppImage uses its own content, not the Linux components. And it is easy to unpack, alter and repack.

So what I did is:

* FreeCAD_0.18.15619.glibc2.17-x86_64.AppImage --appimage-extract
(This creates a subdir called squashfs-root where you issue the command. All content is copied there.)

* Downloaded the recommended, earlier version of libexpat1 from the official Ubuntu repo:
http://security.ubuntu.com/ubuntu/pool/ ... _amd64.deb

* Copied all from libexpat1_2.1.0-7ubuntu0.16.04.3_amd64.deb to the same dirs under squashfs-root/
(I simply used mc to enter and copied the files 1by1 but there are many other ways.)

* wget "https://github.com/AppImage/AppImageKit ... 4.AppImage"
(Downloaded the AppImageTool that is needed for repacking.)

* chmod a+x appimagetool-x86_64.AppImage
(Made it executable.)

* ./appimagetool-x86_64.AppImage squashfs-root
(This thing results in a new AppImage, with the new lib in it!. The new name is "FreeCAD_Daily-x86_64.AppImage". )

* mv FreeCAD_Daily-x86_64.AppImage REPACKED_FreeCAD_0.18.15619.glibc2.17-x86_64.AppImage
(Renamed it to match match my taste.)

* LIBGL_DRI3_DISABLE=true freecad/repack/REPACKED_FreeCAD_0.18.15619.glibc2.17-x86_64.AppImage
(This is how I usually start it. I've put this line in a script for convenience.)


After the repack the import "as geometry" works flawlessly, with different formats. (Flat svg, decomposed etc.)
(I had made tons of experimental imports earlier, with different versions and formats, all crashed. )

What I still cannot catch: The AppImage may be packed the way it will run. (E.g. the way I did it.)
And still there are argumentations that it is not a FreeCAD issue, other packages are blamed, users are pushed to spoil their installed Linuxes by downgrading components with dependencies when AppImage won't even touch them. OK, some use native installation. I also installed it to try. (v0.16. Crashing anyway... Will remove it soon.) But even the Applmage-related threads are talking about fiddling with Linux, not with the content of the image.

Anyway, this thing is simple, it works no problem, so feel free using it :)