[GRASS-dev] Re: [GRASS GIS] #1006: r.terraflow fails to stat() stream file on Windows

GRASS GIS trac at osgeo.org
Sat Apr 10 06:05:49 EDT 2010


#1006: r.terraflow fails to stat() stream file on Windows
------------------------------+---------------------------------------------
  Reporter:  marisn           |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect           |      Status:  new                      
  Priority:  critical         |   Milestone:  6.4.0                    
 Component:  Raster           |     Version:  svn-releasebranch64      
Resolution:                   |    Keywords:  wingrass, r.terraflow    
  Platform:  MSWindows Vista  |         Cpu:  x86-32                   
------------------------------+---------------------------------------------
Changes (by hamish):

  * keywords:  wxgui, wingrass, terraflow => wingrass, r.terraflow

Comment:

 - removed wxgui keyword, it also happens from the msys prompt.


 Maris: fyi extra debug messages only added in 6.5svn.
 {{{
 STREAM temporary files in C:/Users/Maris/AppData/Local/Temp
 ...
 stats.out: Permission denied
 }}}

 stats.out tries to write to the current working directory, try running
  cd C:/Users/Maris/AppData/Local/Temp
 or your home dir before starting the program. (or change the stats=
 filename option)

 (IIUC stats.out file just contains extra debug messages; STREAM is a copy
 of the raster map stored on disk for random access)


 testing with the latest 6.5 nightly wingrass build (r41761), it looks like
 the stat() on an open file is in fact the problem:

 {{{
 #spearfish
 g.region rast=elevation.dem
 r.terraflow ele=elevation.dem filled=rterra.fill dir=rterra.dir \
   swat=rterra.swat acc=rterra.acc tci=rterra.tci mem=600
 ...
 D3/3: create window mapping (633 columns)
 C:/DOCUME~1/OPG/LOCALS~1/Temp/STREAM_a03788: length = 0   sizeof(T)=4
 D3/3: nrows=466   ncols=633    stream_len()=0
 C:/DOCUME~1/OPG/LOCALS~1/Temp/STREAM_a03788: length = 0   sizeof(T)=4
 Assertion failed: nrows * ncols == str->stream_len(), file grass2str.h,
 line 146

 # file size on disk:
 wc -c C:/DOCUME~1/OPG/LOCALS~1/Temp/STREAM_a03788
 1179912
 }}}

 {{{
 633*466 = 294978 cells
 1179912 / 294978 = 4 bytes per cell
 }}}


 Hamish

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/1006#comment:23>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list