[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!
sterna
Posts: 12
Joined: Fri May 01, 2015 3:52 pm

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

Post by sterna »

I tried it again with the latest build (Version: 0.17.10967). My findings are:
Whenever you have an overconstrained sketch and add any sketch element, that does not add any constraints, the newly added sketch element does not appear.
If you add or change any constraint to the sketch (including autoconstraints on new sketch elements) the previously hidden element(s) are shown.
As for the crash, I haven't found out exactly under what circumstances it happens. Most often, it happens if you ctr+z shortly after the invisible sketch element is added. Sometimes, it happens even if the unconstrained sketch elements are unaffected by the ctrl+z.
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.
How do I delete the config files? What files should I delete? I do have 0.16 installed as well, if that affects anything.
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

0.16 and 0.17 share the same config files. They reside in ~/Library/Preferences/FreeCAD (~ being your home directory). You can move or rename them in case you need them later - it are textfiles which can be compared using appropriate tools.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
sterna
Posts: 12
Joined: Fri May 01, 2015 3:52 pm

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

Post by sterna »

I deleted system.cfg and user.cfg and that seems to have done trick :) Still unsure what could have caused the error in the first place. Should I upload the files I deleted (I saved them in another location) so someone can take a look at them, because there is obviously something wrong here?
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

sterna wrote:I deleted system.cfg and user.cfg and that seems to have done trick :) Still unsure what could have caused the error in the first place. Should I upload the files I deleted (I saved them in another location) so someone can take a look at them, because there is obviously something wrong here?
Zip them both and upload the file here. I will have a short look tonight. If I can see something suspicious I will report it here and we can discuss it further.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
sterna
Posts: 12
Joined: Fri May 01, 2015 3:52 pm

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

Post by sterna »

I uploaded them to the bug report (they are not that big, 30kB or less each).
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 »

chrisb wrote: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).
Not that I remember. I was just working and it happened.
sterna wrote:I deleted system.cfg and user.cfg and that seems to have done trick :) Still unsure what could have caused the error in the first place. Should I upload the files I deleted (I saved them in another location) so someone can take a look at them, because there is obviously something wrong here?
chrisb wrote:Zip them both and upload the file here. I will have a short look tonight. If I can see something suspicious I will report it here and we can discuss it further.
Amazing! If you discover something let me know because I think this is very interesting to try to catch the little bug ;)
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

abdullah wrote: Amazing! If you discover something let me know because I think this is very interesting to try to catch the little bug ;)
I have uploaded two config files to the bug tracker, one is showing the error, the other doesn't. The config files differ in exactly one line. (Please excuse the typo, but I cannot edit my own bug tracker messages).

I discovered that usage of the polyline does not show the first line, but as soon as the second segment is finished all previously added elements show up immediately.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
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 »

chrisb wrote:
abdullah wrote: Amazing! If you discover something let me know because I think this is very interesting to try to catch the little bug ;)
I have uploaded two config files to the bug tracker, one is showing the error, the other doesn't. The config files differ in exactly one line. (Please excuse the typo, but I cannot edit my own bug tracker messages).

I discovered that usage of the polyline does not show the first line, but as soon as the second segment is finished all previously added elements show up immediately.
That makes a lot of sense now!! Good job! :D

I have assigned the bug to myself. I will come back to it soon.
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

The problem - or better: time consuming part - is, that the elements in the config files occur somewhat at random. It would be great if there was a possibility to sort them.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
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 »

chrisb wrote:The problem - or better: time consuming part - is, that the elements in the config files occur somewhat at random. It would be great if there was a possibility to sort them.
I just googled it. People seem to be using:
1. xmllint
2. xmldiff
3. xslproc

I did not try:
https://superuser.com/questions/79920/h ... -xml-files
https://unix.stackexchange.com/question ... rent-lines
Post Reply