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
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
|
Details
Description: Importing any SVG image into FreeCAD crashes
the application. According to this upstream bugreport (
https://www.freecadweb.org/tracker/view.php?id=3307
) 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/libc.so.6(+0x348e0) [0x7f1c04a548e0] #1 /usr/lib/libexpat.so.1(XML_SetHashSalt+0x1b) [0x7f1bf5f861db] #2 /usr/lib/python2.7/lib-dynload/pyexpat.so(+0x30fc) [0x7f1bb3dfb0fc] #3 /usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x690a) [0x7f1c0663c21a] #4 /usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0xc40) [0x7f1c06636550] #5 /usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0xc40) [0x7f1c06636550] #6 /usr/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0xc40) [0x7f1c06636550] #7 /usr/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x2d6) [0x7f1c06690456] #8 /usr/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x1a) [0x7f1c066a9a9a] #9 /usr/lib/libpython2.7.so.1.0(+0x165321) [0x7f1c066ad321] #10 /usr/lib/libpython2.7.so.1.0(PyRun_StringFlags+0x68) [0x7f1c066af0b8] #11 0x7f1c06a4b09a in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /opt/freecad/lib/libFreeCADBase.so+0x6a #12 0x7f1c0755c869 in Gui::Command::doCommand(Gui::Command::DoCmd_Type, char const*, ...) from /opt/freecad/lib/libFreeCADGui.so+0x129 #13 0x7f1c074ddc9f in Gui::Application::open(char const*, char const*) from /opt/freecad/lib/libFreeCADGui.so+0x14f #14 0x7f1c075554b8 in Gui::RecentFilesAction::activateFile(int) from /opt/freecad/lib/libFreeCADGui.so+0x398 #15 0x7f1c07561efb in Gui::Command::invoke(int) from /opt/freecad/lib/libFreeCADGui.so+0x7b #16 0x7f1c07551e5e in Gui::ActionGroup::onActivated(QAction*) from /opt/freecad/lib/libFreeCADGui.so+0x23e #17 /opt/freecad/lib/libFreeCADGui.so(+0x34204d) [0x7f1c0755204d] #18 0x7f1c05519cad in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) from /usr/lib/libQtCore.so.4+0x79d #19 0x7f1c05a48c90 in QActionGroup::triggered(QAction*) from /usr/lib/libQtGui.so.4+0x40 #20 /usr/lib/libQtGui.so.4(+0x1e0d42) [0x7f1c05a48d42] #21 0x7f1c05519cad in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) from /usr/lib/libQtCore.so.4+0x79d #22 0x7f1c05a462f3 in QAction::triggered(bool) from /usr/lib/libQtGui.so.4+0x43 #23 0x7f1c05a4777b in QAction::activate(QAction::ActionEvent) from /usr/lib/libQtGui.so.4+0xbb #24 /usr/lib/libQtGui.so.4(+0x62ebe5) [0x7f1c05e96be5] #25 /usr/lib/libQtGui.so.4(+0x6335d5) [0x7f1c05e9b5d5] #26 0x7f1c05aa0478 in QWidget::event(QEvent*) from /usr/lib/libQtGui.so.4+0x3c8 #27 0x7f1c05e9f35c in QMenu::event(QEvent*) from /usr/lib/libQtGui.so.4+0x6c #28 0x7f1c05a4c1f4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/libQtGui.so.4+0x94 #29 0x7f1c05a53a02 in QApplication::notify(QObject*, QEvent*) from /usr/lib/libQtGui.so.4+0xde2 #30 0x7f1c07536309 in Gui::GUIApplication::notify(QObject*, QEvent*) from /opt/freecad/lib/libFreeCADGui.so+0x89 #31 0x7f1c05505eae in QCoreApplication::notifyInternal(QObject*, QEvent*) from /usr/lib/libQtCore.so.4+0x8e #32 0x7f1c05a5262d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) from /usr/lib/libQtGui.so.4+0x13d #33 /usr/lib/libQtGui.so.4(+0x26373e) [0x7f1c05acb73e] #34 0x7f1c05aca709 in QApplication::x11ProcessEvent(_XEvent*) from /usr/lib/libQtGui.so.4+0x1119 #35 /usr/lib/libQtGui.so.4(+0x28adf5) [0x7f1c05af2df5] #36 /usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x2e8) [0x7f1bfd43ae38] #37 /usr/lib/libglib-2.0.so.0(+0x4b081) [0x7f1bfd43b081] #38 /usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x2e) [0x7f1bfd43b10e] #39 0x7f1c055344c8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/libQtCore.so.4+0x78 #40 /usr/lib/libQtGui.so.4(+0x28af88) [0x7f1c05af2f88] #41 0x7f1c05504234 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/libQtCore.so.4+0x44 #42 0x7f1c0550459f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/libQtCore.so.4+0x1bf #43 0x7f1c05509df0 in QCoreApplication::exec() from /usr/lib/libQtCore.so.4+0xa0 #44 0x7f1c074e7392 in Gui::Application::runApplication() from /opt/freecad/lib/libFreeCADGui.so+0x1532 #45 freecad(main+0x713) [0x562b87147093] #46 /usr/lib/libc.so.6(__libc_start_main+0xea) [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: https://aur.archlinux.org/packages/coin
Sunday, 22 April 2018, 14:27 GMT
Reason for closing: Won't fix
Additional comments about closing: package was moved to the AUR: https://aur.archlinux.org/packages/coin
It links to the follwoing debian issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874727
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.
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...
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'; \