[Import] Segmentation fault when import STEP file

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: [Import] Segmentation fault when import STEP file

Post by amrit3701 »

vocx wrote: Fri Aug 21, 2020 8:22 pm I cannot reproduce the crash and my version is very similar to yours. I thought that maybe this could be an issue with OCCT 7.3 or OCCT 7.4 but people have reported success and failure with both.

What are the Import_Export_Preferences for STEP files? In my case, the only checkbox enabled is "Enable STEP Compound merge", but the rest are disabled.
Just confirmed that after changes FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Import/hSTEP").SetBool("ReadShapeCompoundMode", False) preferences, I successfully able to import STEP model on Linux and docker machine.

Thanks @vocx,
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
apaatsio
Posts: 3
Joined: Mon Aug 17, 2020 6:26 pm

Re: [Import] Segmentation fault when import STEP file

Post by apaatsio »

I was looking into the code and I noticed a curiosity. There's a local variable optionReadShapeCompoundMode that is being assigned a value but that value is never used as far as I can tell.

Here's the code where the variable is defined: https://github.com/FreeCAD/FreeCAD/blob ... #L435-L439

This commit seems to remove the part of the code that actually reads the variable: https://github.com/FreeCAD/FreeCAD/comm ... f0b6dfb895

Not sure what's going on there. Ping @wmayer
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Import] Segmentation fault when import STEP file

Post by Kunda1 »

We should open a ticket to not lose track of this issue.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Import] Segmentation fault when import STEP file

Post by Kunda1 »

amrit3701 wrote: Sat Aug 22, 2020 7:52 am
Just confirmed that after changes FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Import/hSTEP").SetBool("ReadShapeCompoundMode", False) preferences, I successfully able to import STEP model on Linux and docker machine.
Do you mind opening a ticket for this ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: [Import] Segmentation fault when import STEP file

Post by amrit3701 »

Kunda1 wrote: Sun Sep 13, 2020 6:53 pm
amrit3701 wrote: Sat Aug 22, 2020 7:52 am
Just confirmed that after changes FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Import/hSTEP").SetBool("ReadShapeCompoundMode", False) preferences, I successfully able to import STEP model on Linux and docker machine.
Do you mind opening a ticket for this ?
Hi @Kunda, I don't think it is an issue. As after setting step importer preferences, issue automatically fixed.
Amritpal Singh
Github, Like my work, sponsor me!
user4574
Posts: 1
Joined: Fri Mar 04, 2022 3:17 pm

Re: [Import] Segmentation fault when import STEP file

Post by user4574 »

I'm still seeing this in the FreeCAD docker CLI. The work around technically works, and I can read in the file. However it imports the assembly as a single component.

Can we reconsider opening a ticket? I'm seeing this in FreeCAD 0.20 and 0.19.
Last edited by user4574 on Fri Mar 04, 2022 9:04 pm, edited 3 times in total.
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: [Import] Segmentation fault when import STEP file

Post by amrit3701 »

user4574 wrote: Fri Mar 04, 2022 3:23 pm I'm still seeing this in the FreeCAD docker CLI. The work around technically works, and I can read in the file. However it imports the assembly as a single component.

Can we reconsider opening a ticket? I'm seeing this in FreeCAD 0.20 and 0.19.
Hi @user4574,

Your username is anonymous. Can you first introduce yourself? 8-)

The https://hub.docker.com/r/amrit3701/freecad-cli docker was compiled 2 years ago. So, the FreeCAD code is outdated in docker. Maybe rebuilding the docker image with the latest FreeCAD code solve the problem.

Also, if possible can you send the STEP file which you are testing?

Cheers!
Amritpal Singh
Github, Like my work, sponsor me!
Post Reply