Issue #6767- [Bug] Draft big Scale Multiplier with 2d text causes crash (was: Freecad and really big dimension)

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!
m1cha1
Posts: 24
Joined: Sun Oct 28, 2018 8:55 am

Issue #6767- [Bug] Draft big Scale Multiplier with 2d text causes crash (was: Freecad and really big dimension)

Post by m1cha1 »

I'm experimenting with Freecad and I've found some problems (problem with displaying or crashing) with big dimension
Problem with displaying-step to reproduce (Part workbench)
1. Insert Cube
2. Change dimension for example Length by adding 0 to the default size (10mm)
From 100000000 mm there are problem with displaying cube, from 1000000000 mm it completely dissapear. If you increase size more there are problems wilth lengths in Python console for example :FreeCAD.getDocument('Unnamed').getObject('Box').Length = '99999999999999991611392.00 mm'

Crash-step to reproduce (Draft workbench)
1. Create Text (for example "HELLO")
2. Change properties Display mode: 2D text
3. Change Scale Multiplier to 10000- you should get Access violation
4. Increase Scale Multiplier to 1000000 or more you should get crash

Maybe it will be better when the user will get some warning or maybe it's possible to prevent crash.

BTW I've checked also Fusion360 when you increase the size of the cube you will get crash (without warning). So probably it's a general problem of the CAD software.

Code: Select all

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.28671 (Git)
Build type: Release
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Test file:
crash.FCStd
(7.68 KiB) Downloaded 14 times
Open file and change Scale Multiplier by adding 0 after 1 till crash (10, 100, 1000...)
Last edited by m1cha1 on Tue May 17, 2022 6:59 am, edited 2 times in total.
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Freecad and really big dimension

Post by chrisb »

These are basic issues with floating point numbers and their finite representation in computers.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Freecad and really big dimension

Post by thomas-neemann »

m1cha1 wrote: Fri Apr 15, 2022 10:42 pm .... 1000000000 mm it completely dissapear. ....
this seems to be a windows problem. here under linux it works
wp.png
wp.png (7.98 KiB) Viewed 1882 times



wp2.png
wp2.png (15.24 KiB) Viewed 1879 times

OS: Ubuntu 20.04.1 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.28697 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 37ed6fb)
Hash: 37ed6fb92e2d336be0d934530cabc1e5eb815e0a
Python 3.9.12, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: German/Germany (de_DE)
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
m1cha1
Posts: 24
Joined: Sun Oct 28, 2018 8:55 am

Re: Freecad and really big dimension

Post by m1cha1 »

thomas-neemann wrote: Sat Apr 16, 2022 7:04 am this seems to be a windows problem. here under linux it works
Thank you for checking. So it's not so obvious. Could you please also test draft Scale Multiplier problem.
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Freecad and really big dimension

Post by thomas-neemann »

m1cha1 wrote: Fri Apr 15, 2022 10:42 pm ...
4. Increase Scale Multiplier to 1000000 or more you should get crash
...
I can confirm that in master, there is no crash in realthunder, but you can no longer represent it in a meaningful way. what is this needed for?
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
m1cha1
Posts: 24
Joined: Sun Oct 28, 2018 8:55 am

Re: Freecad and really big dimension

Post by m1cha1 »

thomas-neemann wrote: Tue Apr 19, 2022 8:11 am I can confirm that in master, there is no crash in realthunder, but you can no longer represent it in a meaningful way. what is this needed for?
Thank you very much for confirmation. I just want to make a bug report:
https://github.com/FreeCAD/FreeCAD/issues/6767
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Freecad and really big dimension

Post by thomas-neemann »

m1cha1 wrote: Tue Apr 19, 2022 8:42 am ...I just want to make a bug report:
https://github.com/FreeCAD/FreeCAD/issues/6767
what's the point of creating a bug report for something that isn't needed?
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
m1cha1
Posts: 24
Joined: Sun Oct 28, 2018 8:55 am

Re: Freecad and really big dimension

Post by m1cha1 »

thomas-neemann wrote: Tue Apr 19, 2022 8:45 am what's the point of creating a bug report for something that isn't needed?
Maybe it's not needed, maybe it's not a standard situation, maybe nobody repair this. But the crash in my opinion it's not acceptable.
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Freecad and really big dimension

Post by thomas-neemann »

m1cha1 wrote: Tue Apr 19, 2022 8:58 am

Maybe it's not needed, maybe it's not a standard situation, maybe nobody repair this. But the crash in my opinion it's not acceptable.
In my opinion, there are more important construction sites in freecad. e.g. techdraw
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Freecad and really big dimension

Post by chrisb »

Even if there are more important things to fix, it should be reported if FreeCAD crashes. The tickets are not a wish list what to tackle first.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply