View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026061 | Community | OCCT:Application Framework | public | 2015-04-12 17:52 | 2015-05-14 16:35 |
Reporter | Vico Liang | Assigned To | bugmaster | ||
Priority | normal | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2013 | ||
Target Version | 6.9.0 | Fixed in Version | 6.9.0 | ||
Summary | 0026061: TNaming_Selector crash in select method. | ||||
Description | > TKCAF.dll!TNaming_Localizer::Ancestors(const TopoDS_Shape & In, const TopAbs_ShapeEnum TS) Line 255 C++ TKCAF.dll!TNaming_Localizer::FindNeighbourg(const TopoDS_Shape & Sol, const TopoDS_Shape & S, TopTools_MapOfShape & Neighbourg) Line 553 C++ TKCAF.dll!Filter(const TDF_Label & F, TNaming_Scope & MDF, const TopoDS_Shape & S, const TopoDS_Shape & Context, TNaming_Localizer & Localizer, Handle_TNaming_NamedShape & NS, const int Lev) Line 687 C++ TKCAF.dll!BuildName(const TDF_Label & F, TNaming_Scope & MDF, const TopoDS_Shape & Selection, const TopoDS_Shape & Context, const Handle_TNaming_NamedShape & Stop, const unsigned int Geom) Line 1132 C++ TKCAF.dll!BuildNameInNS(const TDF_Label & F, TNaming_Scope & MDF, const TopoDS_Shape & S, const Handle_TNaming_NamedShape & Context, const Handle_TNaming_NamedShape & Stop, const unsigned int Geometry) Line 944 C++ TKCAF.dll!BuildName(const TDF_Label & F, TNaming_Scope & MDF, const TopoDS_Shape & Selection, const TopoDS_Shape & Context, const Handle_TNaming_NamedShape & Stop, const unsigned int Geom) Line 1049 C++ TKCAF.dll!BuildName(const TDF_Label & F, TNaming_Scope & MDF, const TopoDS_Shape & Selection, const TopoDS_Shape & Context, const Handle_TNaming_NamedShape & Stop, const unsigned int Geom) Line 1051 C++ TKCAF.dll!TNaming_Naming::Name(const TDF_Label & F, const TopoDS_Shape & S, const TopoDS_Shape & Context, const unsigned int Geom, const unsigned int KeepOrientation, const unsigned int BNProblem) Line 1834 C++ TKCAF.dll!TNaming_Selector::Select(const TopoDS_Shape & Selection, const TopoDS_Shape & Context, const unsigned int Geometry, const unsigned int KeepOrientation) Line 368 C++ TKCAF.dll!TNaming_Selector::Select(const TopoDS_Shape & Selection, const unsigned int Geometry, const unsigned int KeepOrientation) Line 422 C++ | ||||
Steps To Reproduce | void BugReproduce(const TDF_Label& theLabel) { gp_Pln aPlane(gp::Origin(), gp::DZ()); BRepBuilderAPI_MakeFace aMF(aPlane, -10, 10, -10, 10); TopoDS_Shape aFace = aMF.Shape(); TDF_Label aFaceLabel = theLabel.FindChild(900, Standard_True); TNaming_Builder aFaceBuilder(aFaceLabel); aFaceBuilder.Generated(aFace); gp_Trsf aMirrorTrsf; aMirrorTrsf.SetMirror(gp_Ax2(gp_Pnt(0, 0, 10), gp::DZ())); BRepBuilderAPI_Transform aMakeMirror(aFace, aMirrorTrsf, Standard_False); TopoDS_Shape aFaceMirror = aMakeMirror.Shape(); TDF_Label aFaceMirrorLabel = theLabel.FindChild(901, Standard_True); TNaming_Builder aFaceMirrorBuilder(aFaceMirrorLabel); aFaceMirrorBuilder.Generated(aFace, aFaceMirror); gp_Trsf aTranslateTrsf; aTranslateTrsf.SetTranslation(gp_Vec(0, 0, -5.0)); BRepBuilderAPI_Transform aMakeTranslate(aFace, aTranslateTrsf, Standard_False); TopoDS_Shape aFaceTranslate = aMakeTranslate.Shape(); TDF_Label aFaceTranslateLabel = theLabel.FindChild(902, Standard_True); TNaming_Builder aFaceTranslateBuilder(aFaceTranslateLabel); aFaceTranslateBuilder.Modify(aFace, aFaceTranslate); BRepBuilderAPI_Transform aFaceMirrorTranslate(aFaceMirror, aTranslateTrsf, Standard_False); TopoDS_Shape aFaceMirrorTranslateShape = aFaceMirrorTranslate.Shape(); TDF_Label aFaceMirrorTranslateLabel = theLabel.FindChild(903, Standard_True); TNaming_Builder aFaceMirrorTranslateBuilder(aFaceMirrorTranslateLabel); aFaceMirrorTranslateBuilder.Modify(aFaceMirror, aFaceMirrorTranslateShape); TDF_Label aFaceMirrorSelectLabel = theLabel.FindChild(904, Standard_True); TNaming_Selector aSeletor(aFaceMirrorSelectLabel); aSeletor.Select(aFaceMirrorTranslateShape); } | ||||
Tags | No tags attached. | ||||
Test case number | bugs caf(016) bug26061 | ||||
|
Hi ABV, I dare to ask why is this issue unscheduled? It is a normal workflow to use the naming mechnism in OCAF. The workflow to reproduce this issue is to create a primitive rectangle and then make a duplicate mirror from that rectangle, after that translate the rectangle and its mirror duplication. Finally Select the mirror duplication rectangle will cause crash. If this issue won't be resolved, it's impossible to use the naming mechinsm of OCCT. What a pity. OCCT naming mechnism is so powerful but there is no body pay attention to it including OCCT team. Best Regards, Vico |
|
Hello Vico Liang, Target Version could not be 6.8.0 since that version has been already released, and issue with wrong target version may fall out of the consideration when we review the issues. That is why I changed it. I let Sergey to decide on more appropriate target version. |
|
Hi ABV, Thanks for your answer and considering my thought. It's fine to change the target version according to Sergey's schedule. It would be appriciated if this issue can be resolved in 6.9.0. Regards, Vico |
|
Branch CR26061 has been created by szy. SHA-1: 7cb6fb64c00a2d7a35c2221ccad366fc00566795 Detailed log of new commits: Author: szy Date: Tue Apr 14 18:26:32 2015 +0300 TNaming_Selector crash in select method. Removed obsolete method with single argument. |
|
The reason of the exception is obsolete method with one argument => TNaming_Selector::Select(theSelection). In fact this method is 'relict' kept because really it was never used during years and it should be removed immediately it is not compatible with current algorithm. The API supposed to be used: TNaming_Selector::Select(theSelection, theContext), where 'theSelection' is sub-shape and 'theContext' is a main shape containing the specified sub-shape to be selected. |
|
Any additional test case is not needed. |
|
After removing the obsolte Select method, the exception stack frame is no much different. TKCAF.dll!TNaming_Localizer::Ancestors(const TopoDS_Shape & In, const TopAbs_ShapeEnum TS) Line 255 C++ TKCAF.dll!TNaming_Localizer::FindNeighbourg(const TopoDS_Shape & Sol, const TopoDS_Shape & S, TopTools_MapOfShape & Neighbourg) Line 553 C++ TKCAF.dll!Filter(const TDF_Label & F, TNaming_Scope & MDF, const TopoDS_Shape & S, const TopoDS_Shape & Context, TNaming_Localizer & Localizer, Handle_TNaming_NamedShape & NS, const int Lev) Line 687 C++ TKCAF.dll!BuildName(const TDF_Label & F, TNaming_Scope & MDF, const TopoDS_Shape & Selection, const TopoDS_Shape & Context, const Handle_TNaming_NamedShape & Stop, const unsigned int Geom) Line 1132 C++ TKCAF.dll!BuildNameInNS(const TDF_Label & F, TNaming_Scope & MDF, const TopoDS_Shape & S, const Handle_TNaming_NamedShape & Context, const Handle_TNaming_NamedShape & Stop, const unsigned int Geometry) Line 944 C++ TKCAF.dll!BuildName(const TDF_Label & F, TNaming_Scope & MDF, const TopoDS_Shape & Selection, const TopoDS_Shape & Context, const Handle_TNaming_NamedShape & Stop, const unsigned int Geom) Line 1049 C++ TKCAF.dll!BuildName(const TDF_Label & F, TNaming_Scope & MDF, const TopoDS_Shape & Selection, const TopoDS_Shape & Context, const Handle_TNaming_NamedShape & Stop, const unsigned int Geom) Line 1051 C++ TKCAF.dll!TNaming_Naming::Name(const TDF_Label & F, const TopoDS_Shape & S, const TopoDS_Shape & Context, const unsigned int Geom, const unsigned int KeepOrientation, const unsigned int BNProblem) Line 1834 C++ > TKCAF.dll!TNaming_Selector::Select(const TopoDS_Shape & Selection, const TopoDS_Shape & Context, const unsigned int Geometry, const unsigned int KeepOrientation) Line 368 C++ |
|
Dear BugMaster, Branch CR26061 from occt git-repository (and master from products git-repository) was compiled on Linux and Windows platforms on Release mode. SHA-1: 7cb6fb64c00a2d7a35c2221ccad366fc00566795 There are following compilation errors: Linux: http://jenkins-test-04.nnov.opencascade.com:8080/view/CR26061-master/job/CR26061-master_build_occt_linux/2/parsed_console/ ../../../../src/DNaming/DNaming_SelectionCommands.cxx:122: error: no matching function for call to ‘TNaming_Selector::Select(TopoDS_Shape&, Standard_Boolean&)’ Windows: http://jenkins-test-04.nnov.opencascade.com:8080/view/CR26061-master/job/CR26061-master_build_occt_windows_64/1/parsed_console/ 125>..\..\..\src\DNaming\DNaming_SelectionCommands.cxx(122): error C2664: 'TNaming_Selector::Select' : cannot convert parameter 2 from 'Standard_Boolean' to 'const TopoDS_Shape &' [y:\builds\vc10\CR26061-master-occt-64\adm\msvc\vc10\TKDCAF.vcxproj] Reason: cannot convert from 'Standard_Boolean' to 'const TopoDS_Shape' No constructor could take the source type, or constructor overload resolution was ambiguous DNaming_SphereDriver.cxx ... ..\..\..\src\DNaming\DNaming_SelectionCommands.cxx(122): error C2664: 'TNaming_Selector::Select' : cannot convert parameter 2 from 'Standard_Boolean' to 'const TopoDS_Shape &' [y:\builds\vc10\CR26061-master-occt-64\adm\msvc\vc10\TKDCAF.vcxproj] ... 125>..\..\..\src\DNaming\DNaming_SelectionCommands.cxx(122): error C2664: 'TNaming_Selector::Select' : cannot convert parameter 2 from 'Standard_Boolean' to 'const TopoDS_Shape &' 125> Reason: cannot convert from 'Standard_Boolean' to 'const TopoDS_Shape' No constructor could take the source type, or constructor overload resolution was ambiguous DNaming_SphereDriver.cxx ... ..\..\..\src\DNaming\DNaming_SelectionCommands.cxx(122): error C2664: 'TNaming_Selector::Select' : cannot convert parameter 2 from 'Standard_Boolean' to 'const TopoDS_Shape &' ... 125>..\..\..\src\DNaming\DNaming_SelectionCommands.cxx(122): error C2664: 'TNaming_Selector::Select' : cannot convert parameter 2 from 'Standard_Boolean' to 'const TopoDS_Shape &' 125> Reason: cannot convert from 'Standard_Boolean' to 'const TopoDS_Shape' No constructor could take the source type, or constructor overload resolution was ambiguous DNaming_SphereDriver.cxx ... ..\..\..\src\DNaming\DNaming_SelectionCommands.cxx(122): error C2664: 'TNaming_Selector::Select' : cannot convert parameter 2 from 'Standard_Boolean' to 'const TopoDS_Shape &' |
|
Branch CR26061_1 has been created by szy. SHA-1: b5ddb652d4e258944deb806e8a538047be50f168 Detailed log of new commits: Author: szy Date: Mon Apr 20 17:24:34 2015 +0300 TNaming_Selector crash in select method. TNaming_Localizer is protected from not expected input arguments. |
|
Fixed in CR26061_1. TNaming_Localizer is protected from not expected input arguments. Note. The provided procedure BugReproduce(const TDF_Label& theLabel) can be used exclusively for testing purpose. For modeling purpose it looks like meaningless. |
|
Reviewed. 1.Can be tested. 2. Test to be used attached => t26061.tcl |
2015-04-21 12:15 manager |
t26061.tcl (1,129 bytes) |
|
Dear BugMaster, Branch CR26061_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode. SHA-1: b5ddb652d4e258944deb806e8a538047be50f168 Number of compiler warnings: occt component : Linux: 18 (18 on master) Windows: 0 (0 on master) products component : Linux: 4 (4 on master) Windows: 0 (0 on master) Regressions/Differences: No regressions/differences Testing cases: http://occt-tests/CR26061-1-master-occt-64/Debian60-64/bugs/caf/bug26061.html http://occt-tests/CR26061-1-master-occt-64/Windows-64-VC10/bugs/caf/bug26061.html bugs caf(016) bug26061: OK Testing on Linux: occt component : Total MEMORY difference: 94959375 / 94540592 [+0.44%] Total CPU difference: 52975.66999999973 / 52230.219999999455 [+1.43%] products component : Total MEMORY difference: 23698378 / 23676267 [+0.09%] Total CPU difference: 17505.649999999983 / 17777.469999999976 [-1.53%] Testing on Windows: occt component : Total MEMORY difference: 57155470 / 57165566 [-0.02%] Total CPU difference: 16049.570081198994 / 16283.477980599077 [-1.44%] products component : Total MEMORY difference: 15561099 / 15564896 [-0.02%] Total CPU difference: 6374.590862499969 / 6585.207812599981 [-3.20%] There are no differences in images found by testdiff. |
|
Branch CR26061_1 has been updated by mkv. SHA-1: 6c6f88807ea9e73931e83c5d6cb597ae77f9bc53 Detailed log of new commits: Author: mkv Date: Wed Apr 22 17:56:30 2015 +0300 Test case for issue CR26061 |
|
Dear szy, could you please review following test case bugs caf(016) bug26061 |
|
Yes, bu26061 looks Ok. Note. This test (which presents the initially reported C++ sample in form of Draw command only) has no too much sense as it doesn't respect several Naming rules. Therefore it can be used only to check and reproduce the specified exception. szy |
|
Dear BugMaster, Branch CR26061_1 is TESTED. |
|
Branch CR26061 has been deleted by inv. SHA-1: 7cb6fb64c00a2d7a35c2221ccad366fc00566795 |
|
Branch CR26061_1 has been deleted by inv. SHA-1: 6c6f88807ea9e73931e83c5d6cb597ae77f9bc53 |
occt: master 57c718c4 2015-04-23 14:28:40
Committer: bugmaster Details Diff |
0026061: TNaming_Selector crash in select method. TNaming_Selector crash in select method. TNaming_Localizer is protected from not expected input arguments. Test case for issue CR26061 |
Affected Issues 0026061 |
|
mod - src/TNaming/TNaming_Localizer.cxx | Diff File | ||
add - tests/bugs/caf/bug26061 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-04-12 17:52 | Vico Liang | New Issue | |
2015-04-12 17:52 | Vico Liang | Assigned To | => szy |
2015-04-12 21:56 |
|
Target Version | 6.8.0 => Unscheduled |
2015-04-13 14:15 | Vico Liang | Note Added: 0039628 | |
2015-04-13 14:29 |
|
Note Added: 0039629 | |
2015-04-13 14:49 | Vico Liang | Note Added: 0039636 | |
2015-04-14 14:45 |
|
Target Version | Unscheduled => 7.1.0 |
2015-04-14 18:18 |
|
Status | new => assigned |
2015-04-14 18:26 | git | Note Added: 0039706 | |
2015-04-14 18:36 |
|
Note Added: 0039710 | |
2015-04-14 18:36 |
|
Status | assigned => resolved |
2015-04-14 18:36 |
|
Target Version | 7.1.0 => 6.9.0 |
2015-04-14 18:38 |
|
Note Added: 0039711 | |
2015-04-14 18:38 |
|
Assigned To | szy => mkv |
2015-04-14 18:38 |
|
Status | resolved => reviewed |
2015-04-15 03:43 | Vico Liang | Note Added: 0039730 | |
2015-04-15 12:10 |
|
Note Added: 0039763 | |
2015-04-15 12:10 |
|
Assigned To | mkv => szy |
2015-04-15 12:10 |
|
Status | reviewed => assigned |
2015-04-15 12:12 |
|
Test case number | => Not needed |
2015-04-16 12:44 |
|
Target Version | 6.9.0 => 7.0.0 |
2015-04-20 17:24 | git | Note Added: 0040058 | |
2015-04-20 17:46 |
|
Note Added: 0040059 | |
2015-04-20 17:46 |
|
Status | assigned => resolved |
2015-04-20 17:50 |
|
Note Added: 0040060 | |
2015-04-20 17:50 |
|
Assigned To | szy => mkv |
2015-04-20 17:50 |
|
Status | resolved => reviewed |
2015-04-20 17:50 |
|
Target Version | 7.0.0 => 6.9.0 |
2015-04-21 12:15 |
|
File Added: t26061.tcl | |
2015-04-21 12:16 |
|
Note Edited: 0040060 | |
2015-04-22 17:57 |
|
Note Added: 0040123 | |
2015-04-22 17:58 | git | Note Added: 0040124 | |
2015-04-22 17:59 |
|
Note Added: 0040125 | |
2015-04-22 17:59 |
|
Assigned To | mkv => szy |
2015-04-22 17:59 |
|
Status | reviewed => feedback |
2015-04-22 17:59 |
|
Test case number | Not needed => bugs caf(016) bug26061 |
2015-04-23 10:19 |
|
Note Added: 0040151 | |
2015-04-23 10:19 |
|
Assigned To | szy => bugmaster |
2015-04-23 10:19 |
|
Status | feedback => reviewed |
2015-04-23 16:18 |
|
Note Added: 0040169 | |
2015-04-23 16:18 |
|
Status | reviewed => tested |
2015-04-25 17:37 | bugmaster | Changeset attached | => occt master 57c718c4 |
2015-04-25 17:37 | bugmaster | Status | tested => verified |
2015-04-25 17:37 | bugmaster | Resolution | open => fixed |
2015-05-14 15:28 |
|
Status | verified => closed |
2015-05-14 15:30 |
|
Fixed in Version | => 6.9.0 |
2015-05-14 16:35 | git | Note Added: 0041082 | |
2015-05-14 16:35 | git | Note Added: 0041083 |