TechDraw Leaderline Ctrl press causes crash

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
kevinz
Posts: 68
Joined: Fri Oct 18, 2019 2:58 pm

TechDraw Leaderline Ctrl press causes crash

Post by kevinz »

I have a drawing of a sheet metal piece that i'm trying to annotate in TechDraw. Selecting a View, clicking on the Add Leaderline to View button, clicking the Add Points button, and then holding down the Ctrl (Control) button for 5-10 seconds (while I'm thinking about what to click) causes FreeCAD to close altogether. I'm trying to hold down Ctrl to limit the Leaderline to 22.5 degree increments.

Here's my information:
OS: Ubuntu 18.04.6 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 7a9aa7edf2f44e3eb6a8e3e61c753368496b1399
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.5.2
Locale: English/UnitedStates (en_US)

I've attached my drawing, too.

Let me know if you have any questions or would like me to try anything.

-Kevin
Attachments
FTM-400 Control Head Bracket 2.FCStd
(147.39 KiB) Downloaded 27 times
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: TechDraw Leaderline Ctrl press causes crash

Post by openBrain »

Confirmed. Will run in debug mode to get trace.
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: TechDraw Leaderline Ctrl press causes crash

Post by openBrain »

Crashes here : https://github.com/FreeCAD/FreeCAD/blob ... r.cpp#L205
Because when pressing Ctrl while no point hasn't been selected yet, 'mpoints' is empty. Should be checked before use.
wandererfan wrote: Ping
Would you deal with that or do you prefer I push a PR ?
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: TechDraw Leaderline Ctrl press causes crash

Post by wandererfan »

openBrain wrote: Thu Jan 27, 2022 4:38 pm Would you deal with that or do you prefer I push a PR ?
Please go ahead. I won't be able to get to this for a while.
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: TechDraw Leaderline Ctrl press causes crash

Post by openBrain »

wandererfan wrote: Thu Jan 27, 2022 4:46 pm Please go ahead. I won't be able to get to this for a while.
https://github.com/FreeCAD/FreeCAD/pull/5452
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: TechDraw Leaderline Ctrl press causes crash

Post by wandererfan »

openBrain wrote: Thu Jan 27, 2022 5:20 pm
Merged. Thank you!
kevinz
Posts: 68
Joined: Fri Oct 18, 2019 2:58 pm

Re: TechDraw Leaderline Ctrl press causes crash

Post by kevinz »

Thanks!
3dHacker
Posts: 35
Joined: Sun Aug 08, 2021 9:15 pm

Techdraw Leaderline – can’t get it to work

Post by 3dHacker »

Wise ones:

I am using the FreeCAD from the end of February:
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +148 (Git)
Build type: Release
Branch: Branch_0.19.4
Hash: 476ecf091941bead59b14e44afa6064d5a66afa3
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)

Have a model with a Chamfer in it and trying to use a Leaderline to note it in the drawing. I had a bit of trouble with FreeCAD simply closing, which I believe was pressing the CTRL key while selecting the first point (where the arrow head goes).

Click ‘Select Points’ -> click where I want the arrow head to go -> press and hold the CTRL key and click where I want the end of the first segment of the leader line to be (it seems to fix the first segment on the drawing) -> continue holding the CTRL key and click where I want the end of the second segment of the leader line to be -> release the CTRL key.

I think that now the second segment of the line should be fixed. But I am getting is the second segment is NOT fixed. The famous rubber band line.

Click ‘Save Points’. The second segment is removed. The first segment is still dashed and in color. The ‘Save Points’ / ‘Pick Points’ button is grayed out.

Click on ‘OK’ and the first segment is truncated and rotated to horizontal. Sometimes it leaves the arrow head on it other times it does not. Sometimes, it never anchors the ending point of the first segment. Every once in a while, it will work.

Funny thing, on a much simpler model (essentially an extruded rectangle) I had NO problems make leader lines, as many as I wanted. Realizing that I am memory constrained, I shut down my browsers with many open pages. Freed up a bunch of memory, but still no joy.

I noted that prior to the end of January, there was an issue that noted that you should NOT press the CTRL key before clicking the first point, but this 0.19.4 is a whole month later and still shuts down if you do that.

I have attached my model.

3dHacker
Alan
Attachments
49 Crank Shaft.FCStd
(120.99 KiB) Downloaded 18 times
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: TechDraw Leaderline Ctrl press causes crash

Post by Shalmeneser »

use v0.20 ?

(btw, an other file)
Attachments
StudyCadCam0049_SHALM.FCStd
(101.39 KiB) Downloaded 19 times
Capture d’écran 2022-04-25 012333.jpg
Capture d’écran 2022-04-25 012333.jpg (41.66 KiB) Viewed 1091 times
Capture d’écran 2022-04-25 012407.jpg
Capture d’écran 2022-04-25 012407.jpg (21.64 KiB) Viewed 1091 times
3dHacker
Posts: 35
Joined: Sun Aug 08, 2021 9:15 pm

Re: TechDraw Leaderline Ctrl press causes crash

Post by 3dHacker »

Shalmeneser, thanks for the reply.

If that is the look of dimensioning out in TechDraw with version 0.20, I like it. Are the formats that include the diameter symbol and the angle on the chamfer native to and new in 0.20 or did you have to do what I have been doing in 0.19, pasting them into the format as I go along. Also, is that partial section a new feature too? So far, the reading that I have done about what all is in 0.20, I am interested.

I looked at it several months ago and, at that time, couldn’t figure out how to install it. Chocolatey seemed rather intimidating. I will have to take another look at it.

However, it doesn’t really answer my original question regarding Leader Lines. Only occasionally does 0.19-4 make a working leader line, it seemed to better in 0.19 from 9 months ago. And if you make the mistake of holding the control key when clicking on the first point, well, it (still) just goes away.

I am not a purist, but for the most part, I try to make the model and to generate the drawing using the way that the original design was made. Dimensioning to the selected places and specifying things as they were designed.

Which does bring up a point that has bothered me. Often I need to create an additive pipe that makes some bends. Often, either the designer, or myself, if I’m the designer, will specify that location and radius of the bends based on the center line of the additive pipe. I can’t find any way to do that while staying in TechDraw using 0.19. Is that a feature that might be added at sometime?

3dHacker
Alan
Post Reply