MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0028673Open CASCADE[OCCT] OCCT:Foundation Classespublic2017-04-21 12:332017-05-12 11:36
Reporterbugmaster 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.2.0*Fixed in Version 
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
Attached Files

- Relationships

-  Notes
(0065432)
msv (developer)
2017-04-21 17:17

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:\".
(0065434)
git (administrator)
2017-04-21 17:26

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.
(0065435)
msv (developer)
2017-04-21 17:26

Dear Kirill, please review.
(0065459)
abv (manager)
2017-04-24 11:10

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.
(0065462)
msv (developer)
2017-04-24 12:07

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?
(0065517)
msv (developer)
2017-04-25 17:48

At last, the most safe way we found is to make needed correction in the method Draw_Interpretor::add().
(0065518)
abv (manager)
2017-04-25 17:50

I prefer not to add new methods until we get clear idea how this class should work in all cases and define reasonable interface
(0065519)
git (administrator)
2017-04-25 17:56

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.
(0065520)
msv (developer)
2017-04-25 17:57

Please review the new version.
(0065590)
abv (manager)
2017-04-27 11:42
edited on: 2017-04-27 11:44

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

(0065610)
git (administrator)
2017-04-27 15:23

Branch CR28673_1 has been updated forcibly by mkv.

SHA-1: df4cd431874fa0db6404e6e5770496391884bdbb
(0065653)
mkv (tester)
2017-04-28 19:21

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
(0065654)
mkv (tester)
2017-04-28 19:21

Dear BugMaster,
Branch CR28673_1 is TESTED.
(0065972)
git (administrator)
2017-05-12 11:36

Branch CR28673 has been deleted by kgv.

SHA-1: 35103402121dfa48aea3614f712c0dc29d3d37ba
(0065973)
git (administrator)
2017-05-12 11:36

Branch CR28673_1 has been deleted by kgv.

SHA-1: df4cd431874fa0db6404e6e5770496391884bdbb

- Related Changesets
occt: master 36cc2619
Timestamp: 2017-04-21 14:18:14
Author: 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.
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 View Revisions
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


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker