Bad value not filtered - FreeCAD hangs/crashes

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
UR_
Posts: 983
Joined: Tue Jan 03, 2017 8:42 pm

Bad value not filtered - FreeCAD hangs/crashes

Postby UR_ » Sat Oct 14, 2017 5:55 pm

I think this was encountered in past already, but i found nothing on bugtracker and issue still persists :(

Workflow to reproduce hang/crash:
- create sphere using PartWB [Primitives]->[Sphere]
- View property looks like this (value depends on preferences)
TabViewProperty.png
TabViewProperty.png (12.09 KiB) Viewed 726 times

- try to change deviation to 0,5% (plan is: select value in input box and type in: "0"->","->"5")
- unfortunately every keystroke starts an autoupdate and deviation = 0 triggers tender spot
- freeze :shock:

Is it possible to stop this behaviour?

Done with:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12396 (Git)
Build type: Release
Branch: master
Hash: fb2b9d6cef287d826a905b90928d41a03e38d928
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
User avatar
bejant
Posts: 5877
Joined: Thu Jul 11, 2013 3:06 pm

Re: Bad value not filtered - FreeCAD hangs/crashes

Postby bejant » Sat Oct 14, 2017 9:21 pm

UR_ wrote:
Sat Oct 14, 2017 5:55 pm
- try to change deviation to 0,5% (plan is: select value in input box and type in: "0"->","->"5")
- unfortunately every keystroke starts an autoupdate and deviation = 0 triggers tender spot
- freeze :shock:

Is it possible to stop this behaviour?

Done with:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12396 (Git)
I can't reproduce your problem using either my older FreeCAD daily or after updating (and your version is still quite ahead of mine). Regardless, you can try right-clicking on the document name in the history tree, then selecting "Skip Recomputes" until you change the Property and see if that helps:
20171014c.png
20171014c.png (28.33 KiB) Viewed 707 times


I used:

OS: Ubuntu 16.04.3 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.17.12284 (Git)
Build type: None
Branch: master
Hash: 2244292552c004e6b506af9e1e98d3423e524ee7
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)

OS: Ubuntu 16.04.3 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.17.12372 (Git)
Build type: None
Branch: master
Hash: 76eba3a57904899805f683e1eaf0cbb71b806c83
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
GeneFC
Posts: 1025
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Bad value not filtered - FreeCAD hangs/crashes

Postby GeneFC » Sat Oct 14, 2017 9:56 pm

One way to work around this problem is to first change to 1,500 by selecting only the first 0 and changing it to a 5. Then change the 1 to a zero. The "tender spot freeze" is never reached.

Gene
UR_
Posts: 983
Joined: Tue Jan 03, 2017 8:42 pm

Re: Bad value not filtered - FreeCAD hangs/crashes

Postby UR_ » Sun Oct 15, 2017 8:55 am

bejant wrote:
Sat Oct 14, 2017 9:21 pm
selecting "Skip Recomputes" until you change the Property and see if that helps
Sorry bejant, doesn't work.
I can reproduce this behaviour on two machines (both Win 10) and it persists since hundreds of commits.
Therefore it's not a new one.


GeneFC wrote:
Sat Oct 14, 2017 9:56 pm
selecting only the first 0 and changing it to a 5. Then change the 1 to a zero
That's exactly the way i have to do.
OMG, i can't face it anymore :lol:
wmayer
Site Admin
Posts: 14789
Joined: Thu Feb 19, 2009 10:32 am

Re: Bad value not filtered - FreeCAD hangs/crashes

Postby wmayer » Sun Oct 15, 2017 9:12 am

I think this was encountered in past already, but i found nothing on bugtracker and issue still persists
I cannot confirm this behaviour on Windows 7 either. But when I enter the value 0.0001 (which is the smallest value you can enter) then it indeed takes forever. So, there must be something maybe OS related that triggers the tessellation while typing the text "0,".

Another workaround is to hide the object before changing the value and then show it again.
UR_
Posts: 983
Joined: Tue Jan 03, 2017 8:42 pm

Re: Bad value not filtered - FreeCAD hangs/crashes

Postby UR_ » Sun Oct 15, 2017 11:47 am

wmayer wrote:
Sun Oct 15, 2017 9:12 am
then it indeed takes forever
Change deviation form 1,000 to 0,001 takes 2 minutes on my old rig (and works!)
So i guess change from 1,000 to 0,0001 will take 200 min, and that's bad :o
At least, user should be able to break this super lengthy operation, if dastardly trapped by FreeCAD's inputbox :lol:
And of course i don't mean Alt-F4 ;)

wmayer wrote:
Sun Oct 15, 2017 9:12 am
hide the object before changing the value and then show it again
This works, perhaps should be standard behaviour, while inside deviation inputbox :roll:
wmayer
Site Admin
Posts: 14789
Joined: Thu Feb 19, 2009 10:32 am

Re: Bad value not filtered - FreeCAD hangs/crashes

Postby wmayer » Sun Oct 15, 2017 5:53 pm

At least, user should be able to break this super lengthy operation, if dastardly trapped by FreeCAD's inputbox
The occ API offers no possibility to cancel the operation.
This works, perhaps should be standard behaviour, while inside deviation inputbox
That's not possible since the property editor doesn't know anything about the context a property is used.

The only way would be to restore the old behaviour we had in previous versions: don't update the tessellation while typing in the number but just postpone until the shape is touched again.
wmayer
Site Admin
Posts: 14789
Joined: Thu Feb 19, 2009 10:32 am

Re: Bad value not filtered - FreeCAD hangs/crashes

Postby wmayer » Wed Oct 18, 2017 8:44 am

The easiest for now is to just increase the lower limit of the deviation. git commit 2486e95
UR_
Posts: 983
Joined: Tue Jan 03, 2017 8:42 pm

Re: Bad value not filtered - FreeCAD hangs/crashes

Postby UR_ » Wed Oct 18, 2017 5:05 pm

thumbs-up_s.png
thumbs-up_s.png (3.41 KiB) Viewed 553 times
crobar
Posts: 153
Joined: Fri Aug 29, 2014 1:26 pm

Re: Bad value not filtered - FreeCAD hangs/crashes

Postby crobar » Thu Nov 23, 2017 1:25 pm

I hate to drag up an old thread, but I see this same issue in a recent AppImage.

I start typing in the deviation box but have to delete the previous value, when I get to the point that the text: "0." is in the box, FreeCAD locks up. I assume this is because zero or some smallest possible value has been sent to the code that controls the view.

Ideally, the Deviation box would not send the new value until it loses focus or you hit enter or whatever.

There are other places where this would be good too. I previously had trouble with the old drawing workbench when trying to move or scale views. Every digit typed caused an update and I had to wait ages to input the next digit.

OS: Linux Mint 17.3 Rosa
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9747 (Git)
Build type: None
Branch: master
Hash: f5c0f579cbd7ce668727f8835946e4e9abc0eec6
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17