New unit tests for Draft Workbench

A forum dedicated to the Draft, Arch and BIM workbenches development.
User avatar
Kunda1
Posts: 8772
Joined: Thu Jan 05, 2017 9:03 pm

Re: New unit tests for Draft Workbench

Postby Kunda1 » Mon Oct 28, 2019 7:19 pm

I can recreate both crashes for
TestDraft.DraftCreation.test_dimension_linear
TestDraft.DraftCreation.test_label

Code: Select all

$ ./AppRun -t TestDraft.DraftCreation.test_dimension_linear
/home/foo/bin/squashfs-root
FreeCAD 0.19, Libs: 0.19R18614 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

connect failed: No such file or directory
test_dimension_linear (TestDraft.DraftCreation)
Create a linear dimension. ... 
------------------------------------------------------------------------------
  Temporary document 'DraftCreation'
  Test 'Draft Dimension'
  Occasionaly crashes
  a=Vector (0.0, 0.0, 0.0), b=Vector (9.0, 0.0, 0.0)
  c=Vector (4.0, -1.0, 0.0)
Program received signal SIGSEGV, Segmentation fault.
#0  /usr/lib/libc.so.6(+0x3bfb0) [0x7f421d23bfb0]
#1  /home/foo/bin/squashfs-root/usr/bin/../lib/libCoin.so.80(cc_rbptree_insert+0xa) [0x7f421e6647da]
#2  0x7f421e823633 in SoChildList::append(SoNode*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libCoin.so.80+0x23
#3  0x7f421e87c015 in SoGroup::addChild(SoNode*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libCoin.so.80+0x45
#4  /home/foo/bin/squashfs-root/usr/lib/python3.7/site-packages/pivy/_coin.cpython-37m-x86_64-linux-gnu.so(+0x490174) [0x7f4210898174]
#5  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyMethodDef_RawFastCallKeywords+0x104) [0x7f421f3dd034]
#6  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyCFunction_FastCallKeywords+0x26) [0x7f421f3ddba6]
#7  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f3df) [0x7f421f32f3df]
#8  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x710a) [0x7f421f32d10a]
#9  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6de30) [0x7f421f32de30]
#10  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f0f6) [0x7f421f32f0f6]
#11  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x710a) [0x7f421f32d10a]
#12  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6de30) [0x7f421f32de30]
#13  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x2bf) [0x7f421f3dda2f]
#14  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xde) [0x7f421f3df8ae]
#15  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyObject_Call+0x68) [0x7f421f3dde38]
#16  0x7f421fd6d8ab in Gui::ViewProviderPythonFeatureImp::attach(App::DocumentObject*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so+0x11b
#17  0x7f421fd769ab in Gui::ViewProviderPythonFeatureT<Gui::ViewProviderDocumentObject>::onChanged(App::Property const*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so+0x14b
#18  0x7f421f0feb09 in App::Property::hasSetValue() from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADApp.so+0x19
#19  0x7f421f152f01 in App::PropertyPythonObject::setPyObject(_object*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADApp.so+0x51
#20  0x7f421f113ab8 in App::PropertyContainerPy::setCustomAttributes(char const*, _object*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADApp.so+0x78
#21  0x7f421f116853 in App::PropertyContainerPy::_setattr(char const*, _object*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADApp.so+0x13
#22  0x7f421ed95983 in Base::PyObjectBase::__setattro(_object*, _object*, _object*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADBase.so+0x113
#23  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyObject_SetAttr+0x50) [0x7f421f4b8f80]
#24  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x40ef) [0x7f421f32a0ef]
#25  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6de30) [0x7f421f32de30]
#26  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f0f6) [0x7f421f32f0f6]
#27  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x710a) [0x7f421f32d10a]
#28  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6de30) [0x7f421f32de30]
#29  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x2bf) [0x7f421f3dda2f]
#30  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xde) [0x7f421f3df8ae]
#31  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x1dae16) [0x7f421f49ae16]
#32  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x83f54) [0x7f421f343f54]
#33  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_FastCallKeywords+0xc5) [0x7f421f3de005]
#34  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f071) [0x7f421f32f071]
#35  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x4808) [0x7f421f32a808]
#36  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0xac4) [0x7f421f4e8284]
#37  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallKeywords+0x90) [0x7f421f3dd680]
#38  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f0f6) [0x7f421f32f0f6]
#39  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x710a) [0x7f421f32d10a]
#40  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6de30) [0x7f421f32de30]
#41  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f0f6) [0x7f421f32f0f6]
#42  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x4808) [0x7f421f32a808]
#43  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0xac4) [0x7f421f4e8284]
#44  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x1d8) [0x7f421f3dd948]
#45  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xde) [0x7f421f3df8ae]
#46  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyObject_Call+0x68) [0x7f421f3dde38]
#47  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x49ae) [0x7f421f32a9ae]
#48  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0xac4) [0x7f421f4e8284]
#49  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x1d8) [0x7f421f3dd948]
#50  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xde) [0x7f421f3df8ae]
#51  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x1daf46) [0x7f421f49af46]
#52  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_FastCallKeywords+0xc5) [0x7f421f3de005]
#53  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f071) [0x7f421f32f071]
#54  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x4808) [0x7f421f32a808]
#55  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0xac4) [0x7f421f4e8284]
#56  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x1d8) [0x7f421f3dd948]
#57  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xde) [0x7f421f3df8ae]
#58  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyObject_Call+0x68) [0x7f421f3dde38]
#59  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x49ae) [0x7f421f32a9ae]
#60  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0xac4) [0x7f421f4e8284]
#61  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x1d8) [0x7f421f3dd948]
#62  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xde) [0x7f421f3df8ae]
#63  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x1daf46) [0x7f421f49af46]
#64  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_FastCallKeywords+0xc5) [0x7f421f3de005]
#65  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f071) [0x7f421f32f071]
#66  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x4808) [0x7f421f32a808]
#67  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6de30) [0x7f421f32de30]
#68  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f0f6) [0x7f421f32f0f6]
#69  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x2cb9) [0x7f421f328cb9]
#70  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6de30) [0x7f421f32de30]
#71  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f0f6) [0x7f421f32f0f6]
#72  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x710a) [0x7f421f32d10a]
#73  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0xac4) [0x7f421f4e8284]
#74  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyEval_EvalCodeEx+0x3f) [0x7f421f4e836f]
#75  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyEval_EvalCode+0x1c) [0x7f421f3b7abc]
#76  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyRun_StringFlags+0x94) [0x7f421f4081b4]
#77  0x7f421ed524ea in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADBase.so+0x6a
#78  0x7f421fdc5110 in Gui::MainWindow::delayedStartup() from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so+0xa0
#79  /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so(+0x7a32b6) [0x7f421fdca2b6]
#80  0x7f421d794249 in QObject::event(QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5+0xbd
#81  0x7f421dfd4831 in QWidget::event(QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Widgets.so.5+0xcc1
#82  0x7f421e07ec61 in QMainWindow::event(QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Widgets.so.5+0xdd
#83  0x7f421fdca65c in Gui::MainWindow::event(QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so+0x7c
#84  0x7f421dfa882a in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Widgets.so.5+0xde
#85  0x7f421dfae3f1 in QApplication::notify(QObject*, QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Widgets.so.5+0x1af9
#86  0x7f421fa0d459 in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so+0x89
#87  0x7f421d77f186 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5+0x88
#88  0x7f421d77f3cd in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5+0x1e9
#89  /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5(+0x1df876) [0x7f421d7ae876]
#90  /home/foo/bin/squashfs-root/usr/bin/../lib/./libglib-2.0.so.0(g_main_context_dispatch+0x2e8) [0x7f421a7e59d8]
#91  /home/foo/bin/squashfs-root/usr/bin/../lib/./libglib-2.0.so.0(+0x51c21) [0x7f421a7e5c21]
#92  /home/foo/bin/squashfs-root/usr/bin/../lib/./libglib-2.0.so.0(g_main_context_iteration+0x2e) [0x7f421a7e5cae]
#93  0x7f421d7ae42b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5+0x63
#94  0x7f421d77bbc1 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5+0x187
#95  0x7f421d77fa39 in QCoreApplication::exec() from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5+0x105
#96  0x7f421f98e4d7 in Gui::Application::runApplication() from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so+0x1537
#97  /home/foo/bin/squashfs-root/usr/bin/FreeCAD(main+0x74d) [0x5628d0e6d7cd]
#98  /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f421d227153]
#99  /home/foo/bin/squashfs-root/usr/bin/FreeCAD(+0x451f) [0x5628d0e6e51f]
[foo@foo squashfs-root]$ 

Code: Select all

[foo@foo squashfs-root]$ ./AppRun -t TestDraft.DraftCreation.test_label
/home/foo/bin/squashfs-root
FreeCAD 0.19, Libs: 0.19R18614 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

connect failed: No such file or directory
test_label (TestDraft.DraftCreation)
Create a label. ... 
------------------------------------------------------------------------------
  Temporary document 'DraftCreation'
  Test 'Draft Label'
  Occasionaly crashes
  target_point=Vector (0.0, 0.0, 0.0), distance=-25
  placement=Placement [Pos=(50,50,0), Yaw-Pitch-Roll=(0,0,0)]
Program received signal SIGSEGV, Segmentation fault.
#0  /usr/lib/libc.so.6(+0x3bfb0) [0x7f1859695fb0]
#1  /home/foo/bin/squashfs-root/usr/bin/../lib/libCoin.so.80(cc_rbptree_insert+0xa) [0x7f185aabe7da]
#2  0x7f185ac7d633 in SoChildList::append(SoNode*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libCoin.so.80+0x23
#3  0x7f185acd6015 in SoGroup::addChild(SoNode*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libCoin.so.80+0x45
#4  /home/foo/bin/squashfs-root/usr/lib/python3.7/site-packages/pivy/_coin.cpython-37m-x86_64-linux-gnu.so(+0x490174) [0x7f184cc75174]
#5  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyMethodDef_RawFastCallKeywords+0x104) [0x7f185b837034]
#6  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyCFunction_FastCallKeywords+0x26) [0x7f185b837ba6]
#7  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f3df) [0x7f185b7893df]
#8  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x710a) [0x7f185b78710a]
#9  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6de30) [0x7f185b787e30]
#10  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f0f6) [0x7f185b7890f6]
#11  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x710a) [0x7f185b78710a]
#12  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6de30) [0x7f185b787e30]
#13  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x2bf) [0x7f185b837a2f]
#14  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xde) [0x7f185b8398ae]
#15  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyObject_Call+0x68) [0x7f185b837e38]
#16  0x7f185c1c78ab in Gui::ViewProviderPythonFeatureImp::attach(App::DocumentObject*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so+0x11b
#17  0x7f185c1d09ab in Gui::ViewProviderPythonFeatureT<Gui::ViewProviderDocumentObject>::onChanged(App::Property const*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so+0x14b
#18  0x7f185b558b09 in App::Property::hasSetValue() from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADApp.so+0x19
#19  0x7f185b5acf01 in App::PropertyPythonObject::setPyObject(_object*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADApp.so+0x51
#20  0x7f185b56dab8 in App::PropertyContainerPy::setCustomAttributes(char const*, _object*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADApp.so+0x78
#21  0x7f185b570853 in App::PropertyContainerPy::_setattr(char const*, _object*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADApp.so+0x13
#22  0x7f185b1ef983 in Base::PyObjectBase::__setattro(_object*, _object*, _object*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADBase.so+0x113
#23  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyObject_SetAttr+0x50) [0x7f185b912f80]
#24  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x40ef) [0x7f185b7840ef]
#25  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6de30) [0x7f185b787e30]
#26  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x2bf) [0x7f185b837a2f]
#27  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xde) [0x7f185b8398ae]
#28  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x1dae16) [0x7f185b8f4e16]
#29  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x83f54) [0x7f185b79df54]
#30  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_FastCallKeywords+0xc5) [0x7f185b838005]
#31  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f071) [0x7f185b789071]
#32  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x4808) [0x7f185b784808]
#33  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0xac4) [0x7f185b942284]
#34  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallKeywords+0x90) [0x7f185b837680]
#35  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f0f6) [0x7f185b7890f6]
#36  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x4aa0) [0x7f185b784aa0]
#37  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6de30) [0x7f185b787e30]
#38  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f0f6) [0x7f185b7890f6]
#39  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x4808) [0x7f185b784808]
#40  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0xac4) [0x7f185b942284]
#41  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x1d8) [0x7f185b837948]
#42  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xde) [0x7f185b8398ae]
#43  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyObject_Call+0x68) [0x7f185b837e38]
#44  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x49ae) [0x7f185b7849ae]
#45  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0xac4) [0x7f185b942284]
#46  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x1d8) [0x7f185b837948]
#47  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xde) [0x7f185b8398ae]
#48  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x1daf46) [0x7f185b8f4f46]
#49  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_FastCallKeywords+0xc5) [0x7f185b838005]
#50  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f071) [0x7f185b789071]
#51  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x4808) [0x7f185b784808]
#52  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0xac4) [0x7f185b942284]
#53  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x1d8) [0x7f185b837948]
#54  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xde) [0x7f185b8398ae]
#55  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyObject_Call+0x68) [0x7f185b837e38]
#56  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x49ae) [0x7f185b7849ae]
#57  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0xac4) [0x7f185b942284]
#58  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x1d8) [0x7f185b837948]
#59  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xde) [0x7f185b8398ae]
#60  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x1daf46) [0x7f185b8f4f46]
#61  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyObject_FastCallKeywords+0xc5) [0x7f185b838005]
#62  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f071) [0x7f185b789071]
#63  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x4808) [0x7f185b784808]
#64  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6de30) [0x7f185b787e30]
#65  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f0f6) [0x7f185b7890f6]
#66  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x2cb9) [0x7f185b782cb9]
#67  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6de30) [0x7f185b787e30]
#68  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f0f6) [0x7f185b7890f6]
#69  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x710a) [0x7f185b78710a]
#70  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0xac4) [0x7f185b942284]
#71  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyEval_EvalCodeEx+0x3f) [0x7f185b94236f]
#72  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyEval_EvalCode+0x1c) [0x7f185b811abc]
#73  /home/foo/bin/squashfs-root/usr/bin/../lib/libpython3.7m.so.1.0(PyRun_StringFlags+0x94) [0x7f185b8621b4]
#74  0x7f185b1ac4ea in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADBase.so+0x6a
#75  0x7f185c21f110 in Gui::MainWindow::delayedStartup() from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so+0xa0
#76  /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so(+0x7a32b6) [0x7f185c2242b6]
#77  0x7f1859bee249 in QObject::event(QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5+0xbd
#78  0x7f185a42e831 in QWidget::event(QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Widgets.so.5+0xcc1
#79  0x7f185a4d8c61 in QMainWindow::event(QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Widgets.so.5+0xdd
#80  0x7f185c22465c in Gui::MainWindow::event(QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so+0x7c
#81  0x7f185a40282a in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Widgets.so.5+0xde
#82  0x7f185a4083f1 in QApplication::notify(QObject*, QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Widgets.so.5+0x1af9
#83  0x7f185be67459 in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so+0x89
#84  0x7f1859bd9186 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5+0x88
#85  0x7f1859bd93cd in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5+0x1e9
#86  /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5(+0x1df876) [0x7f1859c08876]
#87  /home/foo/bin/squashfs-root/usr/bin/../lib/./libglib-2.0.so.0(g_main_context_dispatch+0x2e8) [0x7f1856c3f9d8]
#88  /home/foo/bin/squashfs-root/usr/bin/../lib/./libglib-2.0.so.0(+0x51c21) [0x7f1856c3fc21]
#89  /home/foo/bin/squashfs-root/usr/bin/../lib/./libglib-2.0.so.0(g_main_context_iteration+0x2e) [0x7f1856c3fcae]
#90  0x7f1859c0842b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5+0x63
#91  0x7f1859bd5bc1 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5+0x187
#92  0x7f1859bd9a39 in QCoreApplication::exec() from /home/foo/bin/squashfs-root/usr/bin/../lib/libQt5Core.so.5+0x105
#93  0x7f185bde84d7 in Gui::Application::runApplication() from /home/foo/bin/squashfs-root/usr/bin/../lib/libFreeCADGui.so+0x1537
#94  /home/foo/bin/squashfs-root/usr/bin/FreeCAD(main+0x74d) [0x55718ace77cd]
#95  /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f1859681153]
#96  /home/foo/bin/squashfs-root/usr/bin/FreeCAD(+0x451f) [0x55718ace851f]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: New unit tests for Draft Workbench

Postby vocx » Mon Oct 28, 2019 7:32 pm

Kunda1 wrote:
Mon Oct 28, 2019 7:19 pm
I can recreate both crashes for
...

Code: Select all

#0  /usr/lib/libc.so.6(+0x3bfb0) [0x7f421d23bfb0]
#1  /home/foo/bin/squashfs-root/usr/bin/../lib/libCoin.so.80(cc_rbptree_insert+0xa) [0x7f421e6647da]
#2  0x7f421e823633 in SoChildList::append(SoNode*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libCoin.so.80+0x23
#3  0x7f421e87c015 in SoGroup::addChild(SoNode*) from /home/foo/bin/squashfs-root/usr/bin/../lib/libCoin.so.80+0x45
Okay. So, yes, this is the problem. The crash occurs only when you run the tests individually, but not when you run the entire set of tests.

The problem seems to occur when Coin3D adds objects to its scene. Maybe something is not initialized correctly in some internal FreeCAD code. I don't know how this works, and it's not easy to trigger the crash in practice, so I don't think it's a critical error.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: New unit tests for Draft Workbench

Postby vocx » Wed Nov 20, 2019 8:37 am

vocx wrote:
Sun Oct 27, 2019 6:58 pm
...
The new proposed TestDraft.py is pretty long. But similarly to FEM, later we can split the tests into various modules, which is better for managing them, and adding new tests.
...
See pull request #2727.

Now the unit tests will be in a subdirectory. The classes will be imported by the main TestDraft.py file. This was inspired by Path and FEM which also place their unit tests in individual modules.

Code: Select all

drafttests/auxiliary.py
drafttests/test_import.py
drafttests/test_import_gui.py
drafttests/test_import_tools.py
drafttests/test_pivy.py
drafttests/test_creation.py
drafttests/test_modification.py
drafttests/test_svg.py
drafttests/test_dxf.py
drafttests/test_dwg.py
drafttests/test_oca.py
drafttests/test_airfoildat.py
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: New unit tests for Draft Workbench

Postby vocx » Thu Feb 13, 2020 7:43 pm

New unit tests in pull request #3005.

Also a script is provided to create all objects in #3012. This is able to create a sample file which can be used to quickly showcase all tools. We can use such file to test for regressions. For example, we can save one file with version 0.19, which will be our reference version. Then in the future, we can open that same file with a development version 0.20 and test that all objects open correctly. If we see errors, that means some regression was introduced, and we can try to correct it. This will be helpful when we try to migrate old objects, as described in #2985.

New users that want to learn scripting can also take a look at this script to see how the commands are used.
Draft_test_objects.png
Draft_test_objects.png (18.13 KiB) Viewed 152 times
Last edited by vocx on Sun Feb 16, 2020 3:42 am, edited 2 times in total.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
carlopav
Posts: 1570
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: New unit tests for Draft Workbench

Postby carlopav » Thu Feb 13, 2020 8:47 pm

That's super useful! Hope it will be merged soon!
follow my experiments on BIM modelling for architecture design