View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027259 | Community | OCCT:Modeling Data | public | 2016-03-14 17:50 | 2016-03-29 17:34 |
Reporter | rhplaxis | Assigned To | |||
Priority | normal | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2013 | ||
Product Version | 7.0.0 | ||||
Target Version | 7.0.0 | Fixed in Version | 7.0.0 | ||
Summary | 0027259: crash intersecting simple objects in occ7.0.0rc | ||||
Description | While testing the 7.0.0rc there were several crashes in simple intersections (BOPAlgo_Builder) Strangely complex cases seen to work without a hitch. one of the simplest cases (as reproduced in code below) is a box and two planar surfaces. Not tessellating the box and not using parallellization in BOPAlgo_Builder seem to prevent the bug. (not really a solution we can use) Also the problem only occurred in release mode. the stacktrace: 7fee53b3 +011 TKernel.dll ?SubType@Standard_Type@@QEBAIAEBV?$handle@VStandard_Type@@@opencascade@@@Z 7fee9655 +09f TKBRep.dll ?EmptyCopy@BRep_TEdge@@UEBA?AV?$handle@VTopoDS_TShape@@@opencascade@@XZ 7fee4699 +083 TKBO.dll ?MakeSplitEdge@BOPTools_AlgoTools@@SAXAEBVTopoDS_Edge@@AEBVTopoDS_Vertex@@N1NAEAV2@@Z 7fef1e25 +18d MSVCR120.dll _endthreadex The problem occurred with the VS 2013. 64-bit binaries from http://dev.opencascade.org/index.php?q=node/1151 I am working with VS2013 update 5 on windows 7 (64-bits) | ||||
Steps To Reproduce | #include <gtest/gtest.h> #include <TopoDS_Shape.hxx> #include <BRep_Builder.hxx> #include <BRepTools.hxx> #include <BOPAlgo_Builder.hxx> #include <BRepPrimAPI_MakePrism.hxx> #include <BRepMesh_IncrementalMesh.hxx> #include <BRepBuilderAPI_MakePolygon.hxx> #include <gce_MakePln.hxx> #include <BRepBuilderAPI_MakeFace.hxx> TEST(PlayGround, soilVolume) { //contour 0 0 12 8 auto contour = makePolygonFace({ {0.0, 0.0, -4.0}, {12.0, 0.0, -4.0}, {12.0, 8.0, -4.0}, {0.0, 8.0, -4.0}}); gp_Vec displacement(0.0, 0.0, 5.0); BRepPrimAPI_MakePrism prismMaker(contour, displacement); prismMaker.Build(); if (!prismMaker.IsDone() || prismMaker.Shape().IsNull()) { FAIL(); } // box from z = -4 to 1 auto box = prismMaker.Shape(); // Tessellator::simpleTessellate(box); BRepTools::Clean(box); BRepMesh_IncrementalMesh BRepMesher(box, 0.01, Standard_True, M_PI / 18.0, true); // two surfaces bigger than the box auto top = makePolygonFace({ {-2.0, -2.0, 0.0}, {14.0, -2.0, 0.0}, {14.0, 10.0, 0.0}, {-2.0, 10.0, 0.0}}); auto bottom = makePolygonFace({ {-2.0, -2.0, -3.0}, {14.0, -2.0, -3.0}, {14.0, 10.0, -3.0}, {-2.0, 10.0, -3.0}}); //intersection BOPAlgo_Builder builder; builder.AddArgument(box); builder.AddArgument(top); builder.AddArgument(bottom); builder.SetRunParallel(true); builder.Perform(); } TopoDS_Face makePolygonFace(const std::vector<gp_Pnt> &points) { assert(points.size() >= 3); if (points.size() < 3) { return {}; } BRepBuilderAPI_MakePolygon polygon{}; for (const auto &point: points) { polygon.Add(point); } polygon.Close(); TopoDS_Wire contourWire = polygon.Wire(); if (contourWire.IsNull()) { return {}; } // plane gp_Pln plane = gce_MakePln(points[0], points[1], points[2]); //make face BRepBuilderAPI_MakeFace faceBuilder(plane, contourWire, Standard_True); if (!faceBuilder.IsDone()) { return {}; } TopoDS_Face face = faceBuilder.Face(); if (face.IsNull()) { return {}; } return face; } | ||||
Tags | No tags attached. | ||||
Test case number | |||||
duplicate of | 0027254 | closed | [Regression] 7.0 types initialization mechanism is not thread-safe on VS2013 |
|
The cause of problem is apparently the same as previously reported in 0027254: due to wrong check for capabilities of VS 2013 compiler, OCCT type system turned to be non-thread safe with VS 2013. The fix in branch CR27254 eliminates this problem (tested on the above reproducer). |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-03-14 17:50 | rhplaxis | New Issue | |
2016-03-14 17:50 | rhplaxis | Assigned To | => msv |
2016-03-14 17:56 | rhplaxis | Description Updated | |
2016-03-15 11:21 |
|
Relationship added | duplicate of 0027254 |
2016-03-15 11:24 |
|
Note Added: 0051621 | |
2016-03-15 11:25 |
|
Status | new => resolved |
2016-03-15 11:25 |
|
Target Version | 7.1.0 => 7.0.0 |
2016-03-16 10:31 |
|
Assigned To | msv => abv |
2016-03-29 17:34 |
|
Status | resolved => closed |
2016-03-29 17:34 |
|
Resolution | open => fixed |
2016-03-29 17:34 |
|
Fixed in Version | => 7.0.0 |