View Issue Details

IDProjectCategoryView StatusLast Update
0028673Open CASCADEOCCT:Foundation Classespublic2017-09-29 16:25
Reporterbugmaster Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.2.0Fixed in Version7.2.0 
Summary0028673: getsourcefile Draw command return different output on Linux and Windows platforms
DescriptionWindows :
> getsourcefile pload
src/Draw/Draw_PloadCommands.cxx

Linux :
> getsourcefile pload
/src/Draw/Draw_PloadCommands.cxx
Steps To Reproducetest :
demo draw getsource
TagsNo tags attached.
Test case numberdemo draw getsource

Activities

msv

2017-04-21 17:17

developer   ~0065432

The cause of different path computation is the way how compiler computes the path of the current compilation unit (when the macro __FILE__ is used).
For example, under VC10 it returns the file path starting with "../../../src", while under VC12 it returns the full path starting with "D:\".

git

2017-04-21 17:26

administrator   ~0065434

Branch CR28673 has been created by msv.

SHA-1: 35103402121dfa48aea3614f712c0dc29d3d37ba


Detailed log of new commits:

Author: msv
Date: Fri Apr 21 17:18:14 2017 +0300

    0028673: getsourcefile Draw command return different output on Linux and Windows platforms
    
    The method OSD_Path::RemoveATrek has been modified, so that to remove leading track separator if the first component has been removed.
    Now the command getsourcefile returns the relative path starting with "src" without leading "/" on all platforms.

msv

2017-04-21 17:26

developer   ~0065435

Dear Kirill, please review.

abv

2017-04-24 11:10

manager   ~0065459

I believe that making punctual changes in OSD_Path without clear understanding how it should behave is not worth doing: it can easily cause regressions in existing client's code but does not solve the issue completely, as its reason is lack of clear behavior. This is to be done together with other related issues.

msv

2017-04-24 12:07

developer   ~0065462

I can propose another, more safe way. It is to add a new method in OSD_Path with name RemoveLeadingTrekSeparator(). It will remove the leading separator if any from the track. Then call this method from Draw_Interpretor::add().
What is your opinion?

msv

2017-04-25 17:48

developer   ~0065517

At last, the most safe way we found is to make needed correction in the method Draw_Interpretor::add().

abv

2017-04-25 17:50

manager   ~0065518

I prefer not to add new methods until we get clear idea how this class should work in all cases and define reasonable interface

git

2017-04-25 17:56

administrator   ~0065519

Branch CR28673_1 has been created by msv.

SHA-1: b79582b0b3e0e0dce604e8fe90dd68f01f762ba8


Detailed log of new commits:

Author: msv
Date: Fri Apr 21 17:18:14 2017 +0300

    0028673: getsourcefile Draw command return different output on Linux and Windows platforms
    
    The method Draw_Interpretor::add() has been corrected so that the command getsourcefile returned the relative path starting with "src" without leading "/" on all platforms.

msv

2017-04-25 17:57

developer   ~0065520

Please review the new version.

abv

2017-04-27 11:42

manager   ~0065590

Last edited: 2017-04-27 11:44

No remarks, please test (only test demo draw getsource needs to be checked, on both Linux and Windows).

git

2017-04-27 15:23

administrator   ~0065610

Branch CR28673_1 has been updated forcibly by mkv.

SHA-1: df4cd431874fa0db6404e6e5770496391884bdbb

mkv

2017-04-28 19:21

tester   ~0065653

Dear BugMaster,
Branch CR28673_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: df4cd431874fa0db6404e6e5770496391884bdbb

Testing cases:
http://occt-tests/CR28673_1-master-OCCT/Debian70-64/demo/draw/getsource.html
http://occt-tests/CR28673_1-master-OCCT/Windows-64-VC10/demo/draw/getsource.html
demo draw getsource: OK

mkv

2017-04-28 19:21

tester   ~0065654

Dear BugMaster,
Branch CR28673_1 is TESTED.

git

2017-05-12 11:36

administrator   ~0065972

Branch CR28673 has been deleted by kgv.

SHA-1: 35103402121dfa48aea3614f712c0dc29d3d37ba

git

2017-05-12 11:36

administrator   ~0065973

Branch CR28673_1 has been deleted by kgv.

SHA-1: df4cd431874fa0db6404e6e5770496391884bdbb

Related Changesets

occt: master 36cc2619

2017-04-21 14:18:14

msv


Committer: bugmaster Details Diff
0028673: getsourcefile Draw command return different output on Linux and Windows platforms

The method Draw_Interpretor::add() has been corrected so that the command getsourcefile returned the relative path starting with "src" without leading "/" on all platforms.
Affected Issues
0028673
mod - src/Draw/Draw_Interpretor.cxx Diff File
mod - tests/demo/draw/getsource Diff File

Issue History

Date Modified Username Field Change
2017-04-21 12:33 bugmaster New Issue
2017-04-21 12:33 bugmaster Assigned To => msv
2017-04-21 17:17 msv Note Added: 0065432
2017-04-21 17:17 msv Status new => assigned
2017-04-21 17:26 git Note Added: 0065434
2017-04-21 17:26 msv Note Added: 0065435
2017-04-21 17:26 msv Assigned To msv => kgv
2017-04-21 17:26 msv Status assigned => resolved
2017-04-21 17:34 kgv Assigned To kgv => abv
2017-04-24 11:10 abv Note Added: 0065459
2017-04-24 11:10 abv Status resolved => feedback
2017-04-24 12:07 msv Note Added: 0065462
2017-04-25 17:48 msv Note Added: 0065517
2017-04-25 17:48 msv Assigned To abv => msv
2017-04-25 17:48 msv Status feedback => assigned
2017-04-25 17:50 abv Note Added: 0065518
2017-04-25 17:56 git Note Added: 0065519
2017-04-25 17:57 msv Note Added: 0065520
2017-04-25 17:57 msv Assigned To msv => abv
2017-04-25 17:57 msv Status assigned => resolved
2017-04-27 11:42 abv Note Added: 0065590
2017-04-27 11:42 abv Assigned To abv => bugmaster
2017-04-27 11:42 abv Status resolved => reviewed
2017-04-27 11:44 abv Note Edited: 0065590
2017-04-27 11:54 mkv Assigned To bugmaster => mkv
2017-04-27 15:23 git Note Added: 0065610
2017-04-28 19:21 mkv Note Added: 0065653
2017-04-28 19:21 mkv Note Added: 0065654
2017-04-28 19:21 mkv Assigned To mkv => bugmaster
2017-04-28 19:21 mkv Status reviewed => tested
2017-04-28 19:22 mkv Test case number => demo draw getsource
2017-05-05 13:34 bugmaster Changeset attached => occt master 36cc2619
2017-05-05 13:34 bugmaster Status tested => verified
2017-05-05 13:34 bugmaster Resolution open => fixed
2017-05-12 11:36 git Note Added: 0065972
2017-05-12 11:36 git Note Added: 0065973
2017-09-29 16:19 aiv Fixed in Version => 7.2.0
2017-09-29 16:25 aiv Status verified => closed