MantisBT - Community
View Issue Details
0032444Community[OCCT] OCCT:Modeling Algorithmspublic2021-06-16 16:122021-09-14 16:51
Jerome Caucat 
msv 
normalcrash 
newopen 
LinuxUbuntu 20.0464 bit
 
 
0032444: BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine
Using OCCT 7.5.2 with the patch for https://tracker.dev.opencascade.org/view.php?id=29645 [^] and https://tracker.dev.opencascade.org/view.php?id=31147. [^]

When trying to build a pipe with the provided spine, profiles and .tcl file I get a crash in C++ and in DRAW, with the following error in DRAW:

An exception was caught 0x555b1fa4b5c0 : OSD_SIGSEGV: SIGSEGV 'segmentation violation' detected. Address 60

I am using "DT_ShapeDivide" with a tolerance of 0.001 on the spine, "setsweep -DT" and "buildsweep r -C -S".
No tags attached.
related to 0032445new msv BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine 
related to 0032446new msv BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine 
related to 0031041assigned jgv Modeling Algorithms - Crash in BRepOffsetAPI_MakePipeShell 
zip sample.zip (10,476) 2021-06-16 16:12
https://tracker.dev.opencascade.org/
Issue History
2021-06-16 16:12Jerome CaucatNew Issue
2021-06-16 16:12Jerome CaucatAssigned To => msv
2021-06-16 16:12Jerome CaucatFile Added: sample.zip
2021-09-14 16:43Jerome CaucatNote Added: 0104076
2021-09-14 16:50msvRelationship addedrelated to 0032445
2021-09-14 16:51msvRelationship addedrelated to 0032446
2021-09-14 16:51msvRelationship addedrelated to 0031041

Notes
(0104076)
Jerome Caucat   
2021-09-14 16:43   
The problem is still reproduced with OCCT 7.5.3.


In the function BRepFill_TrimShellCorner::ChooseSection in the file src/BRepFill/BRepFill_TrimShellCorner.cxx two edges, FirstEdge and LastEdge, are initialized with the result of the function FindEdgeCloseToBisectorPlane.

But in our case FindEdgeCloseToBisectorPlane fails and LastEdge is null.

LastEdge is then used without being tested for nullity, which causes the crash.


The same problem happens for https://tracker.dev.opencascade.org/view.php?id=32445. [^]

And for https://tracker.dev.opencascade.org/view.php?id=32446 [^] it is FirstEdge that is null.

This bug https://tracker.dev.opencascade.org/view.php?id=31041 [^] is also potentially related.


I suppose a possible fix could be to check that FirstEdge and LastEdge are not null before using them.

But what makes FindEdgeCloseToBisectorPlane fail? It is some criteria of the spine? Can the situation be detected upstream?