[Fixed] Crash Bug #2710 Freecad doesn't show sketch elements added when overconstrained

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

[Fixed] Crash Bug #2710 Freecad doesn't show sketch elements added when overconstrained

Post by Kunda1 »

issue #2710
Description
If you have an overconstrained sketch, Freecad will not show sketched features drawn without any constraints. The features show up by either adding another feature and creating auto constraints or by saving and re-opening the file. If you are in the state with any "hidden" features and press undo (cmd+z), Freecad crashes.
This bug works the same way in both version 0.16 (6706) and 0.17 (8471).

Steps To Reproduce
1. Open the attached file (HiddenSketchFeatures017 or 016) file
2. Add any number sketch elements without auto-added constraints. They will all be hidden. Some will even crash Freecad immediately (like the more advanced such as rectangle or slot).
3. Add any constraint. The hidden elements will now appear.
4. Use the "Undo" action (cmd+z or the Undo menu item). Freecad will crash when removing one of these hidden (or previously hidden) elements.

Additional Information
These are the about-dumps for my Freecad versions. They were downloaded today:
0.16:

Code: Select all

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: tag: 0.16.6706
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.11
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17
0.17:

Code: Select all

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.8471 (Git)
Build type: Release
Branch: (detached from f944ab3)
Hash: f944ab3846a52e8f19bb2d4f6ec66e392669cdf5
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 7.0.0
Last edited by Kunda1 on Mon Aug 21, 2017 4:04 am, edited 1 time in total.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: Crash Bug #2710 Freecad doesn't show sketch elements added when overconstrained

Post by jnxd »

Kunda1, I think the project should be changed to Sketcher rather than FreeCAD.
My latest (or last) project: B-spline Construction Project.
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Crash Bug #2710 Freecad doesn't show sketch elements added when overconstrained

Post by kkremitzki »

jnxd wrote:Kunda1, I think the project should be changed to Sketcher rather than FreeCAD.
Moved.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Crash Bug #2710 Freecad doesn't show sketch elements added when overconstrained

Post by Kunda1 »

Abdullah wrote:...
Can you offer any feedback on this ticket?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Crash Bug #2710 Freecad doesn't show sketch elements added when overconstrained

Post by abdullah »

Kunda1 wrote:
Abdullah wrote:...
Can you offer any feedback on this ticket?
I have downloaded the zip, opened the 017. It is overconstrain. Then I add lines:
adding_lines.png
adding_lines.png (6.77 KiB) Viewed 3024 times
They appear.

Maybe I do not understand the "they all will be hidden" of the issue. I have also tried undoing. Not problem with crashes. I can not reproduce the indicated behaviour.

I am running for these tests:
OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10950 (Git)
Build type: None
Branch: master
Hash: 6368b2f822cf838ee6c50ebf62480ff86c214317
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0

I have also tried the 016. Same behaviour as 017.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Crash Bug #2710 Freecad doesn't show sketch elements added when overconstrained

Post by Kunda1 »

This may be MacOSX specific. Can any test on OSX?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash Bug #2710 Freecad doesn't show sketch elements added when overconstrained

Post by chrisb »

Kunda1 wrote:This may be MacOSX specific. Can any test on OSX?
I tested with exactly the same OSX FreeCAD-version. No problems here either.

My recommendation to the original poster sterna is to delete his config files, as 0.16 and 0.17 share the same config.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Crash Bug #2710 Freecad doesn't show sketch elements added when overconstrained

Post by Kunda1 »

chrisb wrote:
Kunda1 wrote:This may be MacOSX specific. Can any test on OSX?
I tested with exactly the same OSX FreeCAD-version. No problems here either.

My recommendation to the original poster sterna is to delete his config files, as 0.16 and 0.17 share the same config.
@chrisb do u mind notating the ticket with a mention to @sterna to do just as you said? Thx!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Crash Bug #2710 Freecad doesn't show sketch elements added when overconstrained

Post by abdullah »

Kunda1 wrote:This may be MacOSX specific. Can any test on OSX?
I have been working on a design today and something related to this ticket happened to me.

I was using the polyline tool. I wanted to do a segment coincident with the vertical axis. Some autoconstraint got applied and the following segments won't appear. Ultimately FC crashed.

The problem: I had been unable to reproduce it afterwards.

Bottom line: There is a bug. I do not have a way to reproduce it yet. So we can not debug it and fix it.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash Bug #2710 Freecad doesn't show sketch elements added when overconstrained

Post by chrisb »

Did you do any Ctrl-Z before, perhaps even multiple? That's a use case where my FreeCAD crashes with some regularity but not repeatable. That's why I haven't reported it yet. The extremely good thing about this crash is, that it was the only one occuring in months (with 0.16).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply