[bug #4377] (grass) Re: [GRASS5] NVIZ image dump broken?

Request Tracker grass-bugs at intevation.de
Wed May 3 09:56:22 EDT 2006


this bug's URL: http://intevation.de/rt/webrt?serial_num=4377
-------------------------------------------------------------------------

> 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


--- Headers Follow ---

>From hamish_nospam at yahoo.com  Wed May  3 15:56:22 2006
Return-Path: <hamish_nospam at yahoo.com>
Delivered-To: grass-bugs at lists.intevation.de
Received: from mail.intevation.de (aktaia [212.95.126.10])
	by lists.intevation.de (Postfix) with ESMTP id 8CEA11006A6
	for <grass-bugs at lists.intevation.de>; Wed,  3 May 2006 15:56:22 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
	by mail.intevation.de (Postfix) with ESMTP id 4523F36DA4
	for <grass-bugs at lists.intevation.de>; Wed,  3 May 2006 15:56:22 +0200 (CEST)
Received: from mailhub1.otago.ac.nz (mailhub1.otago.ac.nz [139.80.64.218])
	by mail.intevation.de (Postfix) with ESMTP id 9FF9336D74
	for <grass-bugs at intevation.de>; Wed,  3 May 2006 15:56:20 +0200 (CEST)
Received: from galadriel.otago.ac.nz (galadriel.otago.ac.nz [139.80.64.213])
	by mailhub1.otago.ac.nz (8.13.6/8.13.6) with ESMTP id k43Du7XW018716;
	Thu, 4 May 2006 01:56:07 +1200
Received: from taihua (taihua.otago.ac.nz [139.80.35.27])
	by galadriel.otago.ac.nz (8.12.8/8.12.8) with SMTP id k43Du5Sm026435;
	Thu, 4 May 2006 01:56:06 +1200 (NZST)
Date: Thu, 4 May 2006 01:56:05 +1200
From: Hamish <hamish_nospam at yahoo.com>
To: Bob Covill <bcovill at tekmap.ns.ca>
Cc: grass5 at grass.itc.it, grass-bugs at intevation.de
Subject: Re: [GRASS5] NVIZ image dump broken?
Message-Id: <20060504015605.02b07422.hamish_nospam at yahoo.com>
In-Reply-To: <1146657653.6304.11.camel at linuxmain.localhost>
References: <20060502163821.GA25158 at bartok.itc.it>
	<20060503183453.608a50ae.hamish_nospam at yahoo.com>
	<20060503071052.GA15014 at bartok.itc.it>
	<20060503221409.3d7cd830.hamish_nospam at yahoo.com>
	<20060503101832.GG15014 at bartok.itc.it>
	<1146657653.6304.11.camel at linuxmain.localhost>
X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face: M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB
 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G, at rg6/QMJ
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, hits=-4.0 tagged_above=-999.0 required=3.0 tests=BAYES_00,
	FORGED_YAHOO_RCVD
X-Spam-Level: 

-------------------------------------------- Managed by Request Tracker




More information about the grass-dev mailing list