[GRASS5] [bug #976] (grass) v.transform would not read that header of files

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

On Thursday 04 April 2002 06:28 pm, rgrmill@rt66.com wrote:

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.

Roger Miller

Thanks for tests and sorry for bug. I commited mapset initialization,
should be OK now.

Radim