View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025896 | Community | OCCT:Modeling Algorithms | public | 2015-03-05 16:22 | 2020-10-01 10:38 |
Reporter | Istvan Csanady | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.5.0 | Fixed in Version | 7.5.0 | ||
Summary | 0025896: Modeling Algorithms - UserBreak raising uncatchable exception in boolean operations | ||||
Description | When the parallel flag is true in BOPAlgo_PaveFiller, and the BOPAlgo_Algo::UserBreak() calls are raising Standard_NotImplemented exceptions and the exceptions can not be catched, since they are running from a new thread, and not embedded in try/catch blocks. This prevents the cancellation of boolean operations when running the pave filler parallel. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
Dear Istvan, do you work with OCCT compiled with TBB (HAVE_TBB is defined)? I think you do not, because in HAVE_TBB branch the code has try/catch block (see OSD_Parallel.hxx:268). It is just a question, anyway. |
|
No, I am not using TBB. |
|
Not sure whether it is relevant for this issue, but note that if you use custom signal handlers (e.g. OSD::SetSignal()), on some platforms this works on per-thread basis, thus handlers should be armed separately for each thread. |
|
Patch is attached |
|
Dear Istvan, the attached patch is relevant not to this bug, but rather to "Do not copy plane if Alt is 0.0 in BRepFill_OffsetWire". |
|
patch_parallel.diff (1,041 bytes) |
|
corrected, sorry. |
|
The proposed patch is not perfect. 1. It catches exception in the loop by tasks. It means that if user break event takes place the repetitive try/catch will hit on each iteration and the loop will continue till end. It is better to surround the whole loop into try block. 2. It hides all exceptions. I.e. if some exception not connected with user break takes place then the algorithm will continue working with some task left incomplete. This can lead to unpredictable results. The right way is to implement mechanism that will allow catching exceptions in parallel tasks (i.e. in other threads), stop all other parallel executions (or simply stop scheduling new tasks) and re-throw exception when main thread takes control again. This way is implemented in TBB scheduler. |
|
parallel.diff (4,199 bytes) |
|
I ve uploaded patch that allows to rethrow exceptions from threads. However, it requires C++11 |
|
I believe exception handling should now (since OCCT 7.4.0) work, due to changes made within #30775. Andrey @akaftasev (or @debix56), can you please check this to confirm? |
|
I researched the given problem: in the current version, when the parallel flag is true, and the BOPAlgo_Algo::UserBreak() calls, exception can be catched in another threads and execution stops with message like: "Error: The intersection of the arguments has failed" (this message is displayed when the "bop" operation is stopped) This results were received with using TBB |
|
The same result without TBB |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-03-05 16:22 | Istvan Csanady | New Issue | |
2015-03-05 16:22 | Istvan Csanady | Assigned To | => msv |
2015-03-10 10:28 |
|
Assigned To | msv => azn |
2015-03-10 10:28 |
|
Status | new => assigned |
2015-04-09 16:49 |
|
Note Added: 0039512 | |
2015-04-09 16:49 |
|
Assigned To | azn => Istvan Csanady |
2015-04-09 16:49 |
|
Status | assigned => feedback |
2015-04-09 16:49 |
|
Target Version | 6.9.0 => 7.1.0 |
2015-04-09 16:51 | Istvan Csanady | Note Added: 0039513 | |
2015-04-09 16:54 |
|
Note Added: 0039514 | |
2015-04-09 23:40 |
|
Assigned To | Istvan Csanady => msv |
2015-04-09 23:40 |
|
Status | feedback => assigned |
2015-12-09 17:32 | Istvan Csanady | File Added: patch.diff | |
2015-12-09 17:32 | Istvan Csanady | Note Added: 0048916 | |
2015-12-09 17:54 |
|
Note Added: 0048917 | |
2015-12-09 17:54 |
|
Assigned To | msv => Istvan Csanady |
2015-12-09 17:54 |
|
Status | assigned => feedback |
2015-12-09 18:05 | Istvan Csanady | File Added: patch_parallel.diff | |
2015-12-09 18:05 | Istvan Csanady | Note Added: 0048918 | |
2015-12-09 18:33 |
|
File Deleted: patch.diff | |
2015-12-11 10:42 |
|
Note Added: 0049008 | |
2016-10-26 11:56 |
|
Target Version | 7.1.0 => 7.2.0 |
2017-07-20 17:13 |
|
Target Version | 7.2.0 => 7.3.0 |
2018-02-25 21:09 |
|
Target Version | 7.3.0 => 7.4.0 |
2018-02-25 21:10 |
|
Assigned To | Istvan Csanady => abv |
2018-02-25 21:10 |
|
Status | feedback => assigned |
2018-07-07 23:09 |
|
Relationship added | related to 0029935 |
2019-08-02 12:43 | denix56 | File Added: parallel.diff | |
2019-08-02 12:45 | denix56 | Note Added: 0085983 | |
2019-08-12 17:48 |
|
Target Version | 7.4.0 => 7.5.0 |
2019-09-04 12:22 | kgv | Summary | UserBreak raising uncatchable exception in boolean operations => Modeling Algorithms - UserBreak raising uncatchable exception in boolean operations |
2019-09-04 12:22 | kgv | Relationship added | related to 0025748 |
2019-09-04 12:24 | kgv | Relationship added | related to 0030842 |
2020-09-15 16:30 |
|
Target Version | 7.5.0 => 7.6.0 |
2020-09-23 06:34 |
|
Assigned To | abv => akaftasev |
2020-09-23 06:36 |
|
Note Added: 0095225 | |
2020-09-28 17:43 | akaftasev | Note Added: 0095446 | |
2020-09-28 17:43 | akaftasev | Note Edited: 0095446 | |
2020-09-28 17:43 | akaftasev | Assigned To | akaftasev => abv |
2020-09-28 17:43 | akaftasev | Status | assigned => feedback |
2020-09-28 17:54 | akaftasev | Note Edited: 0095446 | |
2020-09-29 13:14 | akaftasev | Note Added: 0095462 | |
2020-10-01 10:38 |
|
Status | feedback => closed |
2020-10-01 10:38 |
|
Resolution | open => fixed |
2020-10-01 10:38 |
|
Fixed in Version | => 7.5.0 |
2020-10-01 10:38 |
|
Target Version | 7.6.0 => 7.5.0 |