MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027849Community[OCCT] OCCT:Foundation Classespublic2016-09-08 11:062016-12-09 16:39
Reporterdrazmyslovich 
Assigned Toapn 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformWindowsOSVC++ 2010OS Version64 bit
Product Version[OCCT] 7.0.0 
Target Version[OCCT] 7.1.0Fixed in Version[OCCT] 7.1.0 
Summary0027849: ResourceManager path computations fail for the folders containing dots
DescriptionIf the resource files (Plugin, XCAF, STEP, etc.) are located in some folder, which has dots in the name (e.g. "this.is.a.bad.folder.name"), the path assembling logic fails, since OSD_Path will be firstly constructed with the folder path only, which means that the folder name will be interpreted as a file name and an extension (e.g. "this.is.a.bad.folder" is a name and ".name" is an extension). Afterwards, the current name will be attached to the current path, but not an extension!!! Finally, the extension isn't emptied, so the final path is completely wrong (e.g. "this.is.a.bad.folder/XCAF.name").
Additionally, the strangest code for Windows to extract extension from the file path:
// buffer contains the full path without drive letter
if (buffer.Search(".") != -1) // And what if the dot is in folder name???
{
  ext = buffer.Token(".",2); // why 2? I like 3...
  ext.Insert(1,'.');
  pos = buffer.Search(".");
  if (pos != -1)
   buffer.Remove(pos,ext.Length());
}
Steps To ReproduceNot applicable
TagsNo tags attached.
Test case numberbugs fclasses bug27849
Attached Files

- Relationships

-  Notes
(0057588)
git (administrator)
2016-09-08 11:09

Branch CR27849 has been created by drazmyslovich.

SHA-1: c4c7876f7432bb2b688e79cb0a8a10126e0d76c6


Detailed log of new commits:

Author: razmyslovich
Date: Thu Sep 8 10:09:12 2016 +0200

    0027849: Fix Resource_Manager path computation logic
(0060586)
git (administrator)
2016-11-21 09:50

Branch CR27849_1 has been created by abv.

SHA-1: 33bf5c094a3c4308a7e3bd01c8dfc54af900e9c1


Detailed log of new commits:

Author: razmyslovich
Date: Thu Sep 8 10:09:12 2016 +0200

    0027849: Fix Resource_Manager path computation logic
    
    Treatment of paths in Resource_Manager is corrected to handle properly paths with dots inside.
    Extraction of extension from path in DOS mode when working on Linux is corrected in OSD_Path.
    Test case added.
(0060587)
abv (manager)
2016-11-21 09:51

Reviewed, test case added, please test
(0060648)
mkv (tester)
2016-11-21 18:45

Dear BugMaster,
Branch CR27849_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: 33bf5c094a3c4308a7e3bd01c8dfc54af900e9c1

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1142

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR27849_1-master-OCCT/Debian70-64/bugs/fclasses/bug27849.html [^]
http://occt-tests/CR27849_1-master-OCCT/Windows-64-VC10/bugs/fclasses/bug27849.html [^]
bugs fclasses bug27849: OK

Testing on Linux:
occt component :
Total MEMORY difference: 91434329 / 91050924 [+0.42%]
Total CPU difference: 21616.55000000025 / 21539.960000000174 [+0.36%]
products component :
Total MEMORY difference: 29983854 / 29961876 [+0.07%]
Total CPU difference: 5323.419999999958 / 5301.519999999997 [+0.41%]

Testing on Windows:
occt component :
Total MEMORY difference: 56602353 / 56605961 [-0.01%]
Total CPU difference: 20263.110290898458 / 20816.742239798514 [-2.66%]
products component :
Total MEMORY difference: 20832086 / 20798116 [+0.16%]
Total CPU difference: 5285.298279899985 / 5252.881272099973 [+0.62%]

There are no differences in images found by testdiff.
(0060649)
mkv (tester)
2016-11-21 18:46

Dear BugMaster,
Branch CR27849_1 is TESTED.
(0061202)
git (administrator)
2016-12-07 11:25

Branch CR27849 has been deleted by kgv.

SHA-1: c4c7876f7432bb2b688e79cb0a8a10126e0d76c6
(0061248)
git (administrator)
2016-12-07 11:30

Branch CR27849_1 has been deleted by kgv.

SHA-1: 33bf5c094a3c4308a7e3bd01c8dfc54af900e9c1

- Related Changesets
occt: master f9ac4dc9
Timestamp: 2016-09-08 08:09:12
Author: razmyslovich
Committer: apn
Details ] Diff ]
0027849: ResourceManager path computations fail for the folders containing dots

Treatment of paths in Resource_Manager is corrected to handle properly paths with dots inside.
Extraction of extension from path in DOS mode when working on Linux is corrected in OSD_Path.
Test case added.
mod - src/OSD/OSD_Path.cxx Diff ] File ]
mod - src/QABugs/QABugs_18.cxx Diff ] File ]
mod - src/Resource/Resource_Manager.cxx Diff ] File ]
add - tests/bugs/fclasses/bug27849 Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-09-08 11:06 drazmyslovich New Issue
2016-09-08 11:06 drazmyslovich Assigned To => drazmyslovich
2016-09-08 11:09 git Note Added: 0057588
2016-09-08 11:10 drazmyslovich Assigned To drazmyslovich => abv
2016-09-08 11:10 drazmyslovich Status new => resolved
2016-09-08 11:10 drazmyslovich Steps to Reproduce Updated View Revisions
2016-11-21 09:50 git Note Added: 0060586
2016-11-21 09:51 abv Note Added: 0060587
2016-11-21 09:51 abv Assigned To abv => bugmaster
2016-11-21 09:51 abv Status resolved => reviewed
2016-11-21 11:38 mkv Assigned To bugmaster => mkv
2016-11-21 18:45 mkv Note Added: 0060648
2016-11-21 18:46 mkv Note Added: 0060649
2016-11-21 18:46 mkv Assigned To mkv => bugmaster
2016-11-21 18:46 mkv Status reviewed => tested
2016-11-21 18:46 mkv Test case number => bugs fclasses bug27849
2016-11-24 15:52 apn Changeset attached => occt master f9ac4dc9
2016-11-24 15:52 apn Assigned To bugmaster => apn
2016-11-24 15:52 apn Status tested => verified
2016-11-24 15:52 apn Resolution open => fixed
2016-12-07 11:25 git Note Added: 0061202
2016-12-07 11:30 git Note Added: 0061248
2016-12-09 16:30 user533 Status verified => closed
2016-12-09 16:39 user533 Fixed in Version => 7.1.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker