(solved) crash with ifc import?

This forum section is only for IFC-related issues
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

(solved) crash with ifc import?

Post by thomas-neemann »

what can you do to prevent the freecad crashes during import e.g. this ifc file?


923.ifc
(24.57 KiB) Downloaded 82 times


930.FCStd
(71.34 KiB) Downloaded 70 times


1.png
1.png (27.01 KiB) Viewed 3727 times

OS: Ubuntu 20.04.1 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.26720 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 7bca26e)
Hash: 7bca26e7c14d4d43374ff7e0c8582735b249cbfd
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: German/Germany (de_DE)


edit


usbim.viewer+ can view it


Bildschirmfoto_2022-01-04_09-41-16.png
Bildschirmfoto_2022-01-04_09-41-16.png (25.37 KiB) Viewed 3707 times
Last edited by thomas-neemann on Tue Feb 01, 2022 8:01 am, edited 4 times in total.
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Workaround for crash with ifc import?

Post by thomas-neemann »

if you create a compound with upgrade or part compound, it works. in my opinion that is enough to take part in a bim process based on geometry without any attributes.

930-upgrade.ifc
(21.97 KiB) Downloaded 76 times
2.png
2.png (51.25 KiB) Viewed 3694 times
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: [solved] Workaround for crash with ifc import?

Post by Syres »

thomas-neemann wrote: Tue Jan 04, 2022 8:31 am what can you do to prevent the freecad crashes during import e.g. this ifc file?



923.ifc
To the best of my knowledge I'm using the default IFC Import settings and using the build below, the original file imports error free:

OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of FreeCAD: 64-bit
Version: 0.20.26858 (Git)
Build type: Release
Branch: master
Hash: e209bc706d35121098f9bac779bc6b09c24ddd95
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United Kingdom (en_GB)

Tree:
IFC_Tree.jpg
IFC_Tree.jpg (17.42 KiB) Viewed 3665 times
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: [solved] Workaround for crash with ifc import?

Post by thomas-neemann »

Syres wrote: Tue Jan 04, 2022 9:32 am
To the best of my knowledge I'm using the default IFC Import settings and using the build below, the original file imports error free:
thank you for your cooperation. I also tested it with 0.19-3 and 0.18. apparently it works better on windows than on linux.

Greetings Thomas
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Workaround for crash with ifc import?

Post by thomas-neemann »

next problem (crash by import)

http://openifcmodel.cs.auckland.ac.nz/Model/Details/377



1.png
1.png (294.34 KiB) Viewed 3518 times

OS: Ubuntu 20.04.1 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.26720 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 7bca26e)
Hash: 7bca26e7c14d4d43374ff7e0c8582735b249cbfd
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: German/Germany (de_DE)


OS: Ubuntu 20.04.1 LTS (XFCE/xubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24366 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0f9259c)
Hash: 0f9259cda103ae1824ac16c68ac9b4a0d54b05fc
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: German/Germany (de_DE)
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Workaround for crash with ifc import?

Post by paullee »

thomas-neemann wrote: Tue Jan 04, 2022 8:31 am 923.ifc
Confirmed crash on below AppImages on Fedora and Settings :-

OS: Fedora 34 (Workstation Edition) (GNOME/gnome)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24367 (Git) AppImage
Build type: Release
Branch: (HEAD detached at c403473)
Hash: c4034739c472bf07fab55ca8f9225a52d4b88cf5
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: English/United States (en_US)

OS: Fedora 34 (Workstation Edition) (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.20.26720 (Git)
Build type: Release
Branch: (HEAD detached at 7bca26e)
Hash: 7bca26e7c14d4d43374ff7e0c8582735b249cbfd
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: English/United States (en_US)
Screenshot from 2022-01-08 03-10-49.png
Screenshot from 2022-01-08 03-10-49.png (101.25 KiB) Viewed 3488 times
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Workaround for crash with ifc import?

Post by paullee »

Extract of log in AppImage 26306

Code: Select all

Log: Init:      Initializing /home/paullee/Downloads/FreeCAD_weekly-builds-26306-Linux-Conda_glibc2.12-x86_64/squashfs-root/usr/Mod/Web... done
...
...
Msg: Opening '/home/paullee/Documents/Doc/00_ FreeCAD Test_ COPY/0_ FreeCAD__ Forum/FreeCAD_ thomas-neemann/923.ifc'... Msg: done.
Msg: Building types and relationships table...
Msg: done.
Msg: Parsing 13 BIM objects...
Log: Loading GUI of Part module... done
Msg: 1Msg:  Msg: /Msg:  Msg: 13Msg:  Msg: object #60Msg:  Msg: :Msg:  Msg: IfcWallMsg: Msg:  no layer foundMsg:  Msg: IfcWallMsg: Msg:  (arch)Msg: Err: Program received signal SIGSEGV, Segmentation fault.
Err: #0  /lib64/libc.so.6(+0x3d320) [0x7fb2b4d04320]
Err: #1  0x7fb27b6623f5 in Standard_Transient::DecrementRefCounter() const from /home/paullee/Downloads/FreeCAD_weekly-builds-26306-Linux-Conda_glibc2.12-x86_64/squashfs-root/usr/lib/./libTKernel.so.7+0x5
Err: #2  /home/paullee/Downloads/FreeCAD_weekly-builds-26306-Linux-Conda_glibc2.12-x86_64/squashfs-root/usr/lib/python3.9/site-packages/ifcopenshell/_ifcopenshell_wrapper.so(+0x23d5432) [0x7fb1df5e5432]
Err: #3  /home/paullee/Downloads/FreeCAD_weekly-builds-26306-Linux-Conda_glibc2.12-x86_64/squashfs-root/usr/lib/python3.9/site-packages/ifcopenshell/_ifcopenshell_wrapper.so(+0x23e6a25) [0x7fb1df5f6a25]
Err: #4  /home/paullee/Downloads/FreeCAD_weekly-builds-26306-Linux-Conda_glibc2.12-x86_64/squashfs-root/usr/lib/python3.9/site-packages/ifcopenshell/_ifcopenshell_wrapper.so(+0x23e6b01) [0x7fb1df5f6b01]
Err: #5  0x7fb1dff1d5e0 in vtable for NCollection_BaseMap from /home/paullee/Downloads/FreeCAD_weekly-builds-26306-Linux-Conda_glibc2.12-x86_64/squashfs-root/usr/lib/python3.9/site-packages/ifcopenshell/_ifcopenshell_wrapper.so+0x10
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Workaround for crash with ifc import?

Post by thomas-neemann »

paullee wrote: Fri Jan 07, 2022 7:13 pm ..
Confirmed crash on below AppImages on Fedora and Settings :-
..

thank you for testing




workaround:

works very quickly (in a few minutes)

linux-shell:

Code: Select all

./IfcConvert --no-normals 1.ifc 1.dae
IfcOpenShell IfcConvert 0.6.0b0 (OCC 7.3.0)
Scanning file...
Done scanning file   
Parsing input file took 6 seconds
Creating geometry...
Done creating geometry (16881 objects)                                

Log:
[Error] {2_uJNkuoDEcAk5Hec1nPUQ} Opening subtraction failed for 1 openings
#659652=IfcWallStandardCase('2_uJNkuoDEcAk5Hec1nPUQ',#41,'Basic Wall:_H-BW-1:2272912',$,'Basic Wall:_H-BW-1',#659615,#659650,'2272912')


Conversion took 3 minutes 30 seconds
2.png
2.png (97.02 KiB) Viewed 3446 times
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Workaround for crash with ifc import?

Post by paullee »

thomas-neemann wrote: Fri Jan 07, 2022 8:00 pm workaround:

linux-shell:

Code: Select all

./IfcConvert --no-normals 1.ifc 1.dae
IfcOpenShell IfcConvert 0.6.0b0 (OCC 7.3.0)
Scanning file...
Done scanning file   
Parsing input file took 6 seconds
Creating geometry...
Done creating geometry (16881 objects)                                

Log:
[Error] {2_uJNkuoDEcAk5Hec1nPUQ} Opening subtraction failed for 1 openings
#659652=IfcWallStandardCase('2_uJNkuoDEcAk5Hec1nPUQ',#41,'Basic Wall:_H-BW-1:2272912',$,'Basic Wall:_H-BW-1',#659615,#659650,'2272912')


Conversion took 3 minutes 30 seconds
Cool ! Did you compile the ifcopenshell ? Or some way to use the "built-in" in the AppImage?

Can you report it in the Mantis BugTracker ?

Thanks :)
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Workaround for crash with ifc import?

Post by thomas-neemann »

paullee wrote: Fri Jan 07, 2022 8:15 pm ...Did you compile the ifcopenshell ? Or some way to use the "built-in" in the AppImage?

Can you report it in the Mantis BugTracker ?

...
i can't remember compiling it. i compile very little because i often have problems with it.


I think it's from here

http://ifcopenshell.org/ifcconvert

how do i report it in the bug tracer?

is there an instruction?
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
Post Reply