View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004258 | PartDesign | Bug | public | 2020-01-27 14:16 | 2020-03-09 16:54 |
Reporter | Zolko | Assigned To | |||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | FreeCAD | OS | Linux and Windows | OS Version | 18.04 and Win10 |
Summary | 0004258: FreeCAD crashes on "Edit datum" in PartDesign when datum in Part | ||||
Description | With datum objects, when used in an App::Part and not in a PartDesign::Body, when using the command "Edit datum" from the contextual menu in PartDesign WB, selecting anything as reference and clicking "OK" crashes FreeCAD. Happens with the latest FreeCAD AppImage, with an old FreCAD v0.17 and the latest FreeCAD 0.19 for Windows. In Windows:
In Linux:
OS: Windows 10 (10.0) Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.19327 (Git) Build type: Release Branch: master Hash: 65c4e1bd11e0820cd1f1d6577d23bf9cdbb54247 Python version: 3.7.3 Qt version: 5.12.5 Coin version: 4.0.0a OCC version: 7.3.0 Locale: French/France (fr_FR) 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) OS: Ubuntu 18.04.3 LTS Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.17.13541 (Git) AppImage Build type: None Branch: releases/FreeCAD-0-17 Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb Python version: 2.7.6 Qt version: 4.8.6 Coin version: 4.0.0a OCC version: 7.3.0 Locale: English/UnitedKingdom (en_GB) | ||||
Steps To Reproduce | - create a new document - in Part WB create a Part - in PartDesign WN create a Body inside the Part - create 2 datum objects of any type in the Body (for example "DatumPlane" and "DatumLine") - attach or not, doesn't matter - move (drag) in the tree from the Body to the Part - while still in PartDesign WB, right-click on second datum object ("DatumLine") and choose "Edit datum" in the contextual menu - as first reference choose the first datum object ("DatumPlane") - choose any attachment mode, even "Deactivated" - click "OK" => FreeCAD crashes If, instead of the first datum, one uses a sketch, and attaches the datum to something in the sketch, FreeCAD crashes. When doing the same, but instead of right-click "Edit datum" in the PartDesign WB, one switches to the Part WB, and selects Menu > Attachment..., the exact same dialog appears, and when selecting the exact same objects FreeCAD handles without problems. In the same way, when clicking on the small button with "..." on the MapMode property of the second datum, the exact same dialog UI apperas, and again FreeCAD handles without problems. In the same way, when calling Gui.runCommand('Part_EditAttachment') on the selected datum, the same dialog UI comes up and FreeCAD handles without problems. | ||||
Additional Information | When looking closely at the crash report in Linux:
This looks like a GUI/Qt segfault. ** "Edit datum" is defined in src/Mod/PartDesign/Gui/ViewProviderDatum.cpp:
** TaskDatumParameters is constructed with:
** TaskDlgDatumParameters::accept is defined in src/Mod/PartDesign/Gui/TaskDatumParameters.cpp: ** TaskDlgDatumParameters is defined in
** TaskDlgAttacher is defined in src/Mod/Part/Gui/TaskAttacher.cpp its constructor calls new TaskAttacher ** There is a TaskAttacher.ui in src/Mod/Part/Gui/TaskAttacher.ui where the window widget is called PartGui::TaskAttacher ** There is also a TaskAttachmentEditor.ui in: src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.ui with the same UI layout, where the window widget is called PartDesignGui::TaskDatumParameters CONCLUSION: one of these 2 crashes FreeCAD with datum objects in App::Parts when called with "Edit datum" from PartDesign WB. Following the trail: "Edit datum > setupContextMenu > TaskDatumParameters > PartGui::TaskAttacher" , it looks like src/Mod/Part/Gui/TaskAttacher.ui is the bad one. ALSO: Since it is possible to edit the attachment of datum objects - and any object - with >>> Gui.runCommand('Part_EditAttachment') from the python console, and 'Part_EditAttachment' is defined in src/Mod/Part/AttachmentEditor/Commands.py, it looks like src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.ui is the good one. Visually, both seem identical, except that in src/Mod/Part/Gui/TaskAttacher.ui the input fields are of type Gui::QuantitySpinbox and Gui::PrefQuantitySpinBox, while in src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.ui they're all Gui::InputField This problem seems to have been known before in src/Mod/PartDesign/Gui/TaskDatumParameters.cpp:
| ||||
Tags | #pending-forum, attachment, datum line, GUI, Part, Part Design | ||||
FreeCAD Information | 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) | ||||
|
I don't succeed in uploading the 2 screenshots of the 2 QtDesigner UI files |
|
@Zolko : I don't think using a Datum object out of a PartDesign Body is an expected usage. Though a crash is always good to avoid. Anyway, please open a topic in the forum first to discuss your issue according our bug reporting guidelines (https://forum.freecadweb.org/viewtopic.php?f=3&t=5236). Thx |
|
@openBrain : please define "expected usage". Because using datum objects outside the PartDesign WB is clearly something many users are doing and asking-for even more: https://forum.freecadweb.org/viewtopic.php?f=8&t=42759 |
|
@Zolko : please open a forum topic so we can further discuss that. Basically it means that it hasn't been foreseen as a usage (hence the Datum are PartDesign features and thus shall live inside a Body). |
|
Forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=42750 Zolko, next time please use code tags on the ticket for more efficient readability. I've added them. Thanks for the ticket. |
|
My bad, MantisBT was missing it's bbcode toolbar. Cancel clear regarding 0004258:0014140 |
|
@Zolko : may you please test and confirm that wmayer's change fixes the issue ? Thx |
|
@openBrain : I tested with latest AppImage build and yes, the "Edit Datum" crash doesn't happen again. I think we can close the issue, thank-you very much. OS: Ubuntu 18.04.3 LTS (KDE/plasma) Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.19955 (Git) AppImage Build type: Release Branch: master Hash: fd907d6d9789f71007b8d0177d167f1de82629b8 Python version: 3.8.2 Qt version: 5.12.5 Coin version: 4.0.0 OCC version: 7.4.0 Locale: English/United Kingdom (en_GB) |
|
Actually, was fixed between 0.19-19405 and 0.19-19443, consistent with: "wmayer committed on 30 Jan" |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-01-27 14:16 | Zolko | New Issue | |
2020-01-27 14:16 | Zolko | Tag Attached: attachment | |
2020-01-27 14:16 | Zolko | Tag Attached: datum line | |
2020-01-27 14:16 | Zolko | Tag Attached: GUI | |
2020-01-27 14:16 | Zolko | Tag Attached: Part | |
2020-01-27 14:16 | Zolko | Tag Attached: Part Design | |
2020-01-27 14:19 | Zolko | Note Added: 0014118 | |
2020-01-27 14:21 | Zolko | Note Edited: 0014118 | |
2020-01-27 18:48 | openBrain | Status | new => feedback |
2020-01-27 18:48 | openBrain | Note Added: 0014122 | |
2020-01-27 18:48 | openBrain | Tag Attached: #post-to-forum | |
2020-01-27 19:03 | openBrain | Priority | high => normal |
2020-01-28 09:06 | Zolko | Note Added: 0014124 | |
2020-01-28 09:06 | Zolko | Status | feedback => new |
2020-01-28 16:50 | openBrain | Note Added: 0014125 | |
2020-02-05 16:11 | Kunda1 | Note Added: 0014140 | |
2020-02-05 16:11 | Kunda1 | Tag Detached: #post-to-forum | |
2020-02-05 16:11 | Kunda1 | Tag Attached: #pending-forum | |
2020-02-05 16:11 | Kunda1 | Assigned To | => Kunda1 |
2020-02-05 16:11 | Kunda1 | Status | new => assigned |
2020-02-05 16:12 | Kunda1 | Assigned To | Kunda1 => |
2020-02-05 16:12 | Kunda1 | Status | assigned => acknowledged |
2020-02-05 16:13 | Kunda1 | Description Updated | |
2020-02-05 16:18 | Kunda1 | Description Updated | |
2020-02-05 16:18 | Kunda1 | Additional Information Updated | |
2020-02-10 22:07 | Kunda1 | Target Version | => 0.19 |
2020-02-10 22:07 | Kunda1 | Note Added: 0014145 | |
2020-03-02 20:16 | wmayer | Changeset attached | => FreeCAD master f70a267d |
2020-03-09 11:02 | openBrain | Note Added: 0014218 | |
2020-03-09 12:03 | Zolko | Note Added: 0014219 | |
2020-03-09 12:23 | Zolko | Note Added: 0014220 | |
2020-03-09 16:54 | openBrain | Status | acknowledged => closed |
2020-03-09 16:54 | openBrain | Resolution | open => fixed |