Thu, Apr 27 2006
11:23:32
|
|
Request created by hbowman
|
|
Subject: v.to.db: segfault on layer > 1
v.db.addtable map_name layer=2 # or > 2
causes a segault in v.to.db:
+ v.db.connect map=tmp_a
database=/home/hamish/grassdata/spearfish60/user1/dbf/ driver=dbf layer=3
table=tmp_a_3 key=cat
WARNING: The table <tmp_a_3> is now part of vector map <tmp_a> and may be
deleted or overwritten by GRASS modules.
WARNING: Select privileges were granted on the table.
+ v.to.db tmp_a layer=3 option=cat col=cat
ERROR: G_calloc: out of memory
to recreate input map see: (swath_area vector)
http://grass.itc.it/pipermail/grassuser/2006-April/033921.html
[boundaries of that vector have a cat of -1
(it has centroid+area of cat 1 as well)
nope, using 'v.category op=del type=boundary' doesn't help]
running in kdbg...
If fails on this line (55):
Values = (VALUE *) G_calloc ( n + 1, sizeof ( VALUE ) );
because n is being used uninitialized. (n=1071328722)
n = Vect_cidx_get_num_unique_cats_by_index ( &Map,
Vect_cidx_get_field_index(&Map, options.field ) );
as Vect_cidx_get_field_index() fails to find the layer and returns -1
instead of a valid layer number.
and Vect_cidx_get_num_unique_cats_by_index() checks that the layer index
isn't >= the number of layers, but not that it could be set to -1.
so Vect_cidx_get_num_unique_cats_by_index() could use another error test,
but that still won't fix why it can't find the layer.
Hamish
|
|
Thu, Sep 21 2006
17:23:41
|
|
Mail sent by msieczka
|
|
hbowman wrote (Thu, Apr 27 2006 11:23:32):
> Subject: v.to.db: segfault on layer > 1
Hi Hamish,
I can't reproduce the error with current 6.3 CVS. Can you confirm?
Maciek
|
|
Sat, Sep 30 2006
00:28:27
|
|
Mail sent by msieczka
|
|
Hamish,
Again, can you please reply - is that bug fixed for you too?
Maciek
|
|
Sun, Oct 1 2006
08:29:07
|
|
Mail sent by hamish_nospam@yahoo.com
|
|
Return-Path |
<hamish_nospam@yahoo.com>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
Date |
Sun, 1 Oct 2006 19:28:58 +1300
|
From |
Hamish <hamish_nospam@yahoo.com>
|
To |
Maciek Sieczka via RT <grass-bugs@intevation.de>
|
Cc |
grass-dev@grass.itc.it
|
Subject |
Re: [bug #4352] (grass) v.to.db: segfault on layer > 1
|
Message-Id |
<20061001192858.4b6c07c5.hamish_nospam@yahoo.com>
|
In-Reply-To |
<20060929222827.DB3291005CE@lists.intevation.de>
|
References |
<20060929222827.DB3291005CE@lists.intevation.de>
|
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,@rg6/QMJ
|
Mime-Version |
1.0
|
Content-Type |
text/plain; charset=US-ASCII
|
Content-Transfer-Encoding |
7bit
|
X-Virus-Scanned |
by amavisd-new at intevation.de
|
X-Spam-Status |
No, hits=-2.3 tagged_above=-999 required=3 tests=[BAYES_00=-5, FORGED_YAHOO_RCVD=2.7]
|
X-Spam-Level |
|
>> http://intevation.de/rt/webrt?serial_num=4352
> is that bug fixed for you too?
I have tried just now in 6.3 and 6.1.0, and it worked:
v.db.addtable swath_area layer=3
I don't know what's different now, I don't see any change in
lib/vector/Vlib/cindex.c since then.
(no patch for this bug from 2 days ago has been applied)
Re: [GRASS-dev] Re: bug in Vect_cidx_find_next() ?
shrug, maybe just a local glitch. It was reproducable at the time.
Hamish
|
|
Sun, Oct 1 2006
13:51:40
|
|
Status changed to resolved by msieczka
|
|
Sun, Oct 1 2006
13:51:40
|
|
Mail sent by msieczka
|
|
Thanks, closing it then. Re-open if needed.
Maciek
|
|