[GRASS5] [bug #976] (grass) v.transform would not read that header of files
rgrmill at rt66.com
rgrmill at rt66.com
Thu Apr 4 11:28:40 EST 2002
Radim,
> The code for transformation of attributes was not changed, and i
cannot get
> the segfault - i tested warious combinations of non existing files
> /directories and incorect records in dig_att. So i don't know.
>
> You could maybe 'strace v.transform' so that we know if dig_att was
opened.
I ran it through gdb. The error occurs when opening the new dig_att
file. It is caused because the pointer to the mapset (Trans.mapset) had
an initial value of 0X64. The code in G__file_name assumes that the
mapset value that it is passed is either 0 or that it points to an
accessible location; 0X64 isn't an accessible location.
I can get around the problem by initializing with Trans.mapset=NULL.
The mapset name for the current dig_att file (Current.mapset) was also
uninitialized, but it had an initial value of 0x0, so it passed the test
used in G__file_name without tripping a seg fault.
The program was compiled with gcc 2.95.2 and (I think) libc6.2 on a SuSE
7.1 Linux system. I invoked the command with:
v.transform i=plume_area o=tr_plume_area p=592newpoints
Roger Miller
More information about the grass-dev
mailing list