Crash while exporting large STEP file
Open, Needs TriagePublic

Description

When trying to export the TAZ 6 Full Assembly as a STEP file, FreeCAD crashes with this error:

Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x33060) [0x7f867ca1a060]
#1  0x7f865f1c7b90 in Transfer_TransientListBinder::NbTransients() const from /usr/lib/libTKXSBase.so.11+0
#2  /usr/lib/libTKXDESTEP.so.11(+0x30cca) [0x7f85fadbfcca]
#3  /usr/lib/libTKXDESTEP.so.11(+0x3161a) [0x7f85fadc061a]
#4  /usr/lib/libTKXDESTEP.so.11(+0x3194e) [0x7f85fadc094e]
#5  /usr/lib/libTKXDESTEP.so.11(+0x3194e) [0x7f85fadc094e]
#6  /usr/lib/libTKXDESTEP.so.11(+0x3194e) [0x7f85fadc094e]
#7  0x7f85fadc12c7 in STEPCAFControl_Writer::WriteColors(Handle_XSControl_WorkSession const&, TDF_LabelSequence const&) from /usr/lib/libTKXDESTEP.so.11+0x527
#8  0x7f85fadcc8a6 in STEPCAFControl_Writer::Transfer(STEPControl_Writer&, TDF_LabelSequence const&, STEPControl_StepModelType, char const*, bool) from /usr/lib/libTKXDESTEP.so.11+0x896
#9  0x7f85fadcccdb in STEPCAFControl_Writer::Transfer(Handle_TDocStd_Document const&, STEPControl_StepModelType, char const*) from /usr/lib/libTKXDESTEP.so.11+0x6b
#10  0x7f85fb246a58 in ImportGui::Module::exporter(Py::Tuple const&) from /usr/lib/freecad/lib/ImportGui.so+0x1208
#11  0x7f85fb242706 in Py::ExtensionModule<ImportGui::Module>::invoke_method_varargs(void*, Py::Tuple const&) from /usr/lib/freecad/lib/ImportGui.so+0x26
#12  /usr/lib/freecad/lib/libFreeCADBase.so(method_varargs_call_handler+0x159) [0x7f86857531e9]
#13  /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x8541) [0x7f86851bb091]
#14  /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x86c) [0x7f868532229c]
#15  /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x19) [0x7f86851b29c9]
#16  /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyRun_StringFlags+0x76) [0x7f868526a196]
#17  0x7f8685785086 in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /usr/lib/freecad/lib/libFreeCADBase.so+0x56
#18  0x7f868629bead in Gui::Command::runCommand(Gui::Command::DoCmd_Type, char const*) from /usr/lib/freecad/lib/libFreeCADGui.so+0x3d
#19  0x7f8686229a7d in Gui::Application::exportTo(char const*, char const*, char const*) from /usr/lib/freecad/lib/libFreeCADGui.so+0x3ad
#20  0x7f86862a8d1a in StdCmdExport::activated(int) from /usr/lib/freecad/lib/libFreeCADGui.so+0x53a
#21  0x7f86862a0fcc in Gui::Command::invoke(int) from /usr/lib/freecad/lib/libFreeCADGui.so+0x5c
#22  0x7f867e161660 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x4d0
#23  0x7f867ec0d672 in QAction::triggered(bool) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x42
#24  0x7f867ec0e9d3 in QAction::activate(QAction::ActionEvent) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x83
#25  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x61c3cd) [0x7f867f06b3cd]
#26  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x620839) [0x7f867f06f839]
#27  0x7f867ec69e80 in QWidget::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x290
#28  0x7f867f073a8b in QMenu::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x6b
#29  0x7f867ec1354c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x8c
#30  0x7f867ec1bca7 in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x1a47
#31  0x7f86862792f1 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad/lib/libFreeCADGui.so+0x41
#32  0x7f867e14cf1d in QCoreApplication::notifyInternal(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x8d
#33  0x7f867ec19ccb in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x14b
#34  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x24642d) [0x7f867ec9542d]
#35  0x7f867ec93b5c in QApplication::x11ProcessEvent(_XEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0xc9c
#36  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x26e502) [0x7f867ecbd502]
#37  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2a7) [0x7f867605e7f7]
#38  /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4aa60) [0x7f867605ea60]
#39  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f867605eb0c]
#40  0x7f867e17d854 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x64
#41  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x26e5d6) [0x7f867ecbd5d6]
#42  0x7f867e14b7ef in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x3f
#43  0x7f867e14bb55 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x1b5
#44  0x7f867e151bd9 in QCoreApplication::exec() from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x99
#45  0x7f868622ed81 in Gui::Application::runApplication() from /usr/lib/freecad/lib/libFreeCADGui.so+0x15e1
#46  freecad(main+0x862) [0x55d69f129772]
#47  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f867ca072e1]
#48  freecad(_start+0x2a) [0x55d69f12a9ca]