[GRASS5] NVIZ image dump broken?
Hamish
hamish_nospam at yahoo.com
Wed May 3 09:56:05 EDT 2006
> On a separate issue, I have found that with the recent NVIZ I get a
> segfault if I try to load a saved state or save a state if I have a
> vector/site file loaded. I assume this is due to the recent changes to
> the Sites panel, but I have not had time to investigate. If you can
> confirm, it should be added to the bugtracker.
Same here,
spearfish60:
nviz -q
Panel -> Vector points
New
bugsites
File -> Save State
filename
<ok>
segfault.
It happens in panel_site.c, proc Nviz_site_save (line 176),
on this call:
# useatt
puts $file_hook "[Nsite$i get_att useatt]"
which takes us to get_att() in src/map_obj.c line 1516.
then in
case SITE:{
case SV_ATT_USEATT:
it tries atoi(argv[3]) but there is no 4th arguement to convert:
argc=3
argv[0]=[Nsite21720]
argv[1]=[get_att]
argv[2]=[useatt]
argv[3]=[(null)]
The atoi() is trying to fetch the attribute number for this:
int site_attr_get(Tcl_Interp *interp, geosite * gp, int nattr)
{
char buf[1024];
sprintf(buf, "%d", gp->use_attr[nattr]);
Tcl_AppendElement(interp, buf);
return(TCL_OK);
}
If I change argv[3] to argv[2] it gets rid of the segfault, but I don't
know if that is the intended logic.
Hamish
More information about the grass-dev
mailing list