MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0032444Community[OCCT] OCCT:Modeling Algorithmspublic2021-06-16 16:122021-09-24 19:59
ReporterJerome Caucat 
Assigned Tomsv 
PrioritynormalSeveritycrash 
StatusnewResolutionopen 
PlatformLinuxOSUbuntu 20.04OS Version64 bit
Product Version 
Target VersionFixed in Version 
Summary0032444: BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine
DescriptionUsing 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".
TagsNo tags attached.
Test case number
Attached Fileszip file icon sample.zip (10,476 bytes) 2021-06-16 16:12
patch file icon 0001-Fix-crash-0032444.patch (1,032 bytes) 2021-09-24 15:17

- Relationships
related to 0032445newmsv BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine 
related to 0032446newmsv BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine 
related to 0031041assignedjgv Modeling Algorithms - Crash in BRepOffsetAPI_MakePipeShell 

-  Notes
(0104076)
Jerome Caucat (reporter)
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?
(0104332)
Jerome Caucat (reporter)
2021-09-24 15:17

I added a patch suggestion.
(0104340)
kgv (developer)
2021-09-24 19:43

Jerome, does your patch with NULL-checks allows to produce expected result, or only protects from the crash?
(0104342)
Jerome Caucat (reporter)
2021-09-24 19:59

It only protects from the crash.

I believe the root of the problem is that FindEdgeCloseToBisectorPlane fails. Is it because of the spine?

Is there a way to adapt the tolerance parameter of DT_ShapeDivide to the spine?

- Issue History
Date Modified Username Field Change
2021-06-16 16:12 Jerome Caucat New Issue
2021-06-16 16:12 Jerome Caucat Assigned To => msv
2021-06-16 16:12 Jerome Caucat File Added: sample.zip
2021-09-14 16:43 Jerome Caucat Note Added: 0104076
2021-09-14 16:50 msv Relationship added related to 0032445
2021-09-14 16:51 msv Relationship added related to 0032446
2021-09-14 16:51 msv Relationship added related to 0031041
2021-09-24 15:17 Jerome Caucat File Added: 0001-Fix-crash-0032444.patch
2021-09-24 15:17 Jerome Caucat Note Added: 0104332
2021-09-24 19:43 kgv Note Added: 0104340
2021-09-24 19:59 Jerome Caucat Note Added: 0104342


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker