Archived issue #0029873
Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
Description
There are several issues with STEP files having external references:
- STEPCAFControl_Reader::Transfer() does NOT report failure if external files have not been found (see test case).
- testreadstep command reads STEP file without external references.
- If DOCUMENT_FILE refers to a subfolder, it is ignored and external files are not found. See "s1_pe_214.stp" referring to subfolder "s1_pe_214".
- STEPCAFControl_Reader::Transfer() does NOT report failure if external files have not been found (see test case).
- testreadstep command reads STEP file without external references.
- If DOCUMENT_FILE refers to a subfolder, it is ignored and external files are not found. See "s1_pe_214.stp" referring to subfolder "s1_pe_214".
#0000310=DOCUMENT_TYPE(''); #311=DOCUMENT_FILE('s1_pe_214/foot_asm.stp','S1_PE_TOP - FOOT','',#0000310,'',''); #0000312=DOCUMENT_REPRESENTATION_TYPE('digital',#311); #313=PROPERTY_DEFINITION('external definition','',#311); #0000314=PROPERTY_DEFINITION_REPRESENTATION(#313,#0000242); #315=DESCRIPTIVE_REPRESENTATION_ITEM('data format','STEP AP214'); #316=REPRESENTATION_CONTEXT('','document parameters'); #0000317=REPRESENTATION('document format',(#315),#316); #0000318=PROPERTY_DEFINITION('document property','',#311); #319=PROPERTY_DEFINITION_REPRESENTATION(#0000318,#0000317); #320=EXTERNAL_SOURCE(IDENTIFIER('foot_asm.stp')); #321=IDENTIFICATION_ROLE('document source','source system'); #322=APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT('foot_asm.stp',#321,#320, (#311)); #323=APPLIED_DOCUMENT_REFERENCE(#311,'',(#0000247)); #0000324=OBJECT_ROLE('mandatory','');
Steps to reproduce
pload XDE VISUALIZATION ReadStep D1 [locate_data_file trj4_xr1-db-214.stp] XGetOneShape s1 D1 nbshapes s1 # OK - external files have been found and Shape is not empty file copy -force [locate_data_file trj4_xr1-db-214.stp] test_copy.stp ReadStep D2 test_copy.stp XGetOneShape s2 D2 nbshapes s2 # KO - external files have NOT been found, the Shape is empty # but ReadStep has not been reported any error!!!
Public activity
21 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: skl
Date: Tue Jul 10 14:45:11 2018 +0300
0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
[revision removed]
Detailed log of new commits:
Author: skl
Date: Tue Jul 10 14:45:11 2018 +0300
0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch CR29873 is ready to be reviewed.
Results of Draw tests:
http://jenkins-test-11.nnov.opencascade.com:8080/job/CR29873-master-SKL-OCCT-Windows-64-VC10-opt-test-compare/3/
http://jenkins-test-11.nnov.opencascade.com:8080/job/CR29873-master-SKL-Products-Windows-64-VC10-opt-test-compare/3/
http://jenkins-test-11.nnov.opencascade.com:8080/job/CR29873-master-SKL-OCCT-Debian70-64-opt-test-compare/3/
Results of Draw tests:
http://jenkins-test-11.nnov.opencascade.com:8080/job/CR29873-master-SKL-OCCT-Windows-64-VC10-opt-test-compare/3/
http://jenkins-test-11.nnov.opencascade.com:8080/job/CR29873-master-SKL-Products-Windows-64-VC10-opt-test-compare/3/
http://jenkins-test-11.nnov.opencascade.com:8080/job/CR29873-master-SKL-OCCT-Debian70-64-opt-test-compare/3/
Branch CR29873 was reviewed
+ FILE* aFile = OSD_OpenFile(fullname, "r");
Opened file handles in several places are never closed.
Is it designed behavior?
Note that to check file existence only, it is usually done like this (without opening a file):
> OSD_File(aPath).Exists()
> OSD_File(aPath).Exists()
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch CR29873 is ready to be reviewed with using "OSD_File(aPath).Exists()".
Results of Draw tests:
http://jenkins-test-11.nnov.opencascade.com:8080/job/CR29873-master-SKL-OCCT-Windows-64-VC10-opt-test-compare/4/
http://jenkins-test-11.nnov.opencascade.com:8080/job/CR29873-master-SKL-Products-Windows-64-VC10-opt-test-compare/4/
http://jenkins-test-11.nnov.opencascade.com:8080/job/CR29873-master-SKL-OCCT-Debian70-64-opt-test-compare/5/
Results of Draw tests:
http://jenkins-test-11.nnov.opencascade.com:8080/job/CR29873-master-SKL-OCCT-Windows-64-VC10-opt-test-compare/4/
http://jenkins-test-11.nnov.opencascade.com:8080/job/CR29873-master-SKL-Products-Windows-64-VC10-opt-test-compare/4/
http://jenkins-test-11.nnov.opencascade.com:8080/job/CR29873-master-SKL-OCCT-Debian70-64-opt-test-compare/5/
In addition, git commit does not describe important modifications in the code.
Please correct this fix in according to given remarks.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: skl
Date: Thu Jul 12 11:35:43 2018 +0300
0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
Output information about failure during reading of external file is added (can be checked by using Draw command "tpstat" ).
If reader can not find external file at the first found location it checks another information about file path and uses new location for import external file.
[revision removed]
Detailed log of new commits:
Author: skl
Date: Thu Jul 12 11:35:43 2018 +0300
0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
Output information about failure during reading of external file is added (can be checked by using Draw command "tpstat" ).
If reader can not find external file at the first found location it checks another information about file path and uses new location for import external file.
Please precise in the commit message in what entity new location was searched
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Commit message is updated.
Branch CR29873 was reviewed
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 in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian70-64:
OCCT
Total CPU difference: 17214.810000000103 / 17169.739999999776 [+0.26%]
Products
Total CPU difference: 7475.710000000031 / 7501.920000000043 [-0.35%]
Windows-64-VC10:
OCCT
Total CPU difference: 16982.487261398637 / 16852.39802749857 [+0.77%]
Products
Total CPU difference: 8240.206821499867 / 8212.11104139987 [+0.34%]
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 in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian70-64:
OCCT
Total CPU difference: 17214.810000000103 / 17169.739999999776 [+0.26%]
Products
Total CPU difference: 7475.710000000031 / 7501.920000000043 [-0.35%]
Windows-64-VC10:
OCCT
Total CPU difference: 16982.487261398637 / 16852.39802749857 [+0.77%]
Products
Total CPU difference: 8240.206821499867 / 8212.11104139987 [+0.34%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
Branch was formed incorrectly
List of commits:
* 0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
* 0025852: Text to BRep algorithm produces bad faces for circled symbols
* 0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
List of commits:
* 0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
* 0025852: Text to BRep algorithm produces bad faces for circled symbols
* 0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: skl
Date: Tue Jul 10 14:45:11 2018 +0300
0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
Output information about failure during reading of external file is added (can be checked by using Draw command "tpstat").
If reader can not find external file at the first found location
(using entity APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT) it checks another information about file path
(using entity DOCUMENT_FILE related with early mentioned entity) and uses new location for import external file.
[revision removed]
Detailed log of new commits:
Author: skl
Date: Tue Jul 10 14:45:11 2018 +0300
0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
Output information about failure during reading of external file is added (can be checked by using Draw command "tpstat").
If reader can not find external file at the first found location
(using entity APPLIED_EXTERNAL_IDENTIFICATION_ASSIGNMENT) it checks another information about file path
(using entity DOCUMENT_FILE related with early mentioned entity) and uses new location for import external file.
Please take branch CR29873_1.
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]