Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#57843 - [coin] SVG import crashes application

Attached to Project: Community Packages
Opened by Manuel Vögele (Stäbchenfisch) - Wednesday, 14 March 2018, 23:52 GMT
Last edited by Eli Schwartz (eschwartz) - Sunday, 22 April 2018, 14:27 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Florian Pritz (bluewind)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Description: Importing any SVG image into FreeCAD crashes the application. According to this upstream bugreport ( ) this is a dependency issue. Downgrading expat to Version 2.1 as suggested in the bugreport does fix the issue.

Additional info:
* FreeCAD version: 0.16.6712-4
* coin version: 3.1.3-15
* python2 version: 2.7.14-2

* Stack trace of the crash:
#0 /usr/lib/ [0x7f1c04a548e0]
#1 /usr/lib/ [0x7f1bf5f861db]
#2 /usr/lib/python2.7/lib-dynload/ [0x7f1bb3dfb0fc]
#3 /usr/lib/ [0x7f1c0663c21a]
#4 /usr/lib/ [0x7f1c06636550]
#5 /usr/lib/ [0x7f1c06636550]
#6 /usr/lib/ [0x7f1c06636550]
#7 /usr/lib/ [0x7f1c06690456]
#8 /usr/lib/ [0x7f1c066a9a9a]
#9 /usr/lib/ [0x7f1c066ad321]
#10 /usr/lib/ [0x7f1c066af0b8]
#11 0x7f1c06a4b09a in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /opt/freecad/lib/
#12 0x7f1c0755c869 in Gui::Command::doCommand(Gui::Command::DoCmd_Type, char const*, ...) from /opt/freecad/lib/
#13 0x7f1c074ddc9f in Gui::Application::open(char const*, char const*) from /opt/freecad/lib/
#14 0x7f1c075554b8 in Gui::RecentFilesAction::activateFile(int) from /opt/freecad/lib/
#15 0x7f1c07561efb in Gui::Command::invoke(int) from /opt/freecad/lib/
#16 0x7f1c07551e5e in Gui::ActionGroup::onActivated(QAction*) from /opt/freecad/lib/
#17 /opt/freecad/lib/ [0x7f1c0755204d]
#18 0x7f1c05519cad in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) from /usr/lib/
#19 0x7f1c05a48c90 in QActionGroup::triggered(QAction*) from /usr/lib/
#20 /usr/lib/ [0x7f1c05a48d42]
#21 0x7f1c05519cad in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) from /usr/lib/
#22 0x7f1c05a462f3 in QAction::triggered(bool) from /usr/lib/
#23 0x7f1c05a4777b in QAction::activate(QAction::ActionEvent) from /usr/lib/
#24 /usr/lib/ [0x7f1c05e96be5]
#25 /usr/lib/ [0x7f1c05e9b5d5]
#26 0x7f1c05aa0478 in QWidget::event(QEvent*) from /usr/lib/
#27 0x7f1c05e9f35c in QMenu::event(QEvent*) from /usr/lib/
#28 0x7f1c05a4c1f4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/
#29 0x7f1c05a53a02 in QApplication::notify(QObject*, QEvent*) from /usr/lib/
#30 0x7f1c07536309 in Gui::GUIApplication::notify(QObject*, QEvent*) from /opt/freecad/lib/
#31 0x7f1c05505eae in QCoreApplication::notifyInternal(QObject*, QEvent*) from /usr/lib/
#32 0x7f1c05a5262d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) from /usr/lib/
#33 /usr/lib/ [0x7f1c05acb73e]
#34 0x7f1c05aca709 in QApplication::x11ProcessEvent(_XEvent*) from /usr/lib/
#35 /usr/lib/ [0x7f1c05af2df5]
#36 /usr/lib/ [0x7f1bfd43ae38]
#37 /usr/lib/ [0x7f1bfd43b081]
#38 /usr/lib/ [0x7f1bfd43b10e]
#39 0x7f1c055344c8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/
#40 /usr/lib/ [0x7f1c05af2f88]
#41 0x7f1c05504234 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/
#42 0x7f1c0550459f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/
#43 0x7f1c05509df0 in QCoreApplication::exec() from /usr/lib/
#44 0x7f1c074e7392 in Gui::Application::runApplication() from /opt/freecad/lib/
#45 freecad(main+0x713) [0x562b87147093]
#46 /usr/lib/ [0x7f1c04a40f4a]
#47 freecad(_start+0x2a) [0x562b871482ea]

Steps to reproduce:
1. Open FreeCAD
2. Create new file
3. Import any SVG file as Geometry or Drawing
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Sunday, 22 April 2018, 14:27 GMT
Reason for closing:  Won't fix
Additional comments about closing:  package was moved to the AUR:
Comment by Manuel Vögele (Stäbchenfisch) - Thursday, 15 March 2018, 08:13 GMT
I did some more diging and found this thread dealing with the issue:
It links to the follwoing debian issue:

It appears that the problem is caused by an outdated version of expat being included in the coin3d source. So this is probably a problem of the coin package instead of the freecad package (altough currently freecad is the only package in the repositories depending on it). A possible solution could be linking coin against the system expat library.
Comment by Eli Schwartz (eschwartz) - Thursday, 15 March 2018, 18:01 GMT
Our coin package is built with --enable-system-expat so that doesn't sound right...
Comment by Manuel Vögele (Stäbchenfisch) - Thursday, 15 March 2018, 19:11 GMT
I just did a ldd on and couldn't find any references to .
Comment by Eli Schwartz (eschwartz) - Thursday, 15 March 2018, 19:31 GMT
from extra-x86_64-build

Coin configuration settings:
3.1.3 Library version:
No (default) Generate Java wrapper:
Yes (warning: experimental) 3ds import capabilities:
Yes Use system expat:
Yes javascript capabilities:


Making all in expat
make[5]: Entering directory '/build/coin/src/Coin-3.1.3/src/xml/expat'
/bin/sh ../../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I../../../include -I../../../include -I../../../src -I../../../src -D_FORTIFY_SOURCE=2 -D_REENTRANT -DNDEBUG -DCOIN_DEBUG=0 -DCOIN_INTERNAL -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -W -Wall -Wno-unused -Wno-multichar -c -o all-expat-c.lo all-expat-c.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I../../../include -I../../../include -I../../../src -I../../../src -D_FORTIFY_SOURCE=2 -D_REENTRANT -DNDEBUG -DCOIN_DEBUG=0 -DCOIN_INTERNAL -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -W -Wall -Wno-unused -Wno-multichar -c all-expat-c.c -fPIC -DPIC -o .libs/all-expat-c.o
In file included from all-expat-c.c:4:0:
xmltok.c:484:1: warning: missing initializer for field ‘isName2’ of ‘const struct normal_encoding’ [-Wmissing-field-initializers]

Something seems quite wrong about our coin package...
Comment by Eli Schwartz (eschwartz) - Thursday, 15 March 2018, 19:34 GMT
It also eventually fails to build, with:

make[4]: Entering directory '/build/coin/src/Coin-3.1.3/src/3ds'
/bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I../../include -I../../include -I../../src -I../../src -D_FORTIFY_SOURCE=2 -D_REENTRANT -DNDEBUG -DCOIN_DEBUG=0 -DCOIN_INTERNAL -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -W -Wall -Wno-unused -Wno-multichar -Woverloaded-virtual -c -o 3dsLoader.lo 3dsLoader.cpp
mkdir .libs
g++ -DHAVE_CONFIG_H -I../../include -I../../include -I../../src -I../../src -D_FORTIFY_SOURCE=2 -D_REENTRANT -DNDEBUG -DCOIN_DEBUG=0 -DCOIN_INTERNAL -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -W -Wall -Wno-unused -Wno-multichar -Woverloaded-virtual -c 3dsLoader.cpp -fPIC -DPIC -o .libs/3dsLoader.o
/bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I../../include -I../../include -I../../src -I../../src -D_FORTIFY_SOURCE=2 -D_REENTRANT -DNDEBUG -DCOIN_DEBUG=0 -DCOIN_INTERNAL -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -W -Wall -Wno-unused -Wno-multichar -Woverloaded-virtual -c -o SoStream.lo SoStream.cpp
g++ -DHAVE_CONFIG_H -I../../include -I../../include -I../../src -I../../src -D_FORTIFY_SOURCE=2 -D_REENTRANT -DNDEBUG -DCOIN_DEBUG=0 -DCOIN_INTERNAL -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -W -Wall -Wno-unused -Wno-multichar -Woverloaded-virtual -c SoStream.cpp -fPIC -DPIC -o .libs/SoStream.o
SoStream.cpp: In member function ‘virtual SbBool SoStream::readInt8(int8_t&)’:
SoStream.cpp:179:7: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
s = '\0'; \
SoStream.cpp:125:5: note: in definition of macro ‘SOSTREAM_RW_OP’
_readCode_; \
SoStream.cpp:420:42: note: in expansion of macro ‘SOSTREAM_INT_READ’
SOSTREAM_RW_OP( Int8, int8_t, "%d", SOSTREAM_INT_READ(strtol, int32_t, int8_t, DEFAULT_CHECK2(-128, 127)));
SoStream.cpp: In member function ‘virtual SbBool SoStream::readUInt8(uint8_t&)’:
SoStream.cpp:179:7: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
s = '\0'; \