Archived issue #0029371
The problem of the attributes constructor call
Description
Since OCCT 7.1.0 there may appear a problem of creation and attachment of attributes to the label if the attribute constructor and AddAttribute method is used instead of "Set" method call:
Handle(TDataStd_Name) aNameAttr = new TDataStd_Name();
aLabel.AddAttribute(aNameAttr);
in this case an attribute with null GUID is attached, whereas in previous versions this example worked well.
It is proposed to forbid the attribute constructor call or to make this case work properly again (the default GUID of the attribute is assigned).
And it is worth to update/extend documentation with information that "Set" method must be used instead.
Handle(TDataStd_Name) aNameAttr = new TDataStd_Name();
aLabel.AddAttribute(aNameAttr);
in this case an attribute with null GUID is attached, whereas in previous versions this example worked well.
It is proposed to forbid the attribute constructor call or to make this case work properly again (the default GUID of the attribute is assigned).
And it is worth to update/extend documentation with information that "Set" method must be used instead.
Steps to reproduce
use script tests\bugs\caf\bug29371.
Public activity
9 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: szy
Date: Wed Dec 20 12:20:29 2017 +0300
0029371: The problem of the attributes constructor call.
// default Guid is assigned in constructor.
[revision removed]
Detailed log of new commits:
Author: szy
Date: Wed Dec 20 12:20:29 2017 +0300
0029371: The problem of the attributes constructor call.
// default Guid is assigned in constructor.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: szy
Date: Thu Dec 21 14:36:43 2017 +0300
0029371: The problem of the attributes constructor call.
//Addition of test case: tests\bugs\caf\bug29371.
[revision removed]
Detailed log of new commits:
Author: szy
Date: Thu Dec 21 14:36:43 2017 +0300
0029371: The problem of the attributes constructor call.
//Addition of test case: tests\bugs\caf\bug29371.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: szy
Date: Wed Dec 20 12:20:29 2017 +0300
0029371: The problem of the attributes constructor call.
//Addition of test case: tests\bugs\caf\bug29371.
0029371: The problem of the attributes constructor call.
// default Guid is assigned in constructor.
[revision removed]
Detailed log of new commits:
Author: szy
Date: Wed Dec 20 12:20:29 2017 +0300
0029371: The problem of the attributes constructor call.
//Addition of test case: tests\bugs\caf\bug29371.
0029371: The problem of the attributes constructor call.
// default Guid is assigned in constructor.
Fixed.
The first solution is not applicable. The second solution (the default GUID of the attribute is assigned) is implemented.
Branch CR29371_1. Review it, please.
The first solution is not applicable. The second solution (the default GUID of the attribute is assigned) is implemented.
Branch CR29371_1. Review it, please.
1. http://jenkins-test-10.nnov.opencascade.com:8080/job/CR29371-master-szy-OCCT-Windows-64-VC10-opt-tests-compare-windows/1/
2. http://jenkins-test-10.nnov.opencascade.com:8080/job/CR29371-master-szy-OCCT-Debian70-64-opt-tests-compare-linux/1/
3. http://jenkins-test-10.nnov.opencascade.com:8080/job/CR29371-master-szy-Products-Windows-64-VC10-opt-tests-compare-windows/1/
4. http://jenkins-test-10.nnov.opencascade.com:8080/job/CR29371-master-szy-Products-Debian70-64-opt-tests-compare-linux/1/
2. http://jenkins-test-10.nnov.opencascade.com:8080/job/CR29371-master-szy-OCCT-Debian70-64-opt-tests-compare-linux/1/
3. http://jenkins-test-10.nnov.opencascade.com:8080/job/CR29371-master-szy-Products-Windows-64-VC10-opt-tests-compare-windows/1/
4. http://jenkins-test-10.nnov.opencascade.com:8080/job/CR29371-master-szy-Products-Debian70-64-opt-tests-compare-linux/1/
Combination -
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
Test case:
bugs caf bug29371 - OK
CPU differences:
Debian70-64:
OCCT
Total CPU difference: 18435.779999999635 / 18433.219999999703 [+0.01%]
Products
Total CPU difference: 7480.22000000001 / 7463.390000000005 [+0.23%]
Windows-64-VC10:
OCCT
Total CPU difference: 17870.67895489861 / 17919.14846559861 [-0.27%]
Products
Total CPU difference: 8002.227296000001 / 7985.956391699999 [+0.20%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
Test case:
bugs caf bug29371 - OK
CPU differences:
Debian70-64:
OCCT
Total CPU difference: 18435.779999999635 / 18433.219999999703 [+0.01%]
Products
Total CPU difference: 7480.22000000001 / 7463.390000000005 [+0.23%]
Windows-64-VC10:
OCCT
Total CPU difference: 17870.67895489861 / 17919.14846559861 [-0.27%]
Products
Total CPU difference: 8002.227296000001 / 7985.956391699999 [+0.20%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
Branch [archived branch] has been updated by Commenter 1.
[revision removed]
Detailed log of new commits:
Author: Commenter 1
Date: Mon Dec 25 18:17:26 2017 +0300
// Fix warning
[revision removed]
Detailed log of new commits:
Author: Commenter 1
Date: Mon Dec 25 18:17:26 2017 +0300
// Fix warning
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]