InventorLoader icon indicating copy to clipboard operation
InventorLoader copied to clipboard

FreeCad crashes trying to import this file

Open bitingsock opened this issue 1 year ago • 6 comments

Installed from the Addon Manager.

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * InventorLoader 1.3.0
  * sheetmetal 0.2.56

crash.log Fully parametric ball bearing.zip

bitingsock avatar Aug 28 '22 09:08 bitingsock

It's because of an access violation caused by trying to generate a cone surface out of a revoluted line. eg:

import Part V = App.Vector
apex = V(0.0, 0.0, -65.00000000000001) center = V(0.0, 0.0, -26.25) major = V(38.75, 0.0, 0.0) axis = V(0.0, 0.0, -1.0) line = Part.Line(apex, center + major).toShape() line.revolve(center, axis, 360.0)

jmplonka avatar Oct 25 '22 13:10 jmplonka

According to Chris_G, line has to be created not with Part.Line but rather with Part.LineSegment.

jmplonka avatar Oct 25 '22 14:10 jmplonka

Can freecad python interpreter be adjusted to recognize this an output recommended command instead of crashing ?

luzpaz avatar Oct 26 '22 13:10 luzpaz

I've got a similar issue. FreeCad 0.20.1 crashes whenever I try to import the attached *.f3d file.

crash.log

f3d_files.zip The "Holder_v13.f3d" crashes freecad "Front_Rev_1_v9.f3d" doesn't crash freecad, but nothing gets converted.

OS: Windows 10 Version 2009 Word size of FreeCAD: 64-bit Version: 0.20.1.29410 (Git) Build type: Release Branch: releases/FreeCAD-0-20 Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563 Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3 Locale: English/United States (en_US) Installed mods:

  • Dracula 0.0.2
  • InventorLoader 1.3.0

numericOverflow avatar Nov 07 '22 00:11 numericOverflow

@tomate44 do you mind weighing in again ?

Edit: https://github.com/jmplonka/InventorLoader/issues/59#issuecomment-1290668175

luzpaz avatar Apr 02 '23 20:04 luzpaz

It is a OCCT crash that seem to happen here : https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Part/App/TopoShape.cpp#L2579 I tried to put the crashing function into a try/catch block, without luck. A more skilled dev should have a look.

tomate44 avatar Apr 03 '23 08:04 tomate44