Archived issue #0033180
We had a problem calling the OCC library at the customer site, and the program crashed
Description
Because this customer is very important to us, so please help us resolve this problem as soon as possible. The details are as below:
The OCC version is 7.6.0 win64
The program code is:
Part I:
----------------------------------------------------------------------
BRepOffsetAPI_ThruSections ts;
TopoDS_Wire wire1, wire2;
... // create wire1 and wire2. See the Part II for the parameters.
ts.AddWire(wire1);
ts.AddWire(wire2);
ts.Build(); // <--Crashed line.
Part II:
------------------------------------------------------------------------
//wire1 is a circle, the parameters are:
Location point x=1982.5731315010235 y=4275.7651095041720 z=9.8629619492809883
main Direction x=0.0000000000000000 y=0.99999999999999989 z=0.0000000000000000
X Direction x=0.0000000000000000 y=0.0000000000000000 z=0.11429999987165794
//wire2 is a polyline, the parameters are:
1982.5731315010235,4275.7682845041272,9.9771213071771765
1982.5787999289748,4275.7682845041272,9.9771213071771765
1982.5900810211417,4275.7682845041272,9.9759982412286909
1982.6011953705065,4275.7682845041272,9.9737631624170451
1982.6120336335414,4275.7682845041272,9.9704380624719775
1982.6224891918419,4275.7682845041272,9.9660556333490522
1982.6324591844793,4275.7682845041272,9.9606590097376024
1982.6418455284352,4275.7682845041272,9.9543012731500777
1982.6505558889621,4275.7682845041272,9.9470449655481499
1982.6585045688862,4275.7682845041272,9.9389614837595133
1982.6656133812182,4275.7682845041272,9.9301303356119313
1982.6718123787159,4275.7682845041272,9.9206384056039951
1982.6770405929797,4275.7682845041272,9.9105790775247744
1982.6770405929797,4275.7778095039830,9.9105790775247744
1982.6811072223895,4275.7778095039830,9.9004550688692241
1982.6841900604484,4275.7778095039830,9.8899894516893543
1982.6862610309836,4275.7778095039830,9.8792775850721526
1982.6873012512442,4275.7778095039830,9.8684170620866922
1982.6873012512442,4275.7778095039830,9.8575068365760963
1982.6862610309836,4275.7778095039830,9.8466463141866836
1982.6841900604484,4275.7778095039830,9.8359344451852966
1982.6811072223895,4275.7778095039830,9.8254688303896121
1982.6770405929797,4275.7778095039830,9.8153448217340618
1982.6770405929797,4275.7682845041272,9.8153448217340618
1982.6718123787159,4275.7682845041272,9.8052854936548393
1982.6656133812182,4275.7682845041272,9.7957935636469031
1982.6585045688862,4275.7682845041272,9.7869624154993211
1982.6505558889621,4275.7682845041272,9.7788789289423139
1982.6418455284352,4275.7682845041272,9.7716226213403843
1982.6324591844793,4275.7682845041272,9.7652648847528614
1982.6224891918419,4275.7682845041272,9.7598682611414116
1982.6120336335414,4275.7682845041272,9.7554858415552310
1982.6011953705065,4275.7682845041272,9.7521607320734187
1982.5900810211417,4275.7682845041272,9.7499256532617729
1982.5787999289748,4275.7682845041272,9.7488025873132873
1982.5674630730864,4275.7682845041272,9.7488025873132873
1982.5561819809195,4275.7682845041272,9.7499256532617729
1982.5450676315540,4275.7682845041272,9.7521607320734187
1982.5342293685192,4275.7682845041272,9.7554858415552310
1982.5237738102194,4275.7682845041272,9.7598682611414116
1982.5138038175819,4275.7682845041272,9.7652648847528614
1982.5044174736254,4275.7682845041272,9.7716226213403843
1982.4957071130984,4275.7682845041272,9.7788789289423139
1982.4877584331743,4275.7682845041272,9.7869624154993211
1982.4806496208423,4275.7682845041272,9.7957935636469031
1982.4744506233446,4275.7682845041272,9.8052854936548393
1982.4692224090809,4275.7682845041272,9.8153448217340618
1982.4692224090809,4275.7778095039830,9.8153448217340618
1982.4651557796710,4275.7778095039830,9.8254688303896121
1982.4620729416129,4275.7778095039830,9.8359344451852966
1982.4600019710776,4275.7778095039830,9.8466463141866836
1982.4589617508170,4275.7778095039830,9.8575068365760963
1982.4589617508170,4275.7778095039830,9.8684170620866922
1982.4600019710776,4275.7778095039830,9.8792775850721526
1982.4620729416129,4275.7778095039830,9.8899894516893543
1982.4651557796710,4275.7778095039830,9.9004550688692241
1982.4692224090809,4275.7778095039830,9.9105790775247744
1982.4692224090809,4275.7682845041272,9.9105790775247744
1982.4744506233446,4275.7682845041272,9.9206384056039951
1982.4806496208423,4275.7682845041272,9.9301303356119313
1982.4877584331743,4275.7682845041272,9.9389614837595133
1982.4957071130984,4275.7682845041272,9.9470449655481499
1982.5044174736254,4275.7682845041272,9.9543012731500777
1982.5138038175819,4275.7682845041272,9.9606590097376024
1982.5237738102194,4275.7682845041272,9.9660556333490522
1982.5342293685192,4275.7682845041272,9.9704380624719775
1982.5450676315540,4275.7682845041272,9.9737631624170451
1982.5561819809195,4275.7682845041272,9.9759982412286909
1982.5674630730864,4275.7682845041272,9.9771213071771765
1982.5731315010235,4275.7682845041272,9.9771213071771765
The OCC version is 7.6.0 win64
The program code is:
Part I:
----------------------------------------------------------------------
BRepOffsetAPI_ThruSections ts;
TopoDS_Wire wire1, wire2;
... // create wire1 and wire2. See the Part II for the parameters.
ts.AddWire(wire1);
ts.AddWire(wire2);
ts.Build(); // <--Crashed line.
Part II:
------------------------------------------------------------------------
//wire1 is a circle, the parameters are:
Location point x=1982.5731315010235 y=4275.7651095041720 z=9.8629619492809883
main Direction x=0.0000000000000000 y=0.99999999999999989 z=0.0000000000000000
X Direction x=0.0000000000000000 y=0.0000000000000000 z=0.11429999987165794
//wire2 is a polyline, the parameters are:
1982.5731315010235,4275.7682845041272,9.9771213071771765
1982.5787999289748,4275.7682845041272,9.9771213071771765
1982.5900810211417,4275.7682845041272,9.9759982412286909
1982.6011953705065,4275.7682845041272,9.9737631624170451
1982.6120336335414,4275.7682845041272,9.9704380624719775
1982.6224891918419,4275.7682845041272,9.9660556333490522
1982.6324591844793,4275.7682845041272,9.9606590097376024
1982.6418455284352,4275.7682845041272,9.9543012731500777
1982.6505558889621,4275.7682845041272,9.9470449655481499
1982.6585045688862,4275.7682845041272,9.9389614837595133
1982.6656133812182,4275.7682845041272,9.9301303356119313
1982.6718123787159,4275.7682845041272,9.9206384056039951
1982.6770405929797,4275.7682845041272,9.9105790775247744
1982.6770405929797,4275.7778095039830,9.9105790775247744
1982.6811072223895,4275.7778095039830,9.9004550688692241
1982.6841900604484,4275.7778095039830,9.8899894516893543
1982.6862610309836,4275.7778095039830,9.8792775850721526
1982.6873012512442,4275.7778095039830,9.8684170620866922
1982.6873012512442,4275.7778095039830,9.8575068365760963
1982.6862610309836,4275.7778095039830,9.8466463141866836
1982.6841900604484,4275.7778095039830,9.8359344451852966
1982.6811072223895,4275.7778095039830,9.8254688303896121
1982.6770405929797,4275.7778095039830,9.8153448217340618
1982.6770405929797,4275.7682845041272,9.8153448217340618
1982.6718123787159,4275.7682845041272,9.8052854936548393
1982.6656133812182,4275.7682845041272,9.7957935636469031
1982.6585045688862,4275.7682845041272,9.7869624154993211
1982.6505558889621,4275.7682845041272,9.7788789289423139
1982.6418455284352,4275.7682845041272,9.7716226213403843
1982.6324591844793,4275.7682845041272,9.7652648847528614
1982.6224891918419,4275.7682845041272,9.7598682611414116
1982.6120336335414,4275.7682845041272,9.7554858415552310
1982.6011953705065,4275.7682845041272,9.7521607320734187
1982.5900810211417,4275.7682845041272,9.7499256532617729
1982.5787999289748,4275.7682845041272,9.7488025873132873
1982.5674630730864,4275.7682845041272,9.7488025873132873
1982.5561819809195,4275.7682845041272,9.7499256532617729
1982.5450676315540,4275.7682845041272,9.7521607320734187
1982.5342293685192,4275.7682845041272,9.7554858415552310
1982.5237738102194,4275.7682845041272,9.7598682611414116
1982.5138038175819,4275.7682845041272,9.7652648847528614
1982.5044174736254,4275.7682845041272,9.7716226213403843
1982.4957071130984,4275.7682845041272,9.7788789289423139
1982.4877584331743,4275.7682845041272,9.7869624154993211
1982.4806496208423,4275.7682845041272,9.7957935636469031
1982.4744506233446,4275.7682845041272,9.8052854936548393
1982.4692224090809,4275.7682845041272,9.8153448217340618
1982.4692224090809,4275.7778095039830,9.8153448217340618
1982.4651557796710,4275.7778095039830,9.8254688303896121
1982.4620729416129,4275.7778095039830,9.8359344451852966
1982.4600019710776,4275.7778095039830,9.8466463141866836
1982.4589617508170,4275.7778095039830,9.8575068365760963
1982.4589617508170,4275.7778095039830,9.8684170620866922
1982.4600019710776,4275.7778095039830,9.8792775850721526
1982.4620729416129,4275.7778095039830,9.8899894516893543
1982.4651557796710,4275.7778095039830,9.9004550688692241
1982.4692224090809,4275.7778095039830,9.9105790775247744
1982.4692224090809,4275.7682845041272,9.9105790775247744
1982.4744506233446,4275.7682845041272,9.9206384056039951
1982.4806496208423,4275.7682845041272,9.9301303356119313
1982.4877584331743,4275.7682845041272,9.9389614837595133
1982.4957071130984,4275.7682845041272,9.9470449655481499
1982.5044174736254,4275.7682845041272,9.9543012731500777
1982.5138038175819,4275.7682845041272,9.9606590097376024
1982.5237738102194,4275.7682845041272,9.9660556333490522
1982.5342293685192,4275.7682845041272,9.9704380624719775
1982.5450676315540,4275.7682845041272,9.9737631624170451
1982.5561819809195,4275.7682845041272,9.9759982412286909
1982.5674630730864,4275.7682845041272,9.9771213071771765
1982.5731315010235,4275.7682845041272,9.9771213071771765
Steps to reproduce
test bugs modalg_8 bug33180
Public activity
16 archived notes
Participants are labeled by their role within this record.
Reminder sent to: msv
Because this customer is very important to us, so please help us resolve this problem as soon as possible.
Because this customer is very important to us, so please help us resolve this problem as soon as possible.
Commenter 2, in order to speed up the bug processing, please contact OCCT sales using the contact form on the opencascade site.
Please refer to the wires in brep format as attached.
Attachment 1 (BREP) (480 bytes)
Attachment 2 (BREP) (18,400 bytes)
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: Commenter 1
Date: Thu Nov 17 10:25:36 2022 +0300
0033180: We had a problem calling the OCC library at the customer site, and the program crashed
Changed boolean myIsDone to status of the operation BRepFill_CompatibleWiresError.
Changed throw constructions to set of the status and break the function.
[revision removed]
Detailed log of new commits:
Author: Commenter 1
Date: Thu Nov 17 10:25:36 2022 +0300
0033180: We had a problem calling the OCC library at the customer site, and the program crashed
Changed boolean myIsDone to status of the operation BRepFill_CompatibleWiresError.
Changed throw constructions to set of the status and break the function.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: Commenter 1
Date: Fri Nov 18 16:08:26 2022 +0300
Added status for thrusection operations.
[revision removed]
Detailed log of new commits:
Author: Commenter 1
Date: Fri Nov 18 16:08:26 2022 +0300
Added status for thrusection operations.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: Commenter 1
Date: Thu Nov 17 10:25:36 2022 +0300
0033180: We had a problem calling the OCC library at the customer site, and the program crashed
Added status for thrusection operations and changed throw constructions to set of the status and break the function.
[revision removed]
Detailed log of new commits:
Author: Commenter 1
Date: Thu Nov 17 10:25:36 2022 +0300
0033180: We had a problem calling the OCC library at the customer site, and the program crashed
Added status for thrusection operations and changed throw constructions to set of the status and break the function.
Brancg for review:
OCCT - CR33180_1
Results of testing:
http://jenkins-test-occt.nnov.opencascade.com/view/CR33180-master-Commenter 1/view/COMPARE/
OCCT - CR33180_1
Results of testing:
http://jenkins-test-occt.nnov.opencascade.com/view/CR33180-master-Commenter 1/view/COMPARE/
src/BRepFill/BRepFill.hxx
- Please separate enum into a dedicated file, e.g. BRepFill_ErrorStatus or BRepFill_ThruSectionErrorStatus
- Please provide meaningful description to all status codes, otherwise it is unclear for what reason there is at least 4 statuses dealing with profile type - NotClosed, NotOpen, NotSameTopology, ProfilesInconsistent.
src/BRepFill/BRepFill_CompatibleWires.cxx
- In Perform method the status is compared with NotDone status. I think it is better to set the status to Done in the beginning, and work with it. If status is not Done at the end, return it.
src/BRepFill/BRepFill_CompatibleWires.hxx
- Make GetStatus() method inline
src/BRepFill/BRepFill_Generator.cxx
- Please use Standard_Boolean instead of bool
- Same here about Perform method - it is better to set the status OK in the beginning
src/BRepFill/BRepFill_Generator.hxx
- Make GetStatus method inline
src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx
- Are you sure the try-catch should be removed? If it doesn't throw anything now, it might in the future.
- lines 501-505 and 510-514 - check for the status twice. Move this check out of if-else block.
- EdgeToBSpline, TotalSurf methods - instead of Handle(Geom_BSplineCurve)() you may simply return nullptr I think.
- TotalSurf method lines 1229-1232 - where the status might be set to Failed?
src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx
- Make GetStatus method inline
tests/bugs/modalg_6/bug26636
- Message is not informative now. I think draw command has to be adapted to print corresponding error message for the error code.
tests/bugs/modalg_8/bug33180
- What do we expect in the new test case? If it is OK - then we need to check the validity of the result, if not, then we have to report its invalidity and expect it.
In general, I think the whole ErrorStatus approach should be replaced with the Alert system (Message_Alert) which is more flexible and extensible and, by the way, has the messages for the errors on board.
- Please separate enum into a dedicated file, e.g. BRepFill_ErrorStatus or BRepFill_ThruSectionErrorStatus
- Please provide meaningful description to all status codes, otherwise it is unclear for what reason there is at least 4 statuses dealing with profile type - NotClosed, NotOpen, NotSameTopology, ProfilesInconsistent.
src/BRepFill/BRepFill_CompatibleWires.cxx
- In Perform method the status is compared with NotDone status. I think it is better to set the status to Done in the beginning, and work with it. If status is not Done at the end, return it.
src/BRepFill/BRepFill_CompatibleWires.hxx
- Make GetStatus() method inline
src/BRepFill/BRepFill_Generator.cxx
- Please use Standard_Boolean instead of bool
- Same here about Perform method - it is better to set the status OK in the beginning
src/BRepFill/BRepFill_Generator.hxx
- Make GetStatus method inline
src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx
- Are you sure the try-catch should be removed? If it doesn't throw anything now, it might in the future.
- lines 501-505 and 510-514 - check for the status twice. Move this check out of if-else block.
- EdgeToBSpline, TotalSurf methods - instead of Handle(Geom_BSplineCurve)() you may simply return nullptr I think.
- TotalSurf method lines 1229-1232 - where the status might be set to Failed?
src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx
- Make GetStatus method inline
tests/bugs/modalg_6/bug26636
- Message is not informative now. I think draw command has to be adapted to print corresponding error message for the error code.
tests/bugs/modalg_8/bug33180
- What do we expect in the new test case? If it is OK - then we need to check the validity of the result, if not, then we have to report its invalidity and expect it.
In general, I think the whole ErrorStatus approach should be replaced with the Alert system (Message_Alert) which is more flexible and extensible and, by the way, has the messages for the errors on board.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: Commenter 1
Date: Tue Nov 22 15:18:06 2022 +0300
#remarks
[revision removed]
Detailed log of new commits:
Author: Commenter 1
Date: Tue Nov 22 15:18:06 2022 +0300
#remarks
src/BRepFill/BRepFill_CompatibleWires.cxx
- Why new include?
src/BRepFill/BRepFill_CompatibleWires.hxx
- Please add description to new method.
src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx
- lines 511-512 are not necessary.
- does it make sense to set the status to Done in the beginning of the Build method?
- Why new include?
src/BRepFill/BRepFill_CompatibleWires.hxx
- Please add description to new method.
src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx
- lines 511-512 are not necessary.
- does it make sense to set the status to Done in the beginning of the Build method?
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch for review:
OCCT - CR33180
Results of testing:
http://jenkins-test-occt.nnov.opencascade.com/view/CR33180-master-Commenter 1/view/COMPARE/
OCCT - CR33180
Results of testing:
http://jenkins-test-occt.nnov.opencascade.com/view/CR33180-master-Commenter 1/view/COMPARE/
Reviewed. Please integrate CR33180 into OCCT.
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]