Crash using Add quadrant vertices

Discussions about the development of the TechDraw workbench
chrisb
Posts: 27938
Joined: Tue Mar 17, 2015 9:14 am

Crash using Add quadrant vertices

Postby chrisb » Sun Nov 03, 2019 10:29 am

When using "Add quadrant vertices" I get a crash, if nothing is selected.

Steps to reproduce:
- start FreeCAD, switch to TechDraw
- open attached file
- without doing anything else call Menu->TechDraw->Add quadrant vertices
-> crash!

Furthermore:
- if I select the view before calling Add quadrant vertices, nothing happens (no crash, no additional points)
- if I select either one or both circles before calling Add quadrant vertices, nothing happens (no crash, no additional points)
- if I select the face between the circles before calling I get the expected message: "Please select only Edges for this function"
- On some occasions the quadrant points occur though, but I could not reproduce the sequence of tries of selections of the circles and the view


OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18644 (Git)
Build type: Release
Branch: master
Hash: 481870be2b48ef95b59acf1440b069d42b6fad23
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Germany (en_DE)
Attachments
quadrantVertices.FCStd
(11.7 KiB) Downloaded 9 times
Syres
Posts: 803
Joined: Thu Aug 09, 2018 11:14 am

Re: Crash using Add quadrant vertices

Postby Syres » Sun Nov 03, 2019 12:25 pm

On Windows, no hard crash but in Report View and a dialog box produced with the following:

Code: Select all

Illegal storage access...
<Exception> Illegal storage access! Please save your work under a new file name and restart the application!
I can also confirm all your points in the 'Furthermore' paragraph.

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18644 (Git)
Build type: Release
Branch: master
Hash: 481870be2b48ef95b59acf1440b069d42b6fad23
Python version: 3.6.7
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: Crash using Add quadrant vertices

Postby vocx » Sun Nov 03, 2019 7:05 pm

chrisb wrote:
Sun Nov 03, 2019 10:29 am
When using "Add quadrant vertices" I get a crash, if nothing is selected.
...
This is the backtrace

Code: Select all

Thread 1 "FreeCAD" received signal SIGSEGV, Segmentation fault.
0x00007fff5db00a5e in TechDraw::DrawViewPart::getEdgeGeometry (this=0x0)
    at /opt/freecad-source-vocx/src/Mod/TechDraw/App/DrawViewPart.cpp:579
579	    return geometryObject->getEdgeGeometry();
(gdb) bt
#0  0x00007fff5db00a5e in TechDraw::DrawViewPart::getEdgeGeometry() const (this=0x0)
    at /opt/freecad-source-vocx/src/Mod/TechDraw/App/DrawViewPart.cpp:579
#1  0x00007fff5e1081a8 in execQuadrant(Gui::Command*) (cmd=0x555555eb41f0)
    at /opt/freecad-source-vocx/src/Mod/TechDraw/Gui/CommandAnnotate.cpp:401
#2  0x00007fff5e108d11 in CmdTechDrawQuadrant::activated(int) (this=0x555555eb41f0, iMsg=0)
    at /opt/freecad-source-vocx/src/Mod/TechDraw/Gui/CommandAnnotate.cpp:534
#3  0x00007ffff6c33129 in Gui::Command::invoke(int, Gui::Command::TriggerSource) (this=0x555555eb41f0, i=0, trigger=Gui::Command::TriggerAction) at /opt/freecad-source-vocx/src/Gui/Command.cpp:408
#4  0x00007ffff6c2410e in Gui::Action::onActivated() (this=0x5555563d1ad0) at /opt/freecad-source-vocx/src/Gui/Action.cpp:96
#5  0x00007ffff6c2992f in Gui::Action::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x5555563d1ad0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffffbd90) at /opt/freecad-build-vocx/src/Gui/moc_Action.cpp:74
#6  0x00007ffff2c32645 in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x555557294140, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffbd90) at kernel/qobject.cpp:3767
#7  0x00007ffff2c32d17 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x555557294140, m=m@entry=0x7ffff4044e00 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffbd90)
    at kernel/qobject.cpp:3629
#8  0x00007ffff397b122 in QAction::triggered(bool) (this=this@entry=0x555557294140, _t1=<optimized out>) at .moc/moc_qaction.cpp:370
#9  0x00007ffff397d80c in QAction::activate(QAction::ActionEvent) (this=0x555557294140, event=<optimized out>) at kernel/qaction.cpp:1165
#10 0x00007ffff3afa0fc in QMenuPrivate::activateCausedStack(QVector<QPointer<QWidget> > const&, QAction*, QAction::ActionEvent, bool) (this=this@entry=0x5555584524a0, causedStack=..., action=action@entry=0x555557294140, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1323
#11 0x00007ffff3b015ab in QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) (this=this@entry=0x5555584524a0, action=action@entry=0x555557294140, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1400
---Type <return> to continue, or q <return> to quit---
Wandererfan just pushed some commits to master, so maybe we should try again with the current 0.19.18661.
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.
User avatar
wandererfan
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: Crash using Add quadrant vertices

Postby wandererfan » Mon Nov 04, 2019 12:26 am

chrisb wrote:
Sun Nov 03, 2019 10:29 am
When using "Add quadrant vertices" I get a crash, if nothing is selected.
Should be fixed by git commit c2851ae4b6. Similar fault in "Midpoints" fixed too.