Step to reproduce:
Create a body.
Add additive box.
Select a face and start Thickness tool.
Press "Add Face" button.
Crash when trying to access the null pointer addAllEdgesAction in TaskDressUpParameters::onButtonRefAdd method
OS: Debian GNU/Linux bookworm/sid (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.27075 +1 (Git)
Build type: Unknown
Branch: part-attachment
Hash: 47769a54af93fdfb8891c27da9cc56f59a6f7f8d
Python version: 3.9.9
Qt version: 5.15.2
Coin version: 4.0.0
OCC version: 7.5.1
Locale: English/United States (en_US)
Crash on thickness tool
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 124
- Joined: Wed Jun 19, 2019 7:44 pm
Re: Crash on thickness tool
No problem here. Does it happen with any face of the six?
OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.27008 (Git)
Build type: Release
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: C/Default (C)
OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.27008 (Git)
Build type: Release
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 124
- Joined: Wed Jun 19, 2019 7:44 pm
Re: Crash on thickness tool
Yes, with any face.
Here's the problem https://github.com/FreeCAD/FreeCAD/pull/5269 (don't know why with a lower revision number than yours @chrisb).
TaskFilletParameters, TaskChamferParameters, and TaskThicknessParameters inherit from TaskDressUpParameters but only the first two correctly handle the addAllEdgesAction member. On the other hand, the added changes appear to be specific to Chamfer and Fillet but no to thickness.
Re: Crash on thickness tool
Confirrmed. This happens as soon as the "Add face" button is pressed, before any actual selection. Report window shows this:
Pressing the "Add face" button again crashes FreeCAD. Tried other shapes - same error and crash.
Manually edited thickness support - works as expected.
OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.20.27075 (Git)
Build type: Release
Branch: master
Hash: 089b18f8686ac03da749b916ab304f1c13f79d21
Python version: 3.8.8
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: Bulgarian/Bulgaria (bg_BG)
Code: Select all
09:06:59 Illegal storage access...
09:06:59 Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Illegal storage access! Please save your work under a new file name and restart the application!
09:06:59 The event type 3 was sent to QToolButton
Object tree:
QToolButton (buttonRefAdd) is child of
QWidget (PartDesignGui__TaskThicknessParameters) is child of
QFrame is child of
PartDesignGui::TaskThicknessParameters is child of
Gui::TaskView::TaskPanel is child of
QWidget (qt_scrollarea_viewport) is child of
Gui::TaskView::TaskView is child of
QStackedWidget (qt_tabwidget_stackedwidget) is child of
QTabWidget (combiTab) is child of
Gui::DockWnd::ComboView (Combo View) is child of
QDockWidget (Combo View) is child of
Gui::MainWindow
Manually edited thickness support - works as expected.
OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.20.27075 (Git)
Build type: Release
Branch: master
Hash: 089b18f8686ac03da749b916ab304f1c13f79d21
Python version: 3.8.8
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: Bulgarian/Bulgaria (bg_BG)
Last edited by kisolre on Mon Jan 17, 2022 12:38 pm, edited 1 time in total.
-
- Veteran
- Posts: 5505
- Joined: Thu Apr 05, 2018 1:53 am
Re: Crash on thickness tool
addAllEdgesAction is a member of TaskDressUpParameters and initialized with nullptr. The function createAddAllEdgesAction() can be used to create a QAction instance and add it to the passed QListWidget.
So far createAddAllEdgesAction() is used in TaskFilletParameters and TaskChamferParameters but not in other sub-classes of TaskDressUpParameters. Thus, inside TaskDressUpParameters::onButtonRefAdd() it also must be checked if addAllEdgesAction is null or not.
git commit 2d1c083d9a
So far createAddAllEdgesAction() is used in TaskFilletParameters and TaskChamferParameters but not in other sub-classes of TaskDressUpParameters. Thus, inside TaskDressUpParameters::onButtonRefAdd() it also must be checked if addAllEdgesAction is null or not.
git commit 2d1c083d9a
-
- Veteran
- Posts: 5505
- Joined: Thu Apr 05, 2018 1:53 am
Re: Crash on thickness tool
You beat me to it. I had exactly the same fix. I will close that PR. Thanks. I hope this fix gets in before the weekly builds are compiled.wmayer wrote: ↑Sun Jan 16, 2022 6:01 pm addAllEdgesAction is a member of TaskDressUpParameters and initialized with nullptr. The function createAddAllEdgesAction() can be used to create a QAction instance and add it to the passed QListWidget.
So far createAddAllEdgesAction() is used in TaskFilletParameters and TaskChamferParameters but not in other sub-classes of TaskDressUpParameters. Thus, inside TaskDressUpParameters::onButtonRefAdd() it also must be checked if addAllEdgesAction is null or not.
git commit 2d1c083d9a