asm4 Tuto2 crashes

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
nic
Posts: 136
Joined: Thu Apr 18, 2019 1:14 pm
Location: France

asm4 Tuto2 crashes

Post by nic »

edit: duplicate of https://forum.freecadweb.org/viewtopic.php?f=3&t=42750

Hi there,

Freecad 0.19, asm4 up to date (see complete details below).

I'm currently training on Asm4 assembly, more precisely doing the tutorial#2 https://github.com/Zolko-123/FreeCAD_As ... TORIAL2.md.

Everything was fine up to defining LCS_pivot in the Arm part. FC silently crashes when I create the LCS_pivot. It doesn't crash if I do not set the X-offset.


Here is the full trace when FC is fired from the terminal:

Code: Select all

Enumeration index -1 is out of range, ignore it
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 254, in <lambda>
    QtCore.QObject.connect(self.attachmentOffsetEdits[i], QtCore.SIGNAL('valueChanged(double)'), lambda val, i=i: self.attachmentOffsetChanged(i,val))
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 369, in attachmentOffsetChanged
    pos.x = Q(self.form.attachmentOffsetX.text()).getValueAs(mm)
ValueError: Unit mismatch
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 254, in <lambda>
    QtCore.QObject.connect(self.attachmentOffsetEdits[i], QtCore.SIGNAL('valueChanged(double)'), lambda val, i=i: self.attachmentOffsetChanged(i,val))
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 369, in attachmentOffsetChanged
    pos.x = Q(self.form.attachmentOffsetX.text()).getValueAs(mm)
ValueError: Unit mismatch
<PartDesignGui> Utils.cpp(72): no body found
PartDesign::CoordinateSystem / LCS_pivot: Links go out of the allowed scope
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 254, in <lambda>
    QtCore.QObject.connect(self.attachmentOffsetEdits[i], QtCore.SIGNAL('valueChanged(double)'), lambda val, i=i: self.attachmentOffsetChanged(i,val))
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 369, in attachmentOffsetChanged
    pos.x = Q(self.form.attachmentOffsetX.text()).getValueAs(mm)
ValueError: Unit mismatch
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 254, in <lambda>
    QtCore.QObject.connect(self.attachmentOffsetEdits[i], QtCore.SIGNAL('valueChanged(double)'), lambda val, i=i: self.attachmentOffsetChanged(i,val))
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 369, in attachmentOffsetChanged
    pos.x = Q(self.form.attachmentOffsetX.text()).getValueAs(mm)
ValueError: Unit mismatch
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 254, in <lambda>
    QtCore.QObject.connect(self.attachmentOffsetEdits[i], QtCore.SIGNAL('valueChanged(double)'), lambda val, i=i: self.attachmentOffsetChanged(i,val))
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 369, in attachmentOffsetChanged
    pos.x = Q(self.form.attachmentOffsetX.text()).getValueAs(mm)
ValueError: Unit mismatch
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 254, in <lambda>
    QtCore.QObject.connect(self.attachmentOffsetEdits[i], QtCore.SIGNAL('valueChanged(double)'), lambda val, i=i: self.attachmentOffsetChanged(i,val))
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 369, in attachmentOffsetChanged
    pos.x = Q(self.form.attachmentOffsetX.text()).getValueAs(mm)
ValueError: Unit mismatch
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 254, in <lambda>
    QtCore.QObject.connect(self.attachmentOffsetEdits[i], QtCore.SIGNAL('valueChanged(double)'), lambda val, i=i: self.attachmentOffsetChanged(i,val))
  File "/usr/share/freecad-daily/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py", line 369, in attachmentOffsetChanged
    pos.x = Q(self.form.attachmentOffsetX.text()).getValueAs(mm)
ValueError: Unit mismatch
<PartDesignGui> Utils.cpp(72): no body found
Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x46470) [0x7f155f0cd470]
#1  0x7f14e0716e4c in PartDesignGui::TaskDlgDatumParameters::accept() from /usr/lib/freecad-daily-python3/lib/PartDesignGui.so+0xcc
#2  0x7f156195547d in Gui::TaskView::TaskView::accept() from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x5d
#3  /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so(+0x7636dd) [0x7f15619556dd]
#4  0x7f155f731468 in QMetaObject::activate(QObject*, int, int, void**) from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x7b8
#5  /lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x305f76) [0x7f15602b2f76]
#6  0x7f155f731468 in QMetaObject::activate(QObject*, int, int, void**) from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x7b8
#7  0x7f156020c236 in QAbstractButton::clicked(bool) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x46
#8  /lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x25f45e) [0x7f156020c45e]
#9  /lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x2608a3) [0x7f156020d8a3]
#10  0x7f156020da65 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0xe5
#11  0x7f156015a04e in QWidget::event(QEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x24e
#12  0x7f1560117a86 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x86
#13  0x7f1560121053 in QApplication::notify(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x583
#14  0x7f15616c6cf8 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x88
#15  0x7f155f705a9a in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x18a
#16  0x7f1560120157 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1b7
#17  /lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1c914d) [0x7f156017614d]
#18  /lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1cbfdc) [0x7f1560178fdc]
#19  0x7f1560117a86 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x86
#20  0x7f1560120e00 in QApplication::notify(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x330
#21  0x7f15616c6cf8 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x88
#22  0x7f155f705a9a in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x18a
#23  0x7f155faedd73 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /lib/x86_64-linux-gnu/libQt5Gui.so.5+0x6c3
#24  0x7f155faef5fb in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) from /lib/x86_64-linux-gnu/libQt5Gui.so.5+0x25b
#25  0x7f155fac926b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /lib/x86_64-linux-gnu/libQt5Gui.so.5+0xbb
#26  /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5(+0x7928e) [0x7f155910d28e]
#27  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x27d) [0x7f155d40884d]
#28  /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x51ad0) [0x7f155d408ad0]
#29  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x33) [0x7f155d408b73]
#30  0x7f155f75d6a5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x65
#31  0x7f155f70463b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x12b
#32  0x7f155f70c3a6 in QCoreApplication::exec() from /lib/x86_64-linux-gnu/libQt5Core.so.5+0x96
#33  0x7f156163df75 in Gui::Application::runApplication() from /usr/lib/freecad-daily-python3/lib/libFreeCADGui.so+0x1795
#34  freecad-daily(main+0x6fe) [0x561cf8de8c8e]
#35  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f155f0ae1e3]
#36  freecad-daily(_start+0x2e) [0x561cf8de901e]
zsh: exit 1     freecad-daily

To understand where is my error, I tried to download the final assembly from Zolko's tutorial https://github.com/Zolko-123/FreeCAD_As ... uto2.FCStd, but FC will never open it.

Code: Select all

Traceback (most recent call last):
  File "<string>", line 1, in <module>
<class 'OSError'>: Invalid project file /home/nic/Téléchargements/asm_tuto2.FCStd: basic_ios::clear: iostream error
I'm a bit lost here... help welcome.

-----
Freecad Version:

Code: Select all

OS: Ubuntu 19.10 (GNOME-Flashback:GNOME/regolith)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.7.5
Qt version: 5.12.4
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)

Code: Select all

% dpkg --list freecad-daily\*
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend
|/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
||/ Nom                   Version                              Architecture Descri
+++-=====================-====================================-============-======
ii  freecad-daily         0.19~pre2~202001241540~ubuntu19.10.1 all          Extens
ii  freecad-daily-common  0.19~pre2~202001241540~ubuntu19.10.1 all          Extens
un  freecad-daily-doc     <aucune>                             <aucune>     (aucun
un  freecad-daily-python2 <aucune>                             <aucune>     (aucun
ii  freecad-daily-python3 0.19~pre2~202001241540~ubuntu19.10.1 amd64        Extens
un  freecad-daily-runtime <aucune>
ASM4 version:

Code: Select all

% cat ~/.FreeCAD/Mod/Assembly4/VERSION
Assembly 4 Workbench for FreeCAD-v0.19
0.7.11, 2020-01-22
Attachments
asm_tuto2.FCStd
(51.56 KiB) Downloaded 25 times
Last edited by nic on Sun Jan 26, 2020 12:47 pm, edited 1 time in total.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: asm4 Tuto2 crashes

Post by Zolko »

nic wrote: Sat Jan 25, 2020 9:40 am Freecad Version:

Code: Select all

OS: Ubuntu 19.10 (GNOME-Flashback:GNOME/regolith)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.7.5
Qt version: 5.12.4
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)

Code: Select all

% dpkg --list freecad-daily\*
huh, what's that version of FreeCAD ? I downloaded your model and it opens fine. Can you try with the pre-release AppImage build from FreeCAD instead of the daily build by Ubuntu ? This is what I (and many people I believe) use:

https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre

Code: Select all

OS: Ubuntu 18.04.3 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19323 (Git) AppImage
Build type: Release
Branch: master
Hash: 1b198453b8eb6aa2eaca4e4be4b49fee74e9de6e
Python version: 3.8.1
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United Kingdom (en_GB)
try the Assembly4 workbench for FreCAD — tutorials here and here
nic
Posts: 136
Joined: Thu Apr 18, 2019 1:14 pm
Location: France

Re: asm4 Tuto2 crashes

Post by nic »

Hello Zolko,

thanks for answering. Well, The model I attached to my first post is also opening fine with daily. I provided it just for seek of completeness. From this model, when I create the "LCS_pivot", FC crashes...

The version I usually use is the daily version from ubuntu PPA. I tried the appimage as proposed, but same result : when I create the LCS_pivo based on arm LCS_0002 with R_disk offset, FC crashes.

Trying to open "asm_tuto2.FCStd" from ytou github page doesn't work either:

Code: Select all

% ./FreeCAD_0.19-19323-Linux-Conda_Py3Qt5_glibc2.12-x86_64.AppImage
/tmp/.mount_FreeCAhpRb9j
FreeCAD 0.19, Libs: 0.19R19323 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2020
  #####                 ####  ###   ####
  #                    #      # #   #   #
  #     ##  #### ####  #     #   #  #   #
  ####  # # #  # #  #  #     #####  #   #
  #     #   #### ####  #    #     # #   #
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Loading Assembly 4 WorkBench. © Zoltan Hubert
connect failed: Aucun fichier ou dossier de ce type
Traceback (most recent call last):
  File "<string>", line 1, in <module>
<class 'OSError'>: Invalid project file /home/nic/Téléchargements/asm_tuto2.FCStd: basic_ios::clear: iostream error
nic
Posts: 136
Joined: Thu Apr 18, 2019 1:14 pm
Location: France

Re: asm4 Tuto2 crashes

Post by nic »

OK, so both appimage and daily is able to reproduce the bug. There is a same topic in parallel. So let continue on the following:

https://forum.freecadweb.org/viewtopic ... 3&t=42750
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: asm4 Tuto2 crashes

Post by Zolko »

Created a report #4258 on the tracker:

https://tracker.freecadweb.org/view.php?id=4258
try the Assembly4 workbench for FreCAD — tutorials here and here
nic
Posts: 136
Joined: Thu Apr 18, 2019 1:14 pm
Location: France

Re: asm4 Tuto2 crashes

Post by nic »

Thanks Zolko,
Post Reply