View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031147 | Community | OCCT:Modeling Algorithms | public | 2019-11-10 18:26 | 2021-06-11 10:55 |
Reporter | Vico Liang | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.4.0 | ||||
Target Version | 7.6.0 | Fixed in Version | 7.6.0 | ||
Summary | 0031147: Modeling Algorithms - BRepOffsetAPI_MakePipeShell null access | ||||
Description | TopoDS_Wire aSpine = ... ;//"pipeShell-fail.brep" TopoDS_Wire aWire = ... ;//"pipeShell-fail.brep" BRepOffsetAPI_MakePipeShell aMakePipe(aSpine); aMakePipe.Add(aWire, Standard_False, Standard_False); aMakePipe.SetTransitionMode(BRepBuilderAPI_RoundCorner); aMakePipe.SetDiscreteMode(); aMakePipe.SetTolerance(); aMakePipe.Build(); // Null access occurs as below function stacktrace: TKBool.dll!BRepFill_PipeShell::BuildHistory(const BRepFill_Sweep & theSweep) Line 1443 C++ TKBool.dll!BRepFill_PipeShell::Build() Line 795 C++ TKOffset.dll!BRepOffsetAPI_MakePipeShell::Build() Line 259 C++ | ||||
Steps To Reproduce | test pipe bugs bug31147 | ||||
Tags | No tags attached. | ||||
Test case number | pipe/bugs/bug31147 | ||||
|
related to | 0032343 | closed | bugmaster | Community | Modeling Algorithms - Pipe does not represent the profiles' shapes |
related to | 0032376 | new | Community | BRepOffsetAPI_MakePipeShell SIGSEGV | |
related to | 0032377 | new | Community | BRepOffsetAPI_MakePipeShell SIGSEGV | |
related to | 0032434 | new | Community | Modeling Algorithms - BRepOffsetAPI_MakePipeShell fail when using discrete trihedron mode |
|
pipeshell-fail.brep (9,084 bytes) |
|
pipeshell-fail.png (40,653 bytes) |
|
pipeshell-fail-shape.png (14,630 bytes) |
|
I encounter the same problem (Segmentation fault in BRepFill_PipeShell::BuildHistory(BRepFill_Sweep const&)) with the attached spine_28 and profile_28_* and the following c++ code: BRepOffsetAPI_MakePipeShell pipeBuilder(spine); pipeBuilder.SetTransitionMode(BRepBuilderAPI_RightCorner); pipeBuilder.SetDiscreteMode(); for (const auto& profile : profiles) pipeBuilder.Add(profile); pipeBuilder.Build(); // <- Crash pipeBuilder.MakeSolid(); I also experience the crash in DRAW (An exception was caught 0x556a7ad59720 : OSD_SIGSEGV: SIGSEGV 'segmentation violation' detected. Address 8.) with the following code: pload ALL restore /tmp/spine_28.brep s restore /tmp/profile_28_1.brep p1 restore /tmp/profile_28_2.brep p2 restore /tmp/profile_28_3.brep p3 restore /tmp/profile_28_4.brep p4 restore /tmp/profile_28_5.brep p5 restore /tmp/profile_28_6.brep p6 mksweep s setsweep -DT addsweep p1 addsweep p2 addsweep p3 addsweep p4 addsweep p5 addsweep p6 buildsweep r -C -S vdisplay s p1 p2 p3 p4 p5 p6 r vfit Note that if I "invert s" before "mksweep s" in the DRAW code above the crash is gone but the pipe's shape does not represent profiles' shape, it is sort of flattened. - Linux Ubuntu 20.04 64-bit - Version 7.5 |
|
spine_28.brep (29,961 bytes) |
|
profile_28_1.brep (2,267 bytes) |
|
profile_28_2.brep (2,276 bytes) |
|
profile_28_3.brep (1,609 bytes) |
|
profile_28_4.brep (1,529 bytes) |
|
profile_28_5.brep (1,653 bytes) |
|
profile_28_6.brep (1,405 bytes) |
|
I actually exported those files with the latest version of OCE that I used to test if my problem had been fixed, I had not realized that the exported brep would be different, I'll now upload the files exported with the version 7.5.0. |
|
spine_28_7.5.0.brep (29,965 bytes) |
|
profile_28_1_7.5.0.brep (2,271 bytes) |
|
profile_28_2_7.5.0.brep (2,280 bytes) |
|
profile_28_3_7.5.0.brep (1,613 bytes) |
|
profile_28_4_7.5.0.brep (1,533 bytes) |
|
profile_28_5_7.5.0.brep (1,657 bytes) |
|
profile_28_6_7.5.0.brep (1,409 bytes) |
|
Analyze, please the issue and send me WL estimation. |
|
Branch CR31147 has been created by andrey.kaftasev_159541. SHA-1: 7cf12dabd2c1d338cb941c5e9f9779390c750473 Detailed log of new commits: Author: akaftasev Date: Thu Apr 29 13:40:58 2021 +0300 0031147: Modeling Algorithms - BRepOffsetAPI_MakePipeShell null access Changed degmax and segmax for testing |
|
spine_144_CR31147.brep (17,411 bytes) |
|
profile_144_CR31147.brep (2,266 bytes) |
|
Hi, thanks for the progress made. I tried the branch CR31147: - The crash does not happen anymore on the spine/profile_28 files I provided above in https://tracker.dev.opencascade.org/view.php?id=31147#c99331. - However I am still not able to correctly construct the pipe: depending on the options used with setsweep the shape is either not constructed or does not correspond to the profile. This can be reproduced in DRAW using the code I provided in https://tracker.dev.opencascade.org/view.php?id=31147#c99331. - I am experiencing a crash with the files spine_144_CR31147.brep and profile_144_CR31147.brep that I just provided, also reproducible in DRAW: "An exception was caught 0x558bd8dd4b30 : OSD_SIGSEGV: SIGSEGV 'segmentation violation' detected. Address 0". |
|
Dear Jerome Caucat, you can build correct pipe without exceprion from spine_144_CR31147.brep and profile_144_CR31147.brep by using pipe command: pload ALL spine_144_CR31147.brep s restore profile_144_CR31147.brep p pipe r s p vdisplay s p r vfit |
|
Branch CR31147 has been deleted by andrey.kaftasev_159541. SHA-1: 7cf12dabd2c1d338cb941c5e9f9779390c750473 |
|
Branch CR31147 has been created by andrey.kaftasev_159541. SHA-1: 7c6032f170e49e65a648dd5bfdb799e49841ac3e Detailed log of new commits: Author: akaftasev Date: Thu Apr 29 13:40:58 2021 +0300 0031147: Modeling Algorithms - BRepOffsetAPI_MakePipeShell null access Added Draw command 'setsweepparams' to change degmax and segmax parameter manually |
|
Dear akaftasev, > Dear Jerome Caucat, you can build correct pipe without exceprion from spine_144_CR31147.brep and profile_144_CR31147.brep by using pipe command: Ok, but then the pipe is not closed at its ends and is not a solid, I guess I would have to close it myself. BTW for this particular case I am able to construct it using "setsweep -CN 0 0 1", however I don't know how I can programmatically determine what settings should be used (-CN, -DT, etc.), is this doable? If the function did not crash I suppose I could try different settings in case of error. |
|
test_512.zip (4,121 bytes) |
|
Please find in test_512.zip a spine and profiles for which the pipe construction used to crash before the fix. After CR31147 the pipe construction does not crash anymore but the pipe is deformed. |
|
In last version of current fix, you can manually set parameters of approximation for sweep algorithm by Draw command 'setsweepparams': increasing parameters -SM and -DM improves resulting tolerance of approximation, but decreases performance. For shapes, presented in current bug, an increase in parameters -SM and -DM made it possible to build resulting pipe. |
|
Unfortunately, there no method programmatically determine settings to algorithm and need to determine its manually. |
|
Thanks I will try the new DRAW. I cannot change the settings manually for every pipes, the code will have to be generic or automatically adapt its settings... I'll do more testings. |
|
Jerome Caucat, for your case, was created new bug, because problem, described in current bug differs from yours, and will be solved with another fix. You can see your bug by link upper in relationships to current bug. |
|
For information here are the results of my tests with the DRAW from CR31147 and using buildsweep r -C -S: Sample 28: default: pipe is distorted setsweep -FR: fail (not done) setsweep -CF: pipe is distorted setsweep -CN 1 0 0: pipe is distorted setsweep -CN 0 1 0: almost good, pipe is a little distorted setsweep -CN 0 0 1: fail (exception Standard_NullObject) setsweep -DT: fail (exception Standard_NullObject) Sample 144: default: crash setsweep -FR: crash setsweep -CF: crash setsweep -CN 1 0 0: almost good, pipe is a little distorted setsweep -CN 0 1 0: OK, pipe is good setsweep -CN 0 0 1: OK, pipe is good setsweep -DT: crash Sample 512: default: fail (not done) setsweep -FR: fail (exception Standard_NullObject) setsweep -CF: fail (not done) setsweep -CN 1 0 0: pipe is distorted setsweep -CN 0 1 0: almost good, pipe is a little distorted setsweep -CN 0 0 1: fail (not done) setsweep -DT: pipe is distorted Concerning setsweepparams: I tried several combinations of -SM [0;5000] and -DM [1;14] with the sample 28 and the default setsweep but I could not find one that worked, it either fails with "not done" or result in a distorted shape. |
|
Branch for review: OCCT - CR31147 |
|
Results of testing: http://jenkins-test-occt/view/CR31147-master-akaftasev/view/COMPARE/ |
|
akaftasev, are there any test cases were forgotten to be pushed to branch? I see new command on the patch, but not any test using it By the way - are existing commands really cannot be extended with necessary parameters to avoid creating new one? New command doesn't validate input parameters and ignores unknown parameters, which contradicts to recommended Draw Harness command behavior. Please also move command help to command registration instead of obsolete style 'please run command without arguments'. |
|
Dear Andrey, Kirill is right: please, do the following: 1. Rebase your branch on current master. 2. Modify existing Draw command "setsweep" instead of creating new command. 3. Add test case: soon I will add the input shape to database with the name bug31147.brep. |
|
Branch CR31147_1 has been created by andrey.kaftasev_159541. SHA-1: 8bde94d2ce591ebcb9aee9afa345f3b25fbbb22c Detailed log of new commits: Author: akaftasev Date: Thu Apr 29 13:40:58 2021 +0300 0031147: Modeling Algorithms - BRepOffsetAPI_MakePipeShell null access Added to Draw command 'setsweep ' posibility to change degmax and segmax parameter manually by '-SM' and '-DM' options Added test |
|
test_101.zip (8,005 bytes) |
|
For information I still experience a crash (Segmentation fault in BRepFill_PipeShell::BuildHistory) for the provided sample 144 (profile/spine_144_CR31147) and the newly added sample 101 (test_101.zip). |
|
Branch CR31147_1 has been updated forcibly by andrey.kaftasev_159541. SHA-1: 0a010671fc62a92c1fd6f5c904b14215e805608e |
|
Branch CR31147_1 has been updated forcibly by andrey.kaftasev_159541. SHA-1: a3bc100fbd2b8c5cc4a9c84ed22942e1daac132f |
|
Andrey, even if changing input parameters helps constructing the pipe, it is not OK to allow NULL dereference in case of unfortunate algorithm parameters - please also add necessary NULL checks to the algorithm (cannot say if it should be done at BRepFill_PipeShell::BuildHistory() where crash occurs or somewhere earlier, as I'm not familiar with this code) - instead algorithm should report failure (if it provides such interface) or explicitly raise another exception. |
|
Andrey, please also add call of the command "errorsweep" in the test case after "buildsweep" - to check the error of approximation. |
|
Branch CR31147_1 has been updated by andrey.kaftasev_159541. SHA-1: 86ef102a009c0147a7ee0d2d9267aad348d3a1fb Detailed log of new commits: Author: akaftasev Date: Tue May 11 20:04:34 2021 +0300 Added new condition to prevent crash |
|
test_177.zip (3,925 bytes) |
|
test_951.zip (3,499 bytes) |
|
test_8879.zip (3,664 bytes) |
|
Hi, I just tested the latest commit, the crash is now fixed for the samples 144 and 101, thanks. I added three other samples still presenting a crash: - test_177.zip - test_951.zip - test_8879.zip I am using the branch CR31147_1 with CR29645 merged and the -DT/SetDiscreteMode() option. |
|
Branch CR31147_1 has been updated forcibly by andrey.kaftasev_159541. SHA-1: f822e2a694df7730aba94b3b06c0e46dc670e2b6 |
|
Andrey,+ if (aVshape.TShape().IsNull()) TopoDS_Shape class has TopoDS_Shape::IsNull() method - no need to access TShape(). |
|
Branch CR31147_1 has been updated forcibly by andrey.kaftasev_159541. SHA-1: 99bb529550ede446ce617828b7818c208122d3a7 |
|
Please correct usage of command "errorsweep" in test case |
|
Branch CR31147_1 has been updated forcibly by andrey.kaftasev_159541. SHA-1: 6dec9879f4356383d780b880f2ab227a76ac79ba |
|
Reviewed. Branches for integration: OCCT – CR31147_1 Products – NOT |
|
Combination - OCCT branch : IR-2021-05-14 master SHA - d1b8120b699dfa46c9899f70430ec45a0c4e4a95 a87b7ddc8cb44606b91e3f37113847c3f5f50fdc Products branch : IR-2021-05-14 SHA - c56cdc236ba39874bae48cf231ece00c0876d871 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: 17874.080000000333 / 17899.800000000352 [-0.14%] Products Total CPU difference: 11557.880000000083 / 11563.54000000011 [-0.05%] Windows-64-VC14: OCCT Total CPU difference: 19394.921875 / 19369.625 [+0.13%] Products Total CPU difference: 12880.234375 / 12896.03125 [-0.12%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR31147_1 has been deleted by inv. SHA-1: 6dec9879f4356383d780b880f2ab227a76ac79ba |
|
Branch CR31147 has been deleted by inv. SHA-1: 7c6032f170e49e65a648dd5bfdb799e49841ac3e |
occt: master 8d52a74d 2021-04-29 10:40:58 Committer: bugmaster Details Diff |
0031147: Modeling Algorithms - BRepOffsetAPI_MakePipeShell null access Added to Draw command 'setsweep ' posibility to change degmax and segmax parameter manually by '-SM' and '-DM' options Added test Added new condition to prevent crash |
Affected Issues 0031147 |
|
mod - src/BRepFill/BRepFill_PipeShell.cxx | Diff File | ||
mod - src/BRepTest/BRepTest_SweepCommands.cxx | Diff File | ||
add - tests/pipe/bugs/bug31147 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-11-10 18:26 | Vico Liang | New Issue | |
2019-11-10 18:26 | Vico Liang | Assigned To | => msv |
2019-11-10 18:26 | Vico Liang | File Added: pipeshell-fail.brep | |
2019-11-10 18:26 | Vico Liang | File Added: pipeshell-fail.png | |
2019-11-10 18:27 | Vico Liang | File Added: pipeshell-fail-shape.png | |
2019-12-17 13:29 | kgv | Summary | BRepOffsetAPI_MakePipeShell null access => Modeling Algorithms - BRepOffsetAPI_MakePipeShell null access |
2020-09-15 12:47 |
|
Target Version | 7.5.0 => 7.6.0 |
2021-03-03 12:23 | Jerome Caucat | Note Added: 0099331 | |
2021-03-03 12:24 | Jerome Caucat | File Added: spine_28.brep | |
2021-03-03 12:24 | Jerome Caucat | File Added: profile_28_1.brep | |
2021-03-03 12:24 | Jerome Caucat | File Added: profile_28_2.brep | |
2021-03-03 12:24 | Jerome Caucat | File Added: profile_28_3.brep | |
2021-03-03 12:25 | Jerome Caucat | File Added: profile_28_4.brep | |
2021-03-03 12:25 | Jerome Caucat | File Added: profile_28_5.brep | |
2021-03-03 12:25 | Jerome Caucat | File Added: profile_28_6.brep | |
2021-03-15 16:56 | Jerome Caucat | Note Added: 0099528 | |
2021-03-15 16:59 | Jerome Caucat | File Added: spine_28_7.5.0.brep | |
2021-03-15 16:59 | Jerome Caucat | File Added: profile_28_1_7.5.0.brep | |
2021-03-15 16:59 | Jerome Caucat | File Added: profile_28_2_7.5.0.brep | |
2021-03-15 16:59 | Jerome Caucat | File Added: profile_28_3_7.5.0.brep | |
2021-03-15 16:59 | Jerome Caucat | File Added: profile_28_4_7.5.0.brep | |
2021-03-15 17:00 | Jerome Caucat | File Added: profile_28_5_7.5.0.brep | |
2021-03-15 17:00 | Jerome Caucat | File Added: profile_28_6_7.5.0.brep | |
2021-04-27 17:20 |
|
Note Added: 0100617 | |
2021-04-27 17:20 |
|
Assigned To | msv => akaftasev |
2021-04-27 17:20 |
|
Status | new => assigned |
2021-04-27 17:22 |
|
Note Edited: 0100617 | |
2021-04-29 13:42 | git | Note Added: 0100663 | |
2021-04-30 10:40 | Jerome Caucat | File Added: spine_144_CR31147.brep | |
2021-04-30 10:40 | Jerome Caucat | File Added: profile_144_CR31147.brep | |
2021-04-30 10:41 | Jerome Caucat | Note Added: 0100685 | |
2021-04-30 12:56 | akaftasev | Note Added: 0100694 | |
2021-04-30 13:09 | git | Note Added: 0100696 | |
2021-04-30 13:10 | git | Note Added: 0100697 | |
2021-04-30 13:40 | Jerome Caucat | Note Added: 0100698 | |
2021-04-30 16:21 | Jerome Caucat | File Added: test_512.zip | |
2021-04-30 16:21 | Jerome Caucat | Note Added: 0100702 | |
2021-04-30 18:13 | akaftasev | Note Added: 0100705 | |
2021-04-30 18:19 | akaftasev | Note Added: 0100706 | |
2021-04-30 18:27 | Jerome Caucat | Note Added: 0100707 | |
2021-04-30 18:35 | akaftasev | Relationship added | related to 0032343 |
2021-04-30 18:42 | akaftasev | Note Added: 0100708 | |
2021-05-04 12:55 | Jerome Caucat | Note Added: 0100753 | |
2021-05-04 13:16 | Jerome Caucat | Note Edited: 0100753 | |
2021-05-04 13:51 | akaftasev | Assigned To | akaftasev => jgv |
2021-05-04 13:51 | akaftasev | Status | assigned => resolved |
2021-05-04 13:51 | akaftasev | Steps to Reproduce Updated | |
2021-05-04 14:03 | akaftasev | Note Added: 0100758 | |
2021-05-04 14:03 | akaftasev | Note Added: 0100759 | |
2021-05-05 13:56 | kgv | Note Added: 0100780 | |
2021-05-05 13:58 | kgv | Note Edited: 0100780 | |
2021-05-05 15:31 |
|
Note Added: 0100782 | |
2021-05-05 15:31 |
|
Status | resolved => assigned |
2021-05-05 15:31 |
|
Assigned To | jgv => akaftasev |
2021-05-06 10:40 | git | Note Added: 0100793 | |
2021-05-06 13:34 | Jerome Caucat | File Added: test_101.zip | |
2021-05-06 13:34 | Jerome Caucat | Note Added: 0100795 | |
2021-05-06 19:47 | git | Note Added: 0100804 | |
2021-05-07 10:14 | git | Note Added: 0100807 | |
2021-05-07 13:17 | akaftasev | Assigned To | akaftasev => jgv |
2021-05-07 13:17 | akaftasev | Status | assigned => resolved |
2021-05-07 13:17 | akaftasev | Steps to Reproduce Updated | |
2021-05-11 10:40 | kgv | Note Added: 0100867 | |
2021-05-11 11:25 |
|
Note Added: 0100871 | |
2021-05-11 11:25 |
|
Assigned To | jgv => akaftasev |
2021-05-11 11:25 |
|
Status | resolved => assigned |
2021-05-11 20:04 | git | Note Added: 0100891 | |
2021-05-12 10:04 | Jerome Caucat | File Added: test_177.zip | |
2021-05-12 10:04 | Jerome Caucat | File Added: test_951.zip | |
2021-05-12 10:04 | Jerome Caucat | File Added: test_8879.zip | |
2021-05-12 10:05 | Jerome Caucat | Note Added: 0100910 | |
2021-05-13 11:12 | git | Note Added: 0100934 | |
2021-05-13 11:13 | akaftasev | Assigned To | akaftasev => jgv |
2021-05-13 11:13 | akaftasev | Status | assigned => resolved |
2021-05-13 11:21 | kgv | Note Added: 0100935 | |
2021-05-13 11:37 | git | Note Added: 0100938 | |
2021-05-13 14:01 |
|
Note Added: 0100945 | |
2021-05-13 14:01 |
|
Assigned To | jgv => akaftasev |
2021-05-13 14:01 |
|
Status | resolved => assigned |
2021-05-13 14:04 | git | Note Added: 0100946 | |
2021-05-13 14:05 | akaftasev | Assigned To | akaftasev => jgv |
2021-05-13 14:05 | akaftasev | Status | assigned => resolved |
2021-05-14 11:12 |
|
Note Added: 0100985 | |
2021-05-14 11:12 |
|
Assigned To | jgv => akaftasev |
2021-05-14 11:12 |
|
Status | resolved => assigned |
2021-05-14 11:12 |
|
Assigned To | akaftasev => msv |
2021-05-14 11:12 |
|
Status | assigned => resolved |
2021-05-14 11:12 |
|
Assigned To | msv => bugmaster |
2021-05-14 11:12 |
|
Status | resolved => reviewed |
2021-05-15 14:02 | bugmaster | Note Added: 0101018 | |
2021-05-15 14:02 | bugmaster | Status | reviewed => tested |
2021-05-15 14:09 | bugmaster | Test case number | => pipe/bugs/bug31147 |
2021-05-15 14:16 | bugmaster | Changeset attached | => occt master 8d52a74d |
2021-05-15 14:16 | bugmaster | Status | tested => verified |
2021-05-15 14:16 | bugmaster | Resolution | open => fixed |
2021-05-15 15:34 | git | Note Added: 0101027 | |
2021-05-15 15:34 | git | Note Added: 0101038 | |
2021-05-17 16:17 | kgv | Relationship added | related to 0032376 |
2021-05-17 16:17 | kgv | Relationship added | related to 0032377 |
2021-06-11 10:55 | kgv | Relationship added | related to 0032434 |