Opened 15 years ago
Closed 11 years ago
#740 closed defect (fixed)
v.edit returns incorrect results on Windows
| Reported by: | nuessli | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 6.4.3 |
| Component: | LibVector | Version: | unspecified |
| Keywords: | wingrass | Cc: | martinl |
| CPU: | x86-32 | Platform: | MSWindows XP |
Description
How to produce the bug: -Import the data attached (v.in.ascii format=standard)
-Ask for the IDs having cats=2 in layer 2 (v.edit layer=2 tool=select cats=2 type=centroid) =>Should return 3 ids but only 2 are returned...
-Ask for the IDs having cat=3 in layer 1 (v.edit layer=1 tool=select cats=3 type=centroid) =>Should return 3 ids but only 2 are returned...
This has been tested on 3 different computers on Grass 6.3.0, Grass 6.4RC5 and Grass 6.4svn(unknown revision). All give exactly the same wrong result.
This happens only under Windows: Linux versions always return the correct result, namely 3 ids in the two cases.
Attachments (1)
Change History (10)
by , 15 years ago
| Attachment: | test.grassascii added |
|---|
comment:1 by , 15 years ago
| Keywords: | v.edit added |
|---|
comment:2 by , 15 years ago
| Keywords: | wingrass added |
|---|
follow-up: 4 comment:3 by , 13 years ago
| Cc: | added |
|---|---|
| Component: | Vector → LibVector |
| Keywords: | v.edit removed |
| Milestone: | 6.4.0 → 6.4.2 |
It's seems to be a bug in Vlib category index management, wrong result returns Vect_cidx_find_all()
follow-up: 5 comment:4 by , 13 years ago
Replying to martinl:
It's seems to be a bug in Vlib category index management, wrong result returns
Vect_cidx_find_all()
See v.build opt=cdump output
------------------------------------------------------------------------------------------
Layer 2 number of unique cats: 1 number of cats: 6 number of types: 2
------------------------------------------------------------------------------------------
type | count
8 | 3
64 | 3
category | type | line/area
2 | 8 | 26
2 | 8 | 29
2 | 64 | 5
2 | 64 | 7
2 | 64 | 10
2 | 8 | 24
------------------------------------------------------------------------------------------
There is
2 | 8 | 24
missing
comment:5 by , 13 years ago
Replying to martinl:
Replying to martinl:
It's seems to be a bug in Vlib category index management, wrong result returns
Vect_cidx_find_all()See
v.build opt=cdumpoutput
> ------------------------------------------------------------------------------------------ > Layer 2 number of unique cats: 1 number of cats: 6 number of types: 2 > ------------------------------------------------------------------------------------------ > type | count > 8 | 3 > 64 | 3 > category | type | line/area > 2 | 8 | 26 > 2 | 8 | 29 > 2 | 64 | 5 > 2 | 64 | 7 > 2 | 64 | 10 > 2 | 8 | 24 > ------------------------------------------------------------------------------------------
There is
> 2 | 8 | 24
missing
ops, it's not missing, it's just reported as the last item (strange).
comment:6 by , 11 years ago
| Milestone: | 6.4.2 → 6.4.3 |
|---|
Replying to nuessli:
How to produce the bug: -Import the data attached (v.in.ascii format=standard)
v.in.ascii --overwrite input=C:\Users\neteler\Downloads\test.grassascii output=testascii format=standard
-Ask for the IDs having cats=2 in layer 2 (v.edit layer=2 tool=select cats=2 type=centroid) =>Should return 3 ids but only 2 are returned...
v.edit testascii layer=2 tool=select cats=2 type=centroid 26,29 Selecting features... 2 of 29 features selected from vector map <testascii@user1> v.edit complete.
-Ask for the IDs having cat=3 in layer 1 (v.edit layer=1 tool=select cats=3 type=centroid) =>Should return 3 ids but only 2 are returned...
v.edit testascii layer=1 tool=select cats=3 type=centroid 29,27 Selecting features... 2 of 29 features selected from vector map <testascii@user1> v.edit complete.
This has been tested on 3 different computers on Grass 6.3.0, Grass 6.4RC5 and Grass 6.4svn(unknown revision). All give exactly the same wrong result.
v.build testascii opt=cdump
---------- CATEGORY INDEX DUMP: Number of layers: 3 --------------------------------------
Layer 0 number of unique cats: 1 number of cats: 19 number of types: 1
------------------------------------------------------------------------------------------
type | count
4 | 19
category | type | line/area
0 | 4 | 1
0 | 4 | 2
0 | 4 | 3
0 | 4 | 4
0 | 4 | 5
0 | 4 | 6
0 | 4 | 7
0 | 4 | 8
0 | 4 | 9
0 | 4 | 10
0 | 4 | 11
0 | 4 | 12
0 | 4 | 13
0 | 4 | 14
0 | 4 | 15
0 | 4 | 16
0 | 4 | 17
0 | 4 | 18
0 | 4 | 19
------------------------------------------------------------------------------------------
Layer 1 number of unique cats: 7 number of cats: 26 number of types: 2
------------------------------------------------------------------------------------------
type | count
8 | 13
64 | 13
category | type | line/area
1 | 64 | 5
1 | 64 | 6
1 | 8 | 26
1 | 8 | 25
1 | 8 | 24
1 | 64 | 7
2 | 64 | 4
2 | 64 | 5
2 | 8 | 24
2 | 8 | 23
3 | 8 | 29
3 | 8 | 27
3 | 64 | 8
3 | 64 | 10
3 | 8 | 26
3 | 64 | 7
4 | 8 | 20
4 | 64 | 1
5 | 64 | 9
5 | 8 | 29
5 | 8 | 28
5 | 64 | 10
6 | 8 | 21
6 | 64 | 2
7 | 8 | 22
7 | 64 | 3
------------------------------------------------------------------------------------------
Layer 2 number of unique cats: 1 number of cats: 6 number of types: 2
------------------------------------------------------------------------------------------
type | count
8 | 3
64 | 3
category | type | line/area
2 | 8 | 26
2 | 8 | 29
2 | 64 | 5
2 | 64 | 7
2 | 64 | 10
2 | 8 | 24
------------------------------------------------------------------------------------------
Tested on today's WinGRASS:
g.version -g version=6.4.3svn revision=55719 date=2013
follow-up: 8 comment:7 by , 11 years ago
comment:8 by , 11 years ago
comment:9 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
mmetz:
Backported to relbr64/devbr6 in r55749-50.
tested report example in 6.5 latest nightly build; it's ok now: 3 ids returned. closing bug.
thanks

Testing data to reproduce the bug