[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.
User avatar
Kunda1
Posts: 5927
Joined: Thu Jan 05, 2017 9:03 pm

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

Postby Kunda1 » Sun Jan 15, 2017 3:16 pm

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.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
jnxd
Posts: 162
Joined: Mon Mar 30, 2015 2:30 pm

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

Postby jnxd » Tue Feb 21, 2017 3:30 pm

Kunda1, I think the project should be changed to Sketcher rather than FreeCAD.
User avatar
kkremitzki
Posts: 1795
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

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

Postby kkremitzki » Tue Feb 21, 2017 3:41 pm

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
Posts: 5927
Joined: Thu Jan 05, 2017 9:03 pm

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

Postby Kunda1 » Fri Apr 28, 2017 4:01 pm

Abdullah wrote:...
Can you offer any feedback on this ticket?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

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

Postby abdullah » Fri Apr 28, 2017 8:10 pm

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 1492 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
Posts: 5927
Joined: Thu Jan 05, 2017 9:03 pm

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

Postby Kunda1 » Fri Apr 28, 2017 8:39 pm

This may be MacOSX specific. Can any test on OSX?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
chrisb
Posts: 19603
Joined: Tue Mar 17, 2015 9:14 am

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

Postby chrisb » Fri Apr 28, 2017 10:08 pm

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.
User avatar
Kunda1
Posts: 5927
Joined: Thu Jan 05, 2017 9:03 pm

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

Postby Kunda1 » Fri Apr 28, 2017 11:03 pm

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!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
abdullah
Posts: 3174
Joined: Sun May 04, 2014 3:16 pm

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

Postby abdullah » Fri Apr 28, 2017 11:18 pm

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
Posts: 19603
Joined: Tue Mar 17, 2015 9:14 am

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

Postby chrisb » Sat Apr 29, 2017 5:06 am

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).