Opening an fcstd file that contains an iges import causes memory overflow and system crash

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!
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Opening an fcstd file that contains an iges import causes memory overflow and system crash

Post by thomas-neemann »

opening an fcstd file that contains an iges import

https://grabcad.com/library/g3-model-in-igs-format

causes memory overflow and system crash

Can anybody confirm this?

Bildschirmfoto_2022-08-18_22-46-48.png
Bildschirmfoto_2022-08-18_22-46-48.png (128.97 KiB) Viewed 612 times

Code: Select all

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

https://www.youtube.com/@thomasneemann5 ... ry=freecad
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Opening an fcstd file that contains an iges import causes memory overflow and system crash

Post by TheMarkster »

Attach your fcstd file.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Opening an fcstd file that contains an iges import causes memory overflow and system crash

Post by GeneFC »

I downloaded the file and imported it into a new project. Took a while but no problems.

The IGES file is pretty large, 130 MB, so that might be the problem. Also, as The Markster hinted, your FCStd file might be contributing.

Code: Select all

OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of FreeCAD: 64-bit
Version: 0.21.29849 (Git)
Build type: Release
Branch: Master
Hash: 790bf5363e05c3de35d3c1350fd887b94f27a656
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: English/United States (en_US)
Installed mods: 
  * FeedsAndSpeeds 0.4.0
  * FeedsAndSpeeds-master.zip
  * Help 1.0.3
  * offline-documentation
Gene
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Opening an fcstd file that contains an iges import causes memory overflow and system crash

Post by thomas-neemann »

TheMarkster wrote: Thu Aug 18, 2022 9:26 pm ...
GeneFC wrote: Thu Aug 18, 2022 11:47 pm ...

here is the file

https://drive.google.com/file/d/18TxC45 ... sp=sharing
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
mfro
Posts: 663
Joined: Sat Sep 23, 2017 8:15 am

Re: Opening an fcstd file that contains an iges import causes memory overflow and system crash

Post by mfro »

Congratulations, I think you have found a bug. There is no FreeCAD error message, just a syslog entry:

Code: Select all

Out of memory: Killed process 251297 (FreeCAD) total-vm:11136448kB, anon-rss:6860712kB, file-rss:44144kB, shmem-rss:8896kB, UID:1000 pgtables:15132kB oom_score_adj:200
This is from my laptop (16 GB), more memory doesn't help, it just takes longer to crash (tested on an 128GB machine with plenty of swap as well).

Code: Select all

OS: Debian GNU/Linux bookworm/sid (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.21.30120 (Git)
Build type: Release
Branch: attach_to_wire
Hash: 882845e6318050ec3cb9cca702c240f83816a0aa
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 7.1.1, OCC 7.7.0.dev
Locale: German/Germany (de_DE)
Cheers,
Markus
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Opening an fcstd file that contains an iges import causes memory overflow and system crash

Post by thomas-neemann »

mfro wrote: Fri Aug 19, 2022 6:24 am ...
thanks for testing. can someone test it on windows or mac os?
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
mfro
Posts: 663
Joined: Sat Sep 23, 2017 8:15 am

Re: Opening an fcstd file that contains an iges import causes memory overflow and system crash

Post by mfro »

thomas-neemann wrote: Fri Aug 19, 2022 6:29 am
mfro wrote: Fri Aug 19, 2022 6:24 am ...
thanks for testing. can someone test it on windows or mac os?
Read @GeneFC's post.
Cheers,
Markus
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Opening an fcstd file that contains an iges import causes memory overflow and system crash

Post by thomas-neemann »

mfro wrote: Fri Aug 19, 2022 6:36 am ...

Read @GeneFC's post.
i did that, i understood it that he only imported the igs file, but didn't save it as fcstd and reload it
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
mfro
Posts: 663
Joined: Sat Sep 23, 2017 8:15 am

Re: Opening an fcstd file that contains an iges import causes memory overflow and system crash

Post by mfro »

thomas-neemann wrote: Fri Aug 19, 2022 6:39 am i did that, i understood it that he only imported the igs file, but didn't save it as fcstd and reload it
Ah, o.k. For me, just trying to import the IGES file is enough to crash.
Cheers,
Markus
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Opening an fcstd file that contains an iges import causes memory overflow and system crash

Post by GeneFC »

OK, I tried a few different things. (All done independently.)

1. I created a new document as noted above and imported the IGES file. Took a couple of minutes, but the result looked OK.

2. I opened the FCStd file posted on Google Drive. It opened very fast, but the image was a bit broken up.

3. I saved the document (FCStd) that was created when I imported the IGES file directly. When I reopened that file the time was a few seconds, and the image was broken up in the same manner as test 2.

In each case I got an error message:

Code: Select all

<Part> ViewProviderExt.cpp(1267): Cannot compute Inventor representation for the shape of g3_20#G3_body003: NCollection_AliasedArray::value(), out of range index
No crashes, but this is on Windows, which tends to capture events that cause crashes on Linux.

My guess is that the IGES file has a problem, and FreeCAD may not deal with the model correctly when saving.

[Edit: Played a bit more. The simple imported IGES file shows many errors in the "Check" mode. In particular the shape G3_body003 has hundreds of errors. This is with BOP check OFF. If BOP check is ON there are even more errors.]

Gene
Post Reply