View Issue Details

IDProjectCategoryView StatusLast Update
0002564FreeCADBugpublic2017-08-28 19:41
ReporterKarenRei Assigned To 
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionunable to reproduce 
PlatformFedora 22 
Product Version0.16 
Target Version0.17 
Summary0002564: Crash in refine shape
DescriptionFreeCAD crashes when doing Refine Shape on this model:

https://drive.google.com/open?id=0B6KWLyPRYMb0Z2F4YXR0N0JacW8

GDB trace:

Program received signal SIGSEGV, Segmentation fault.
BRepTools_ReShape::Replace (this=0xfefdfefdfefd0000, ashape=...,
anewshape=..., oriented=oriented@entry=false)
at /usr/src/debug/oce-OCE-0.16.1/src/BRepTools/BRepTools_ReShape.cxx:146
146 if (myConsiderLocation) {
(gdb) bt
#0 0x00007fff6aca88d9 in BRepTools_ReShape::Replace(TopoDS_Shape const&, TopoDS_Shape const&, bool) (this=0xfefdfefdfefd0000, ashape=..., anewshape=..., oriented=oriented@entry=false)
at /usr/src/debug/oce-OCE-0.16.1/src/BRepTools/BRepTools_ReShape.cxx:146
#1 0x00007fff6c221b22 in ShapeFix_Face::FixSplitFace(TopTools_DataMapOfShapeListOfShape const&) (this=this@entry=0x7fffffff9f90, MapWires=...)
at /usr/src/debug/oce-OCE-0.16.1/src/ShapeFix/ShapeFix_Face.cxx:2264
0000002 0x00007fff6c229973 in ShapeFix_Face::Perform() (this=this@entry=0x7fffffff9f90) at /usr/src/debug/oce-OCE-0.16.1/src/ShapeFix/ShapeFix_Face.cxx:655
0000003 0x00007fff81373bf4 in ModelRefine::FaceUniter::process() (this=this@entry=0x7fffffffa460) at /usr/src/debug/freecad/src/Mod/Part/App/modelRefine.cpp:1098
0000004 0x00007fff813654ee in Part::TopoShape::removeSplitter() const (this=
0x8a64bb0) at /usr/src/debug/freecad/src/Mod/Part/App/TopoShape.cpp:2360
0000005 0x00007fff812c7fec in Part::TopoShapePy::removeSplitter(_object*) (this=0x82aa5e0, args=<optimized out>)
at /usr/src/debug/freecad/src/Mod/Part/App/TopoShapePyImp.cpp:1636
0000006 0x00007fff812c81bc in Part::TopoShapePy::staticCallback_removeSplitter(_object*, _object*) (self=<optimized out>, args=<optimized out>)
at /usr/src/debug/freecad/build/src/Mod/Part/App/TopoShapePy.cpp:4750
0000007 0x00007ffff65e68be in PyEval_EvalFrameEx (oparg=<optimized out>, pp_stack=0x7fffffffa6d0) at /usr/src/debug/Python-2.7.10/Python/ceval.c:4112
0000008 0x00007ffff65e68be in PyEval_EvalFrameEx (f=f@entry=
Frame 0x7fffcc708ad0, for file <string>, line 1, in <module> (), throwflag=throwflag@entry=0) at /usr/src/debug/Python-2.7.10/Python/ceval.c:2755
0000009 0x00007ffff65e76b4 in PyEval_EvalCodeEx (co=co@entry=0x7fffccd968b0, globals=globals@entry=

The model is an imported OBJ from Blender; the original is seamless/waterproof and shouldn't have anything wrong with it. All I did was import and then "Create shape from mesh".
Steps To Reproduce1. Load file.
2. Do refine shape.
3. Wait.

Or, from the .obj:

1. Open it.
2. Shape from mesh
3. Refine shape
4. Wait
Additional InformationOS: "Fedora release 22 (Twenty Two)"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.7680 (Git)
Build type: Unknown
Branch: master
Hash: 966ce79207da593db8a7848e23c82f4d3baad27c
Python version: 2.7.10
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.7.1.oce-0.16
TagsNo tags attached.
FreeCAD Information

Relationships

related to 0002565 closed Infinite (?) loop in "Create shape from mesh" 

Activities

KarenRei

2016-05-28 20:26

reporter  

gh.obj (Attachment missing)

KarenRei

2016-05-28 20:51

reporter   ~0007121

Okay, there seems to be a problem on top of a problem. One, the crash shouldn't occur. Two, it seems to be corrupting the .obj. It loads just fine in blender, but when I zoom in in FreeCAD I can see holes in the model.

Kunda1

2017-01-15 14:22

administrator   ~0007792

Forum thread: http://forum.freecadweb.org/viewtopic.php?f=10&t=19919

normandc

2017-01-15 22:33

manager   ~0007801

Loading the gh2.fcstd file, the Report view lists two errors:

>The mesh data structure has some defects
>Cannot compute Inventor representation for the shape of gh001.

The last one explains why gh001 is not visible in the 3D view.

After importing the original gh.obj mesh in FreeCAD, the Analyze --> Evaluate & Repair mesh tool from the Mesh Design workbench reports more than 10,000 issues of non-manifolds, folds on surfaces and other errors.

I don't know how to evaluate a mesh in Blender, but it looks fine. So it seems the OBJ seems to get corrupted when imported into FreeCAD.

From that point, FreeCAD cannot be expected to produce a valid shape, nor produce a refined shape. But it should not make FreeCAD crash.

Kunda1

2017-02-18 12:06

administrator   ~0008344

@KarenRei please continue the discussion in the forum thread. Thanks

Kunda1

2017-03-14 11:58

administrator   ~0008627

After importing the original gh.obj mesh in FreeCAD, the Analyze --> Evaluate & Repair mesh tool from the Mesh Design workbench reports more than 10,000 issues of non-manifolds, folds on surfaces and other errors.

I don't know how to evaluate a mesh in Blender, but it looks fine. So it seems the OBJ seems to get corrupted when imported into FreeCAD.

From that point, FreeCAD cannot be expected to produce a valid shape, nor produce a refined shape. But it should not make FreeCAD crash.

normandc
@wmayer do you mind weighing in on why FreeCAD crashes here?

Kunda1

2017-03-21 12:35

administrator   ~0008676

@yorik when you get a moment do you mind weighing in on this crash bug?

Kunda1

2017-08-21 10:59

administrator   ~0009973

@chrisb do you mind weighing in?

Kunda1

2017-08-21 19:59

administrator   ~0009983

Last edited: 2017-08-21 20:00

chrisb can't reproduce crash or an issues
per https://forum.freecadweb.org/viewtopic.php?p=187604#p187604

I used Part->RefineShape and OpenSCAD->RefineShape, no crashes here:

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11784 (Git)
Build type: Release
Branch: (detached from d5b554d)
Hash: d5b554d2b6d6e780c9ead67153888f7fe5e140be
Python version: 2.7.13
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)

and
OS: Linux
Word size of FreeCAD: 64-bit
Version: 0.17.11827 (Git)
Build type: None
Branch: master
Hash: ca4488f4387f761df47322038585b23cb5a1bd73
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)

chrisb

Resolving ticket for now.

Kunda1

2017-08-28 19:41

administrator   ~0010035

No response from @KarenRei
Closing.

Issue History

Date Modified Username Field Change
2016-05-28 20:26 KarenRei New Issue
2016-05-28 20:26 KarenRei File Added: gh.obj
2016-05-28 20:51 KarenRei Note Added: 0007121
2017-01-15 14:22 Kunda1 Note Added: 0007792
2017-01-15 22:33 normandc Note Added: 0007801
2017-01-16 02:36 Kunda1 Status new => confirmed
2017-01-17 05:02 Kunda1 Relationship added related to 0002565
2017-02-18 12:06 Kunda1 Note Added: 0008344
2017-02-18 12:07 Kunda1 Target Version => 0.17
2017-03-14 11:58 Kunda1 Note Added: 0008627
2017-03-21 12:35 Kunda1 Note Added: 0008676
2017-08-21 10:59 Kunda1 Note Added: 0009973
2017-08-21 19:59 Kunda1 Status confirmed => resolved
2017-08-21 19:59 Kunda1 Resolution open => unable to reproduce
2017-08-21 19:59 Kunda1 Note Added: 0009983
2017-08-21 20:00 Kunda1 Note Edited: 0009983
2017-08-28 19:41 Kunda1 Note Added: 0010035
2017-08-28 19:41 Kunda1 Status resolved => closed