MantisBT - Open CASCADE
View Issue Details
0029873Open CASCADE[OCCT] OCCT:Data Exchangepublic2018-06-15 14:472018-07-14 12:41
kgv 
bugmaster 
normalminor 
closedfixed 
[OCCT] 6.6.0 
[OCCT] 7.4.0[OCCT] 7.4.0 
Not needed
0029873: Data Exchange - STEPCAFControl_Reader::Transfer() returns TRUE even when external files are missing
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".

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','');
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!!!

No tags attached.
Issue History
2018-06-15 14:47kgvNew Issue
2018-06-15 14:47kgvAssigned To => gka
2018-06-15 14:56kgvProduct Version7.3.0 => 6.6.0
2018-07-04 09:06kgvAssigned Togka => skl
2018-07-04 09:06kgvStatusnew => assigned
2018-07-10 14:46gitNote Added: 0077419
2018-07-11 11:10gitNote Added: 0077444
2018-07-11 17:52sklNote Added: 0077461
2018-07-11 17:52sklAssigned Toskl => gka
2018-07-11 19:11gkaStatusassigned => resolved
2018-07-11 19:12gkaNote Added: 0077470
2018-07-11 19:12gkaAssigned Togka => bugmaster
2018-07-11 19:12gkaStatusresolved => reviewed
2018-07-11 20:06kgvNote Added: 0077474
2018-07-11 20:06kgvAssigned Tobugmaster => skl
2018-07-11 20:06kgvStatusreviewed => feedback
2018-07-11 20:09kgvNote Added: 0077475
2018-07-12 07:23gitNote Added: 0077484
2018-07-12 09:17sklNote Added: 0077485
2018-07-12 09:19sklAssigned Toskl => kgv
2018-07-12 09:20sklStatusfeedback => resolved
2018-07-12 09:53kgvAssigned Tokgv => gka
2018-07-12 09:54kgvNote Added: 0077490
2018-07-12 11:06gkaAssigned Togka => skl
2018-07-12 11:07gkaNote Added: 0077498
2018-07-12 11:07gkaStatusresolved => assigned
2018-07-12 11:36gitNote Added: 0077503
2018-07-12 12:29gkaNote Added: 0077510
2018-07-12 12:37gitNote Added: 0077512
2018-07-12 12:39sklNote Added: 0077513
2018-07-12 12:40sklAssigned Toskl => gka
2018-07-12 12:41sklStatusassigned => resolved
2018-07-12 12:59gkaNote Added: 0077516
2018-07-12 12:59gkaAssigned Togka => bugmaster
2018-07-12 12:59gkaStatusresolved => reviewed
2018-07-12 17:42bugmasterTest case number => Not needed
2018-07-12 17:42bugmasterNote Added: 0077545
2018-07-12 17:42bugmasterStatusreviewed => tested
2018-07-12 17:55bugmasterNote Added: 0077546
2018-07-12 17:55bugmasterAssigned Tobugmaster => skl
2018-07-12 17:55bugmasterStatustested => assigned
2018-07-12 18:17gitNote Added: 0077550
2018-07-12 18:18kgvNote Added: 0077551
2018-07-12 18:18kgvAssigned Toskl => bugmaster
2018-07-12 18:18kgvStatusassigned => resolved
2018-07-12 18:18kgvStatusresolved => reviewed
2018-07-12 18:47bugmasterStatusreviewed => tested
2018-07-14 12:26bugmasterChangeset attached => occt master 3b7f55e9
2018-07-14 12:26bugmasterStatustested => verified
2018-07-14 12:26bugmasterResolutionopen => fixed
2018-07-14 12:41gitNote Added: 0077600
2018-07-14 12:41gitNote Added: 0077605

Notes
(0077419)
git   
2018-07-10 14:46   
Branch CR29873 has been created by skl.

SHA-1: 1e1fb6a42d838d6b02e7679d31d10a387393e2ad


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
(0077444)
git   
2018-07-11 11:10   
Branch CR29873 has been updated forcibly by skl.

SHA-1: c01546f49ed23db64b3f3c2f3b015ba1464f362e
(0077461)
skl   
2018-07-11 17:52   
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/ [^]
(0077470)
gka   
2018-07-11 19:12   
Branch CR29873 was reviewed
(0077474)
kgv   
2018-07-11 20:06   
+  FILE* aFile = OSD_OpenFile(fullname, "r");

Opened file handles in several places are never closed.
Is it designed behavior?
(0077475)
kgv   
2018-07-11 20:09   
Note that to check file existence only, it is usually done like this (without opening a file):
> OSD_File(aPath).Exists()
(0077484)
git   
2018-07-12 07:23   
Branch CR29873 has been updated forcibly by skl.

SHA-1: aebb9945799089d02f8b21f8185304a081e4f3b5
(0077485)
skl   
2018-07-12 09:17   
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/ [^]
(0077490)
kgv   
2018-07-12 09:54   
In addition, git commit does not describe important modifications in the code.
(0077498)
gka   
2018-07-12 11:07   
Please correct this fix in according to given remarks.
(0077503)
git   
2018-07-12 11:36   
Branch CR29873 has been updated by skl.

SHA-1: 8cfedb8607ab1898926b54ca6005d24ace0b2276


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.

(0077510)
gka   
2018-07-12 12:29   
Please precise in the commit message in what entity new location was searched
(0077512)
git   
2018-07-12 12:37   
Branch CR29873 has been updated forcibly by skl.

SHA-1: 5d8ee726c531f15e2294e78d35268350ae557e30
(0077513)
skl   
2018-07-12 12:39   
Commit message is updated.
(0077516)
gka   
2018-07-12 12:59   
Branch CR29873 was reviewed
(0077545)
bugmaster   
2018-07-12 17:42   
Combination -
OCCT branch : CR29873 SHA - aebb9945799089d02f8b21f8185304a081e4f3b5
Products branch : master SHA - 49c228d5213fed6561994d0148827917539e38c8
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
(0077546)
bugmaster   
2018-07-12 17:55   
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


(0077550)
git   
2018-07-12 18:17   
Branch CR29873_1 has been created by kgv.

SHA-1: 47c2b13cd4e12710ce69ee4450cdd74270ffac79


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.
(0077551)
kgv   
2018-07-12 18:18   
Please take branch CR29873_1.
(0077600)
git   
2018-07-14 12:41   
Branch CR29873_1 has been deleted by inv.

SHA-1: 47c2b13cd4e12710ce69ee4450cdd74270ffac79
(0077605)
git   
2018-07-14 12:41   
Branch CR29873 has been deleted by inv.

SHA-1: 5d8ee726c531f15e2294e78d35268350ae557e30