View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032444 | Community | OCCT:Modeling Algorithms | public | 2021-06-16 16:12 | 2024-10-20 18:19 |
Reporter | Jerome Caucat | Assigned To | |||
Priority | normal | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Ubuntu 20.04 | ||
Target Version | 7.6.0 | Fixed in Version | 7.6.0 | ||
Summary | 0032444: BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine | ||||
Description | 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". | ||||
Steps To Reproduce | test bugs modalg_7 bug32444 | ||||
Tags | No tags attached. | ||||
Test case number | bugs modalg_7 bug32444 | ||||
related to | 0032445 | closed | akaftasev | BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine |
related to | 0032446 | closed | akaftasev | BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine |
related to | 0031041 | resolved | dpasukhi | Modeling Algorithms - Crash in BRepOffsetAPI_MakePipeShell |
has duplicate | 0032588 | closed | bugmaster | BRepOffsetAPI_MakePipeShell::Build() crash in BOPDS_DS::Paves (Segmentation fault) |
|
sample.zip (10,476 bytes) |
|
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? |
|
0001-Fix-crash-0032444.patch (1,032 bytes) |
|
I added a patch suggestion. |
|
Jerome, does your patch with NULL-checks allows to produce expected result, or only protects from the crash? |
|
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? |
|
Screenshot.png (10,216 bytes) |
|
Dear Jerome Caucat, on attached profiles and spine you can recieve correct result, when do not use '-C' or '-R' parameters in 'buildsweep' command (resulting shape you can see on the attached Screenshot.png) |
|
I also attach script to recieve result on Screenshot.png |
|
test_DT.tcl (403 bytes) |
|
Dear akaftasev, thank you for your feedback. Not using the '-C' or '-R' parameters in 'buildsweep' only works properly if enough profiles are given according to the spine, otherwise the pipe may be distorted. So in order to apply this in a generic pipe making function, I will have to detect situations when this is applicable. Regarding the crash, do you plan on releasing a fix? |
|
Dear Jerome, Could you confirm that the proposed solution doesn't cover your case and you ask estimation for the case with parameter "-C". Thanks. |
|
Branch CR32444 has been created by andrey.kaftasev_159541. SHA-1: 16514cd84731295e2ba55d44b7143c19046de006 Detailed log of new commits: Author: akaftasev Date: Wed Oct 20 12:38:16 2021 +0300 0032444: Modeling Algorithm - BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine Added checking for null edges in BRepFill_TrimShellCorner::ChooseSection() |
|
Branch CR32444_1 has been created by andrey.kaftasev_159541. SHA-1: 08b460a5ca5cb54691618bd21873dbb8a60cb9ea Detailed log of new commits: Author: akaftasev Date: Wed Oct 20 13:02:09 2021 +0300 0032444: Modeling Algorithm - BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine Added checking for null edges in BRepFill_TrimShellCorner::ChooseSection() |
|
Dear Jerome Caucat, we have tested your attached patch. We confirm that it fixes the crash, but the shape is still not valid. Nevertheless we may integrate it to version 7.6.0 (coming soon) if you have not objections. Confirm it, please. Anyway, with the ā-Cā parameter, the problem lies in the intersection of parts of the resulting shape and their trimming. Most likely, the potential patch 0032447 may fix these bugs. It may be confirmed after patch implementation only. |
|
Dear akaftasev, I have no objections, please use my patch if its fix is correct. |
|
Branch CR32444_1 has been updated forcibly by andrey.kaftasev_159541. SHA-1: d83c8ad365cadbe87003765460a77a337dae650c |
|
Branch for review: OCCT - CR32444_1 Results of testing: http://jenkins-test-occt.nnov.opencascade.com/view/CR32444-master-akaftasev/view/COMPARE/ |
|
Reviewed. Branches for integration: OCCT ā CR32444_1 Products ā NOT |
|
Combination - OCCT branch : OCCT-760 master SHA - 0d186a91c07a6217cd132ec7ea03f1e6f7a2a9ce 49e51745631c52b6c452c65adae4d6dfa21a1b1e Products branch : OCCT-760 SHA - c472aa8da77ba932a88c890c58c81b09f9ae00b5 was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Debian80-64: OCCT Total CPU difference: 17728.310000000427 / 17750.15000000046 [-0.12%] Products Total CPU difference: 11578.090000000113 / 11624.980000000118 [-0.40%] Windows-64-VC14: OCCT Total CPU difference: 19746.84375 / 19683.796875 [+0.32%] Products Total CPU difference: 12740.0 / 10994.3125 [+15.88%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR32444 has been deleted by mnt. SHA-1: 16514cd84731295e2ba55d44b7143c19046de006 |
|
Branch CR32444_1 has been deleted by mnt. SHA-1: d83c8ad365cadbe87003765460a77a337dae650c |
occt: master 0c4931e8 2021-10-20 10:02:09 Committer: |
0032444: Modeling Algorithm - BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine Added checking for null edges in BRepFill_TrimShellCorner::ChooseSection() |
Affected Issues 0032444 |
|
mod - src/BRepFill/BRepFill_TrimShellCorner.cxx | Diff File | ||
add - tests/bugs/modalg_7/bug32444 | Diff File |
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 |
|
Relationship added | related to 0032445 |
2021-09-14 16:51 |
|
Relationship added | related to 0032446 |
2021-09-14 16:51 |
|
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 | |
2021-10-14 15:42 | akaftasev | File Added: Screenshot.png | |
2021-10-14 15:49 | akaftasev | Note Added: 0104637 | |
2021-10-14 15:49 | akaftasev | Assigned To | msv => Jerome Caucat |
2021-10-14 15:49 | akaftasev | Status | new => feedback |
2021-10-14 16:28 | akaftasev | Note Added: 0104640 | |
2021-10-14 16:29 | akaftasev | File Added: test_DT.tcl | |
2021-10-14 17:45 |
|
Note Edited: 0104637 | |
2021-10-15 12:06 | Jerome Caucat | Note Added: 0104647 | |
2021-10-15 17:23 |
|
Note Added: 0104654 | |
2021-10-20 12:39 | git | Note Added: 0104760 | |
2021-10-20 13:02 | git | Note Added: 0104761 | |
2021-10-22 10:35 | akaftasev | Note Added: 0104785 | |
2021-10-22 12:00 | Jerome Caucat | Note Added: 0104786 | |
2021-10-26 15:46 | git | Note Added: 0104879 | |
2021-10-27 11:07 | akaftasev | Note Added: 0104893 | |
2021-10-27 11:07 | akaftasev | Assigned To | Jerome Caucat => jgv |
2021-10-27 11:07 | akaftasev | Status | feedback => resolved |
2021-10-27 11:07 | akaftasev | Steps to Reproduce Updated | |
2021-10-29 16:50 | akaftasev | Test case number | => bugs modalg_7 bug32444 |
2021-10-29 16:54 |
|
Note Added: 0104966 | |
2021-10-29 16:54 |
|
Assigned To | jgv => bugmaster |
2021-10-29 16:54 |
|
Status | resolved => reviewed |
2021-10-29 17:16 | bugmaster | Target Version | => 7.6.0 |
2021-10-30 11:21 |
|
Note Added: 0104980 | |
2021-10-30 11:21 |
|
Status | reviewed => tested |
2021-11-02 17:57 |
|
Changeset attached | => occt master 0c4931e8 |
2021-11-02 17:57 |
|
Assigned To | bugmaster => smoskvin |
2021-11-02 17:57 |
|
Status | tested => verified |
2021-11-02 17:57 |
|
Resolution | open => fixed |
2021-11-02 21:09 | git | Note Added: 0105019 | |
2021-11-02 21:09 | git | Note Added: 0105020 | |
2024-10-20 18:19 | dpasukhi | Relationship added | has duplicate 0032588 |