View Issue Details

IDProjectCategoryView StatusLast Update
0023197Open CASCADEOCCT:DRAWpublic2012-11-16 13:16
ReportervtnAssigned Toabv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindows 
Product Version6.5.2 
Target Version6.5.4Fixed in Version6.5.4 
Summary0023197: Draw executable do not detect update of environment variables on Windows.
DescriptionThe update of env array do not detected inside Draw. It is common behavior of TCL on Windows.
Steps To Reproducepload XSDRAW
restore shape a
set env(CSF_dataDefaults) [file dirname [info script]]/../data;#path to your "data" file.
puts $env(CSF_dataDefaults);#print correct path here
DT_ApplySeq result a data data1;#do not detect CSF_dataDefaults environment variable.
TagsNo tags attached.
Test case numbercsh 004 *

Activities

abv

2012-06-08 15:42

manager   ~0020677

I propose we add a command in DRAW to change environment variables in C subsystem from DRAW, e.g. dsetenv. Then it can be set to update C environment automatically on updates made from Tcl (using Tcl 'trace' functionality), by adding relevant code to DrawDefaults script, e.g.:

proc _update_c_env {envenv var op} {
    global env
    if { $op == "unset" } {
      dsetenv $var
    } else if { $op == "write" } {
      dsetenv $var $env($var)
    }
}
trace add variable env write _update_c_env
trace add variable env unset _update_c_env

abv

2012-06-25 15:45

manager   ~0020787

Fix is provided in branch CR23197, please review

vtn

2012-06-27 14:00

developer   ~0020804

Andrey,

Please see my changes in CR23197 branch according to "array get env" problem on Windows.

Vladimir

abv

2012-06-27 15:50

manager   ~0020805

Looks Ok to me

mkv

2012-06-28 15:23

tester   ~0020810

Dear BugMaster,
The workbenches
KAS:dev:mkv-23197-occt (GIT branch CR23197)
KAS:dev:mkv-23197-products (GIT master)
were compiled on Linux platform and tested.

Regression:
Not detected

Improvements:
Not detected

Testing case:
csh 004 *

See results in /QADisk/occttests/results/KAS/dev/mkv-23197-products_27062012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120622-opt_22062012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification

Related Changesets

occt: master b7e76224

2012-06-28 13:48:50

abv


Committer: abv Details Diff
0023197: Draw executable do not detect update of environment variables on Windows.

New DRAW commands dgetenv and dsetenv are added, allowing to query and set environment variables as defined in C subsystem, from Tcl.

On Windows, special handler is armed in DrawDefaults providing automatic update of C environment when Tcl environment (array env) is modified. Note that this is not needed on Linux (Tcl does this internally).

Fixed problem with "array get env" command.

Added comments to _update_c_env proc.
Affected Issues
0023197
mod - src/Draw/Draw_VariableCommands.cxx Diff File
mod - src/DrawResources/DrawDefault Diff File

Issue History

Date Modified Username Field Change
2012-06-08 15:12 vtn New Issue
2012-06-08 15:12 vtn Assigned To => abv
2012-06-08 15:42 abv Note Added: 0020677
2012-06-08 15:42 abv Status new => assigned
2012-06-25 15:45 abv Note Added: 0020787
2012-06-25 15:45 abv Assigned To abv => vtn
2012-06-25 15:45 abv Status assigned => resolved
2012-06-27 13:59 vtn Assigned To vtn => abv
2012-06-27 14:00 vtn Note Added: 0020804
2012-06-27 15:50 abv Note Added: 0020805
2012-06-27 15:50 abv Status resolved => reviewed
2012-06-27 16:33 mkv Assigned To abv => mkv
2012-06-28 13:02 mkv File Added: Y0
2012-06-28 14:24 mkv Test case number => chl 935 Y0
2012-06-28 15:23 mkv Note Added: 0020810
2012-06-28 15:24 mkv File Deleted: Y0
2012-06-28 15:24 mkv Test case number chl 935 Y0 => csh 004 *
2012-06-28 15:24 mkv Assigned To mkv => bugmaster
2012-06-28 15:24 mkv Status reviewed => tested
2012-07-02 11:43 abv Changeset attached => occt master b7e76224
2012-07-02 11:43 abv Assigned To bugmaster => abv
2012-07-02 11:43 abv Status tested => verified
2012-07-02 11:43 abv Resolution open => fixed
2012-11-16 13:15 bugmaster Fixed in Version => 6.5.4
2012-11-16 13:16 bugmaster Status verified => closed