View Issue Details

IDProjectCategoryView StatusLast Update
0033401CommunityOCCT:Modeling Algorithmspublic2023-08-01 14:42
Reporterskbizport Assigned Toskbizport  
PrioritynormalSeveritycrash 
Status newResolutionopen 
PlatformLinuxOSUbuntu 20.04 
Product Version7.7.1 
Target VersionUnscheduled 
Summary0033401: Modeling Algorithms - IntCurvesFace_ShapeIntersector results in a crash when used inside a loop
DescriptionFollowing issue did not happen in 6.9 version.

I have a list of shapes and trying find out intersection of these shapes with a line.

Code structure looks like following
//define the line
gp_Lin line(origin, dir);

//declare the tool
IntCurvesFace_ShapeIntersector tool;

//loop through the shapes. Shapes are either SOLID or COMPOUND shapes

for( int i = 0; i < numShapes; ++i) {
    
    TopoDS_Shape shape = shapes[i];
    
    tool.Load(shape, tolerance);
    tool.PerformNearest(line, 0, RealLast());
    
    if( !tool.IsDone() || tool.NbPnt() == 0) {
          continue;
     }

    //process results
}

Now, sometimes this loop does not terminate and eventually the process crashes. However, If i instantiate IntCurvesFace_ShapeIntersector tool inside the for loop, this issue does not arise. So, Load() call is perhaps not cleaning up prior resources in Destroy() or leaving the tool in a bad state.

This issue is not present in OCCT 6.9. This behavior was observed in 7.7.0 and 7.7.1 as well.
TagsNo tags attached.
Test case number

Activities

akaftasev

2023-08-01 14:42

developer   ~0113818

Dear @skbizport, can you please attach the file?

Issue History

Date Modified Username Field Change
2023-06-01 03:23 skbizport New Issue
2023-06-01 03:23 skbizport Assigned To => oan
2023-06-01 11:35 dpasukhi Assigned To oan => akaftasev
2023-06-01 11:35 dpasukhi Target Version => Unscheduled
2023-06-01 11:35 dpasukhi Summary IntCurvesFace_ShapeIntersector results in a crash when used inside a loop => Modeling Algorithms - IntCurvesFace_ShapeIntersector results in a crash when used inside a loop
2023-06-01 11:35 dpasukhi Description Updated
2023-08-01 14:42 akaftasev Note Added: 0113818
2023-08-01 14:42 akaftasev Assigned To akaftasev => skbizport