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

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

Postby sterna » Sat Apr 29, 2017 6:07 am

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
Posts: 19569
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 8:21 am

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

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

Postby sterna » Sun Apr 30, 2017 6:47 am

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

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

Postby chrisb » Sun Apr 30, 2017 8:25 am

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

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

Postby sterna » Sun Apr 30, 2017 8:43 am

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

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

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

Postby chrisb » Sun Apr 30, 2017 9:49 pm

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.
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 » Sun Apr 30, 2017 11:11 pm

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

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

Postby chrisb » Mon May 01, 2017 7:25 am

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.
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 » Mon May 01, 2017 9:26 am

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