Details Ticket 1023


Comment | Reply | Take | Open


Serial Number 1023
Subject v.extract again
Area none
Queue grass
Requestors fpacheco@dinama.gub.uy
Owner none
Status resolved
Last User Contact Sat Apr 20 12:52:13 2002 (6 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Tue Apr 23 18:04:28 2002 (6 yr ago)
Created Fri Apr 19 17:03:46 2002 (6 yr ago)

Transaction History Ticket 1023


Fri, Apr 19 2002 17:03:46    Request created by fpacheco@dinama.gub.uy  
Return-Path <neteler@itc.it>
Delivered-To grass-bugs@lists.intevation.de
Resent-Message-Id <200204191503.g3JF3KV07869@thuille.itc.it.>
Date Mon, 8 Apr 2002 10:28:50 -0300
From "Ing. Civil H/A Fernando Pacheco" <fpacheco@dinama.gub.uy>
To neteler@itc.it
Subject v.extract again
Message-Id <20020408102850.2facf838.fpacheco@dinama.gub.uy>
Organization Direcci
X-Mailer Sylpheed version 0.7.4 (GTK+ 1.2.10; i386-debian-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
Resent-From neteler@itc.it
Resent-Date Fri, 19 Apr 2002 17:03:20 +0200
Resent-To grass-bugs@intevation.de
X-Spam-Status No, hits=0 required=5 tests=SUPERLONG_LINE
Neteler:

I'm need v.extract again and it doesn't work.

I think that the problems are:

int cat_array[5000]; declare array of 5000 cat

but all the loop's like

for (i = 0; listopt->answers[i]; i++)
{
 scan_names (&cats, listopt->answers[i], &x);
 cat_array[cat_index] = x;
 cat_index++; 
}

or

while (1)
{
  if (!fgets (buffr, 39, in)) break;
  sscanf (buffr, "%[a-zA-Z., -_/$%@!#0-9]", text); 
  /*sscanf (buffr, "%s", text); */
  /*scan %s stops at whitespace?*/
  scan_names (&cats, text, &x);
  cat_array[cat_index] = x;
  cat_index++; 
}

or

while (x <= y)
{
 cat_array[cat_index] = x++;
 cat_index++; 
} 

and others don't check the max of the cat_array array (5000). I'm working with
a small area of my country (I'm live at Uruguay a small country in South America).
I have more than 5000 lines to extract then I recieve segmentation fault message.
I think put categories to extract in a array It's a bad idea.

To set the number of categories the program use 
 recd = pcats->num;
I think this is the numbrer of the max. categorie, but not number of categories.
The code must be:
 recd = pcats->ncats;
I debug another errors but I don't now what happend yet.
I don't have to much time to fix this errors (I'm a Civil Environment-Hydraulic
Engineer not a programmer) but I'll try.
Thank you for your time. Fernando Pacheco.           
P.D. -> Since 01/May/2002 where are mirror site of grass at http://www.dinama.gub.uy/grass/.
Fri, Apr 19 2002 21:18:05    Mail sent by glynn.clements@virgin.net  
Return-Path <glynn.clements@virgin.net>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn.clements@virgin.net>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <15552.27941.17812.587319@cerise.nosuchdomain.co.uk>
Date Fri, 19 Apr 2002 20:16:53 +0100
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #1023] (grass) v.extract again
In-Reply-To <20020419150346.C351713A18@lists.intevation.de>
References <20020419150346.C351713A18@lists.intevation.de>
X-Mailer VM 6.94 under 21.4 (patch 4) "Artificial Intelligence (candidate #1)" XEmacs Lucid
X-Spam-Status No, hits=0 required=5 tests=
Request Tracker wrote:

> I'm need v.extract again and it doesn't work.
> 
> I think that the problems are:
> 
> int cat_array[5000]; declare array of 5000 cat

I've committed a fix which re-allocates the array as necessary.

> To set the number of categories the program use 
>  recd = pcats->num;
> 
> I think this is the numbrer of the max. categorie, but not number of
> categories. The code must be:
> 
>  recd = pcats->ncats;

I'm not sufficiently familiar with category handling to be sure; can
anyone else comment on this?

-- 
Glynn Clements <glynn.clements@virgin.net>


Sat, Apr 20 2002 02:38:01    Mail sent by egm2@jps.net  
Return-Path <egm2@jps.net>
Delivered-To grass-bugs@lists.intevation.de
Date Fri, 19 Apr 2002 17:38:50 -0700
From "Eric G. Miller" <egm2@jps.net>
To Request Tracker <grass-bugs@intevation.de>, grass5@grass.itc.it
Subject Re: [GRASS5] [bug #1023] (grass) v.extract again
Message-ID <20020420003850.GA15036@calico.local>
Mail-Followup-To Request Tracker <grass-bugs@intevation.de>, grass5@grass.itc.it
References <20020419150346.C351713A18@lists.intevation.de> <15552.27941.17812.587319@cerise.nosuchdomain.co.uk>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <15552.27941.17812.587319@cerise.nosuchdomain.co.uk>
User-Agent Mutt/1.3.28i
Sender "Eric G. Miller" <egm2@jps.net>
X-Spam-Status No, hits=3 required=5 tests=FROM_ENDS_IN_NUMS,RCVD_IN_OSIRUSOFT_COM
On Fri, Apr 19, 2002 at 08:16:53PM +0100, Glynn Clements wrote:
> 
> Request Tracker wrote:
> 
> > I'm need v.extract again and it doesn't work.
> > 
> > I think that the problems are:
> > 
> > int cat_array[5000]; declare array of 5000 cat
> 
> I've committed a fix which re-allocates the array as necessary.
> 
> > To set the number of categories the program use 
> >  recd = pcats->num;
> > 
> > I think this is the numbrer of the max. categorie, but not number of
> > categories. The code must be:
> > 
> >  recd = pcats->ncats;
> 
> I'm not sufficiently familiar with category handling to be sure; can
> anyone else comment on this?

"num" is highest category number, "ncats" is total number of entries.
Sounds like it should be "ncats".  Category numbers certainly don't
have to be continuous.

-- 
Eric G. Miller <egm2@jps.net>


Sat, Apr 20 2002 12:52:13    Mail sent by glynn.clements@virgin.net  
Return-Path <glynn.clements@virgin.net>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn.clements@virgin.net>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <15553.18264.291011.225526@cerise.nosuchdomain.co.uk>
Date Sat, 20 Apr 2002 11:47:52 +0100
To grass5@grass.itc.it
Cc Request Tracker <grass-bugs@intevation.de>
Subject Re: [GRASS5] [bug #1023] (grass) v.extract again
In-Reply-To <20020420003850.GA15036@calico.local>
References <20020419150346.C351713A18@lists.intevation.de> <15552.27941.17812.587319@cerise.nosuchdomain.co.uk> <20020420003850.GA15036@calico.local>
X-Mailer VM 6.94 under 21.4 (patch 4) "Artificial Intelligence (candidate #1)" XEmacs Lucid
X-Spam-Status No, hits=0 required=5 tests=
Eric G. Miller wrote:

> > > To set the number of categories the program use 
> > >  recd = pcats->num;
> > > 
> > > I think this is the numbrer of the max. categorie, but not number of
> > > categories. The code must be:
> > > 
> > >  recd = pcats->ncats;
> > 
> > I'm not sufficiently familiar with category handling to be sure; can
> > anyone else comment on this?
> 
> "num" is highest category number, "ncats" is total number of entries.
> Sounds like it should be "ncats".  Category numbers certainly don't
> have to be continuous.

OK, fixed.

-- 
Glynn Clements <glynn.clements@virgin.net>


Tue, Apr 23 2002 18:04:28    Status changed to resolved by gclements  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request