Draft edit crashes when typing coordinates

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
sheinz
Posts: 12
Joined: Wed May 31, 2017 2:00 pm

Draft edit crashes when typing coordinates

Post by sheinz »

Hello All,

When I use Draft_Edit with manually typing the coordinates FreeCAD crashes.
If I use mouse to pick the coordinates everything works fine.
Please find the attached video.

phpBB [video]


FreeCAD version: FreeCAD 0.21.0 Revision: 32166 (Git)

I can provide additional logs or information if needed.
Thanks.
hko
Posts: 105
Joined: Thu Apr 23, 2020 10:44 pm

Re: Draft edit crashes when typing coordinates

Post by hko »

I suspect it is the same issue I reported here: viewtopic.php?t=73045

Unless I've missed some recent change, there is no known proper fix for it but as explained in the linked thread, there is something that can be done to mitigate the problem (=solves the problem for me in practice). I suppose I could create an issue + PR with that mitigation during the upcoming weekend unless someone else beats me to it. (And create another issue for fixing the problem properly.)

In anticipation of "I can't reproduce that" posts, it seems that the faster the computer (and the less load) you have, the less likely the problem is to occur, it's timing sensitive. On the faster of the two machines I tested with, I had to slow things down artificially.
sheinz
Posts: 12
Joined: Wed May 31, 2017 2:00 pm

Re: Draft edit crashes when typing coordinates

Post by sheinz »

Thank you for the reply.
Yes. It is exactly the same issue.
I can work around the problem by not hitting the enter right away but to use "Tab" key to change the focus to "Enter point" button and than hitting the enter. This workaround works consistently but the permanent fix would be nice :)
User avatar
Roy_043
Veteran
Posts: 8550
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft edit crashes when typing coordinates

Post by Roy_043 »

I am able to reproduce the problem, but not consistently. It may be hard to solve. I'll put this on my ToDo list anyway.

Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.21.0.31917 (Git)
Build type: Release
Branch: master
Hash: 4639283b459f9ff9093e289908cc003db8745b82
Python 3.10.9, Qt 5.15.6, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US) [ OS: Dutch/Netherlands (nl_NL) ]
Installed mods:
hko
Posts: 105
Joined: Thu Apr 23, 2020 10:44 pm

Re: Draft edit crashes when typing coordinates

Post by hko »

Issue here and mitigation pull request here.

If someone wants to test the change right away, it only affects two lines in one Python file (Mod/Draft/DraftGui.py), so you could apply it to your existing FreeCAD installation even manually. You can see the change here.
Post Reply