Opened 10 years ago

Closed 9 years ago

#843 closed defect (fixed)

v.digit broken on new WinGrass release

Reported by: cnielsen Owned by: grass-dev@…
Priority: major Milestone: 6.4.0
Component: Tcl/Tk Version: svn-releasebranch64
Keywords: wingrass, v.digit Cc:
CPU: x86-64 Platform: MSWindows XP

Description

Vector digitizing windows open properly, both in the tcltk and the new wxpython menu item.

However after a feature is digitized, as I right-click to finish the feature, the window closes and the following error message shows up in the "Output" window or "Command output" tab depending on the GUI

v.digit map=test2@user1                                                         
ERROR: F_open is not supported on Windows
Building topology for vector map <test2>...
Registering primitives...
2 primitives registered
18 vertices registered
Building areas...
0 areas built
0 isles built
Attaching islands...
Attaching centroids...

Attachments (1)

libform.patch (28.5 KB) - added by marisn 10 years ago.
v.digit and lib/form merge/cleanup

Download all attachments as: .zip

Change History (34)

comment:1 in reply to:  description Changed 10 years ago by hellik

Replying to cnielsen:

v.digit map=test2@user1                                                         
ERROR: F_open is not supported on Windows
Building topology for vector map <test2>...
Registering primitives...
2 primitives registered
18 vertices registered
Building areas...
0 areas built
0 isles built
Attaching islands...
Attaching centroids...

confirmed at WinVista32 with the error message: ERROR: F_open is not supported on Windows [...]

Helmut

comment:2 Changed 10 years ago by hamish

hmmm, worked for me in my test with "v.digit -n" which did not open an existing map.

Hamish

comment:3 Changed 10 years ago by hamish

looking at the F_open code in question (lib/form/open.c), there seem to be #ifdefs in there around the UNIX socket code already, so why would it be disabled?

Hamish

comment:4 Changed 10 years ago by cmbarton

Could it be the fully qualified map name (map@mapset)?

Michael

comment:5 in reply to:  4 ; Changed 10 years ago by hamish

Priority: normalcritical

I can reproduce this now from both the wx and tcltk GUIs.

digitize [new] -> settings -> table tab -> create table -> ok

(interestingly the dbf.exe empty dosbox locked up when I tried to run it from gis.m)

then draw a boundary with "No category" set, move vertex to snap it shut, then try to add a centroid with cats set to "Next not used". Boom, G_fatal_error( "F_open_*() doesn't do ms windows").

In my earlier test I didn't try to do anything with an attribute table.

I expect that the tcl version of d.what.vect will have the same problem as it also uses the form library.

Replying to cmbarton:

Could it be the fully qualified map name (map@mapset)?

it's this in lib/form/open.c:

/* Open new form
 *
 *  returns: 0 success
 */
#ifdef __MINGW32__
int F_open(char *title, char *html)
{
    G_fatal_error("F_open is not supported on Windows");
    return 1;
}
#else
int F_open(char *title, char *html)
{
    /* parent */
    int c;

    /* common */
    static int pid;

#ifndef HAVE_SOCKET
    static int p1[2], p2[2];
#endif /*HAVE_SOCKET */
    int length;

    /* child */

    G_debug(2, "F_open(): title = %s", title);

    if (first) {
#ifdef HAVE_SOCKET
...

the question is, is that fatal error really necessary if all the UNIX socket code is protected?

bumping up the priority level of this bug as currently there is no vector digitizing functionality available on MS Win, which is not a good situation.

Workarounds: use the qgis digitizer or cygwin build.

Hamish

comment:6 Changed 10 years ago by cmbarton

This is too bad, especially since we just finally got this easily available to Windows users.

Michael

comment:7 in reply to:  5 ; Changed 10 years ago by glynn

Replying to hamish:

it's this in lib/form/open.c:

Huh? That matches the error message, but v.digit shouldn't be using lib/form. It has its own embedded copy of the form library.

Oh. develbranch_6 has LIBES=$(FORMLIB) in vector/v.digit/Makefile, 6.4.0-RC5 doesn't; see r38954. That explains why v.digit works for me (6.4.0-RC5, native Windows).

comment:8 in reply to:  7 Changed 10 years ago by hamish

Replying to glynn:

Huh? That matches the error message, but v.digit shouldn't be using lib/form. It has its own embedded copy of the form library.

Oh. develbranch_6 has LIBES=$(FORMLIB) in vector/v.digit/Makefile, 6.4.0-RC5 doesn't; see r38954. That explains why v.digit works for me (6.4.0-RC5, native Windows).

or more precisely it happened at r39141, when that Makefile change was backported to the 6.4 branch. so the latest 6.4.0svn40049 native wingrass build I'm testing uses $(FORMLIB), while the 6.4.0rc5 release did not use that.

I am not familiar enough with this part of the code to provide much comment beyond that, only that I am glad that this is not as deep as I feared it could be.

Hamish

comment:9 in reply to:  7 ; Changed 10 years ago by marisn

Replying to glynn:

Huh? That matches the error message, but v.digit shouldn't be using lib/form. It has its own embedded copy of the form library.

Oh. develbranch_6 has LIBES=$(FORMLIB) in vector/v.digit/Makefile, 6.4.0-RC5 doesn't; see r38954. That explains why v.digit works for me (6.4.0-RC5, native Windows).

"Own embedded copy" is a good reason for trouble. Before r38954 form lib was out of sync. If lib/form was broken before r38954 then something else was broken too (nviz? d.what?). Unfortunately I have no idea about sockets/pipes on windows. According to lib/form history, Glynn should have an idea how sockets/pipes/etc. works on Windows.

comment:10 in reply to:  9 Changed 10 years ago by glynn

Replying to marisn:

Huh? That matches the error message, but v.digit shouldn't be using lib/form. It has its own embedded copy of the form library.

"Own embedded copy" is a good reason for trouble. Before r38954 form lib was out of sync. If lib/form was broken before r38954 then something else was broken too (nviz? d.what?).

By "embedded", I mean "in-process". The form library in lib/form consists of a custom "wish" which has a command for executing SQL, and a library which spawns this as a slave process. The version in v.digit doesn't use a separate child process; the form code has been merged into the main v.digit program (which is also a custom wish).

The separate form library is still used by nviz and d.what.vect.

Unfortunately I have no idea about sockets/pipes on windows. According to lib/form history, Glynn should have an idea how sockets/pipes/etc. works on Windows.

I don't have much of an idea either. I do know that Windows doesn't understand Unix-domain sockets (so no socketpair()). It does have a _pipe() function which is roughly equivalent to the Unix version, but the lack of fork() means that creating a slave process is nothing like on Unix.

comment:11 Changed 10 years ago by marisn

As lib/forms F_open is used only by v.digit and d.what.vect, it's not worth to fix forms lib. Reverted to old v.digit F_open in r40128. Please test on Windows and backport to releasebranch if it helps.

comment:12 in reply to:  11 ; Changed 10 years ago by glynn

Replying to marisn:

As lib/forms F_open is used only by v.digit and d.what.vect,

It's used by d.what.vect and NVIZ.

v.digit doesn't use lib/form (at least, it's not supposed to use lib/form, as it has its own version of the code).

comment:13 in reply to:  12 ; Changed 10 years ago by marisn

Replying to glynn:

Replying to marisn:

As lib/forms F_open is used only by v.digit and d.what.vect,

It's used by d.what.vect and NVIZ.

d.what.vect AFAIK doesn't work on Windows due to X dependency. Not a issue. NVIZ does NOT use F_open(). lib/forms are used by more than v.digit and d.what.vect modules, but only those two call F_open(). Others use plain F_generate, which works just fine.

v.digit doesn't use lib/form (at least, it's not supposed to use lib/form, as it has its own version of the code).

Only part of the form lib that could be v.digit own, is F_open() and also only because it's not worth effort to make lib/form F_open() Windows-ready. F_generate() is generic enough to NOT keep many copies around.

comment:14 in reply to:  13 ; Changed 10 years ago by glynn

Replying to marisn:

As lib/forms F_open is used only by v.digit and d.what.vect,

It's used by d.what.vect and NVIZ.

d.what.vect AFAIK doesn't work on Windows due to X dependency. Not a issue. NVIZ does NOT use F_open(). lib/forms are used by more than v.digit and d.what.vect modules, but only those two call F_open(). Others use plain F_generate, which works just fine.

v.digit doesn't use lib/form's F_{open,clear,close} functions; it has its own functions with those names, which don't spawn a separate process. Except, linking against lib/form for F_generate() seems to cause lib/form's F_open (etc) to override the local version.

It would be possible to modify v.digit to use different names (this may also need to be done for reset_values(), set_value() and submit() in form.c), but I'm still concerned about the potential side-effects of linking against lib/form. Personally, I consider cloning F_generate() to be the lesser evil.

If d.what.vect is the only module which uses lib/form's F_open(), I'd consider removing that code from lib/form and putting it in d.what.vect instead. That would simplify lib/form and eliminate the Windows issues.

comment:15 Changed 10 years ago by hamish

Glynn:

If d.what.vect is the only module which uses lib/form's F_open(), I'd consider removing that code from lib/form and putting it in d.what.vect instead. That would simplify lib/form and eliminate the Windows issues.

my 1/2c: at some point we have to stop refactoring working code in 6.x. Any new perturbation introduces the potential for new problems and this is supposed to be the stable branch. The old lib/form/open.c + d.what.vect is working fine on UNIX and is irrelevant elsewhere, so my vote is to just leave well enough alone, put things back to the way they were as much as possible, sync whatever bugfixes need syncing between the clones, and move on.

would a more portable version of lib/form do some good in some other area, or is this it?

thanks, Hamish

Changed 10 years ago by marisn

Attachment: libform.patch added

v.digit and lib/form merge/cleanup

comment:16 in reply to:  14 ; Changed 10 years ago by marisn

Replying to glynn:

It would be possible to modify v.digit to use different names (this may also need to be done for reset_values(), set_value() and submit() in form.c), but I'm still concerned about the potential side-effects of linking against lib/form. Personally, I consider cloning F_generate() to be the lesser evil.

If d.what.vect is the only module which uses lib/form's F_open(), I'd consider removing that code from lib/form and putting it in d.what.vect instead. That would simplify lib/form and eliminate the Windows issues.

As removing something from lib/form will break backwards compatability. I attached patch that renames v.digit F_ function copies and removes futurer duplicate code. Worksforme, needs review.

comment:17 in reply to:  16 Changed 10 years ago by glynn

Replying to marisn:

As removing something from lib/form will break backwards compatibility.

Why does that matter? I'm fairly sure that we don't want anything else using lib/form, particularly F_open().

I attached patch that renames v.digit F_ function copies and removes futurer duplicate code. Worksforme, needs review.

I'm still don't see why we can't just revert the v.digit changes and sync its copy of generate.c to the lib/form copy.

I don't particularly like cloning code, but in this case the cure is worse than the disease.

comment:18 Changed 10 years ago by hamish

Priority: criticalblocker

this is a blocker as 2 of 2 vector digitizers are now broken in current 6.4 wingrass. Fortunately the solution for the tcl one seems well in hand & forthcoming. Will backport revert then sync solution to the 6.4 branch as soon as it is tested & confirmed in 6.5.

comment:19 in reply to:  18 Changed 10 years ago by hellik

Replying to hamish:

this is a blocker as 2 of 2 vector digitizers are now broken in current 6.4 wingrass. Fortunately the solution for the tcl one seems well in hand & forthcoming. Will backport revert then sync solution to the 6.4 branch as soon as it is tested & confirmed in 6.5.

from dev-ml:

Hamish wrote:
> > * 843 v.digit broken on new WinGrass release
> >   -> contains a suggestion
> 
> Maris and Glynn are working to resolve this. Seems plausible that it 
> will be backported and ready for final testing by next week.

FWIW, I've changed 6.5 as I consider appropriate, i.e. removed
$(FORMLIB) and sync'd generate.c to lib/form's version.

tested on a fresh build of grass65 on WinVista32:

=> v.digit is working

Helmut

comment:20 Changed 10 years ago by hamish

stuff sync'd/backported from devbr6 to relbr64 with r40401.

while testing it, I noticed this build warning:

proto.h:56: warning: 'struct line_pnts' declared inside parameter list
proto.h:56: warning: its scope is only this definition or declaration, which is probably not what you want

Hamish

comment:21 Changed 10 years ago by glynn

--- vector/v.digit/form.c	(revision 40258)
+++ vector/v.digit/form.c	(working copy)
@@ -13,6 +13,7 @@
 #include <grass/gis.h>
 #include <grass/dbmi.h>
 #include <grass/form.h>
+#include <grass/Vect.h>
 #include "proto.h"
 
 /* Structure to store column names and values */

comment:22 Changed 10 years ago by neteler

Warning fix submitted in r40405 (6.5).

comment:23 Changed 10 years ago by neteler

Warning also fixed in 6.4 (r40406).

comment:24 Changed 10 years ago by hamish

as far as I can tell in the latest wingrass installer v.digit(tcl) works so this is no longer critical, but I get an unexplained error message when I close it:

Region restored to original extent.
Building topology for vector map <(null)>...
Registering promitives...
Unable to read vector map

I also notice an error in the output:

DBMI-SQLite driver error:
Error in sqlite3_prepare():
near "where" syntax error
Cannot update table

I'm guessing that is because I hit submit (or didn't) in the Form when the only column in the table was cat? (???) the output from v.db.select looks as it should.

?, Hamish

comment:25 Changed 10 years ago by hamish

Component: VectorTcl
Priority: blockercritical

it now works so no longer a blocker, but needs testing as per

  Building topology for vector map <(null)>...

and

  Error in sqlite3_prepare():

error messages seen in comment:24.

Hamish

comment:26 Changed 10 years ago by hamish

Version: unspecifiedsvn-releasebranch64

tested with wingrass r41386. still get the error on exit.

Region restored to original extent.
Building topology for vector map <(null)>...
Registering promitives...
Unable to read vector map

Hamish

comment:28 in reply to:  27 Changed 10 years ago by hellik

Replying to hellik:

Replying to hamish:

 Region restored to original extent.

http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/vector/v.digit/centre.c#L176

 Building topology for vector map <(null)>...

http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/lib/vector/Vlib/build.c#L123

 Registering promitives...
 Unable to read vector map

http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/lib/vector/Vlib/build_nat.c#L514

[...]
D2/3:   Tool_next = 1
D3/3: new_line(): End
D2/3: Quit
D1/3: end()
D3/3: Vect_build(): build = 0
D3/3: Vect_build_nat() build = 0
D2/3: dig_free_plus_areas()
D2/3: dig_free_plus_isles()
D2/3: dig_free_plus_areas()
D2/3: dig_free_plus_isles()
D2/3: dig_free_plus_nodes()
D2/3: dig_free_plus_lines()
D3/3: Vect_build(): build = 4
Erstelle Topologie für die Vektorkarte <textvect>...
D2/3: dig_cidx_free()
D3/3: dig_cidx_init()
D3/3: Vect_build_nat() build = 4
D1/3: Vect_Rewind(): name = textvect
Registriere Primitive...
D3/3: Vect_read_next_line()
D3/3: V1_read_next_line_nat()
D3/3: Vect__Read_line_nat: offset = 14
D3/3:     type = 1, do_cats = 1 dead = 0
D3/3:     n_cats = 1
D3/3:     n_points = 1
D3/3:     off = 43
D3/3: Register line: offset = 14
D3/3: Register node: type = 1,  633486.570248,225933.884298
D3/3: dig_find_node()
D3/3: node = 0
D3/3: dig_add_node(): n_nodes = 0, alloc_nodes = 0
D3/3: dig_spidx_add_node(): node = 1, x,y,z = 633486.570248,
225933.884298, 0.000000
D3/3: new node = 1, n_nodes = 1, alloc_nodes = 1000
D3/3: Add new node: 1
D3/3: dig_node_add_line(): node = 1 line = 1
D3/3: dig_node_alloc_line(): add = 1
D3/3:     angle = -9.000000
D3/3: dig_node_add_line(): line 1 added position 0 n_lines:
1 angle -9.000000
D3/3: dig_node_add_updated(): node = 1
D3/3: dig_spidx_add_line(): line = 1
D3/3: dig_line_add_updated(): line = 1
D3/3: dig_cidx_add_cat(): field = 1 cat = 1 line = 1 type =
1
D3/3: Vect_read_next_line()
D3/3: V1_read_next_line_nat()
D3/3: Vect__Read_line_nat: offset = 43
D3/3:     type = 1, do_cats = 1 dead = 0
D3/3:     n_cats = 1
D3/3:     n_points = 1
D3/3:     off = 72
D3/3: Register line: offset = 43
D3/3: Register node: type = 1,  642495.867769,220494.834711
D3/3: dig_find_node()
D3/3: node = 0
D3/3: dig_add_node(): n_nodes = 1, alloc_nodes = 1000
D3/3: dig_spidx_add_node(): node = 2, x,y,z = 642495.867769,
220494.834711, 0.000000
D3/3: new node = 2, n_nodes = 2, alloc_nodes = 1000
D3/3: Add new node: 2
D3/3: dig_node_add_line(): node = 2 line = 2
D3/3: dig_node_alloc_line(): add = 1
D3/3:     angle = -9.000000
D3/3: dig_node_add_line(): line 2 added position 0 n_lines:
1 angle -9.000000
D3/3: dig_node_add_updated(): node = 2
D3/3: dig_spidx_add_line(): line = 2
D3/3: dig_line_add_updated(): line = 2
D3/3: dig_cidx_add_cat(): field = 1 cat = 2 line = 2 type =
1
D3/3: Vect_read_next_line()
D3/3: V1_read_next_line_nat()
D3/3: Vect__Read_line_nat: offset = 72
2 primitives registered
2 vertices registered
Building areas...
0 areas built
0 isles built
Füge Inseln hinzu...
Füge Zentroide hinzu...
Die Topologie wurde erstellt
D2/3: dig_cidx_sort()
Anzahl von Knoten: 2
Anzahl von Primitives: 2
Anzahl von Punkten : 2
Anzahl von Linien: 0
Anzahl von Boundaries: 0
Anzahl von Zentroiden: 0
Anzahl von Flächen: 0
Anzahl von Inseln: 0
D1/3: Vect_close(): name = textvect, mapset = user1, format
= 0, level = 2
D1/3: get coor info:
C:\gisdata\grassdata/nc_spm_08/user1/vector/textvect/coor
D2/3: ftell = 72
D1/3: Info->size = 72, Info->mtime = 1268436527
D1/3: Vect_save_topo()
D1/3: Open topo:
C:\gisdata\grassdata/nc_spm_08/user1/vector/textvect/topo
D2/3: topo body offset 142
D3/3: dig_Wr_P_node()
D3/3: dig_Wr_P_node()
D2/3: topo body offset 142
D2/3: Vect_cidx_save()
D2/3: Open cidx:
C:\gisdata\grassdata/nc_spm_08/user1/vector/textvect/cidx
D3/3: dig_write_cidx_head()
D3/3: cidx 0 head offset: 13
D3/3: cidx 0 offset: 0
D3/3: cidx body offset 41
D3/3: dig_write_cidx_head()
D3/3: cidx 0 head offset: 13
D3/3: cidx 0 offset: 41
D3/3: cidx body offset 41
D1/3: close history file
D1/3: V1_close_nat(): name = textvect mapset= user1
D1/3: get coor info:
C:\gisdata\grassdata/nc_spm_08/user1/vector/textvect/coor
D2/3: ftell = 72
D1/3: Info->size = 72, Info->mtime = 1268436527
D1/3: dig__write_head()
D1/3: write coor size (72) to head
D2/3: coor body offset 14
D1/3: Vect_get_thresh(): thresh = 0.000000
D1/3: Vect_write_dblinks(): map = textvect, mapset = user1
D1/3: dbln file:
C:\gisdata\grassdata/nc_spm_08/user1/vector/textvect/dbln
D1/3: 1 textvect cat $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
dbf
D1/3: Dblinks written
Region auf die ursprünglich Ausdehnung zurückgesetzt.
D3/3: c_next_tool()
D2/3:   Tool_next = 1
D2/3: Quit
D1/3: end()
D3/3: Vect_build(): build = 0
D3/3: Vect_build_nat() build = 0
D2/3: dig_free_plus_areas()
D2/3: dig_free_plus_isles()
D2/3: dig_free_plus_areas()
D2/3: dig_free_plus_isles()
D2/3: dig_free_plus_nodes()
D2/3: dig_free_plus_lines()
D3/3: Vect_build(): build = 4
Erstelle Topologie für die Vektorkarte <(null)>...
D2/3: dig_cidx_free()
D3/3: dig_cidx_init()
D3/3: Vect_build_nat() build = 4
Registriere Primitive...
D3/3: Vect_read_next_line()
Kann die Vektorkarte nicht lesen.
D1/3: Vect_close(): name = (null), mapset = (null), format =
0, level = 1

comment:29 Changed 10 years ago by marisn

Just tested v.digit launched from CMD and wxgui running WinGRASS-6.4.SVN-r41749-1 on Vista - everything works just fine (except strange window named "dbf.exe" after creating database).

comment:30 in reply to:  29 ; Changed 10 years ago by hamish

Replying to marisn:

Just tested v.digit launched from CMD and wxgui running WinGRASS-6.4.SVN-r41749-1 on Vista - everything works just fine (except strange window named "dbf.exe" after creating database).

... but do you see this as the last messages on exit, as I do on a XP machine?

Region restored to original extent.
Building topology for vector map <(null)>...
Registering promitives...
Unable to read vector map

Hamish

comment:31 in reply to:  30 Changed 10 years ago by marisn

Ah. Sorry - slipped under my radar. I clearly see error message, still resulting vector seems to be fine, as displaying, query, v.info and v.report are running fine without errors.

Here's output when creating new map "bar" with single point without attribute information:

D2/3: Variable = 0040E0C0

D1/3: Vect_get_thresh(): thresh = 0.000000

D2/3: topo body offset 142
D2/3: topo body offset 142

D1/3: Vector format: 0 (native)
D1/3: Vect_set_thresh(): thresh = 0.000000
D1/3: Vect__read_head(): vector = bar@user1
D1/3: Vect_set_thresh(): thresh = 0.000000
D1/3: Level request = 0
D1/3: Vect_open_topo(): name = bar mapset= user1
D1/3: get coor info: C:\Users\Maris\Documents\GIS DataBase/spearfish60/user1/vector/bar/coor
D1/3: Info->size = 14, Info->mtime = 1270717167
D2/3: Topo header: file version 5.0 , supported from GRASS version 5.0
D2/3:   byte order 0
D2/3:   header size 142
D2/3:   with_z 0
D2/3:   coor size 14
D1/3: Topo head: coor size = 14, coor mtime = 1270717167
D1/3: dig_load_plus()
D3/3: dig_init_plus()
D1/3: dig_spidx_init()
D3/3: dig_cidx_init()
D2/3: Topo header: file version 5.0 , supported from GRASS version 5.0
D2/3:   byte order 0
D2/3:   header size 142
D2/3:   with_z 0
D2/3:   coor size 14
D3/3: dig_alloc_isle():
D2/3: Vect_cidx_open(): name = bar mapset= user1
D3/3: dig_cidx_init()
D3/3: dig_read_cidx()
D3/3: dig_cidx_init()
D3/3: Cidx header: file version 5.0 , supported from GRASS version 5.0
D2/3: Vect_cidx_save()
D2/3: Open cidx: C:\Users\Maris\Documents\GIS DataBase/spearfish60/user1/vector/bar/cidx
D3/3: dig_write_cidx_head()
D3/3: cidx body offset 13
D3/3: dig_write_cidx_head()
D3/3: cidx body offset 13
D1/3: close history file
D1/3: V1_close_nat(): name = bar mapset= user1
D1/3: get coor info: C:\Users\Maris\Documents\GIS DataBase/spearfish60/user1/vector/bar/coor
D2/3: ftell = 14
D1/3: Info->size = 14, Info->mtime = 1270717167
D1/3: dig__write_head()
D1/3: write coor size (14) to head
D2/3: coor body offset 14
D1/3: Vect_get_thresh(): thresh = 0.000000
D1/3: Vect_write_dblinks(): map = bar, mapset = user1
D1/3: dbln file: C:\Users\Maris\Documents\GIS DataBase/spearfish60/user1/vector/bar/dbln
D1/3: Dblinks written
D1/3: Vect_open_old(): name = bar mapset= user1 update = 1
D1/3: Vect_set_thresh(): thresh = 0.000000
D3/3: dig_init_plus()
D1/3: dig_spidx_init()
D3/3: dig_cidx_init()
D1/3: open format file: 'user1/vector/bar/frmt'
D1/3: dig__write_head()
D1/3: write coor size (0) to head
D2/3: coor body offset 14
D3/3: dig_init_plus()
D1/3: dig_spidx_init()
D3/3: dig_cidx_init()
D3/3: Vect_build(): build = 4
Building topology for vector map <bar>...

D2/3: dig_cidx_free()
D3/3: dig_cidx_init()
D3/3: Vect_build_nat() build = 4
D1/3: Vect_Rewind(): name = bar
Registering primitives...

D3/3: Vect_read_next_line()
D3/3: V1_read_next_line_nat()
D3/3: Vect__Read_line_nat: offset = 14
0 primitives registered

0 vertices registered

Building areas...

0 areas built

0 isles built

Attaching islands...

Attaching centroids...

D2/3: dig_cidx_sort()
Number of nodes: 0

Number of primitives: 0

Number of points: 0

Number of lines: 0

Number of boundaries: 0

Number of centroids: 0

Number of areas: 0

Number of isles: 0

D1/3: Vect_close(): name = bar, mapset = user1, format = 0, level = 2
D1/3: get coor info: C:\Users\Maris\Documents\GIS DataBase/spearfish60/user1/vector/bar/coor
D2/3: ftell = 14
D1/3: Info->size = 14, Info->mtime = 1270717167
D1/3: Vect_save_topo()
D1/3: Open topo: C:\Users\Maris\Documents\GIS DataBase/spearfish60/user1/vector/bar/topo
D2/3: G__read_Cell_head
D2/3: G__read_Cell_head_array
D3/3: region item: proj:       1
D3/3: region item: zone:       13
D3/3: region item: north:      4928010
D3/3: region item: south:      4913700
D3/3: region item: east:       609000
D3/3: region item: west:       589980
D3/3: region item: cols:       634
D3/3: region item: rows:       477
D3/3: region item: e-w resol:  30
D3/3: region item: n-s resol:  30
D3/3: region item: top:        1
D3/3: region item: bottom:     0
D3/3: region item: cols3:      634
D3/3: region item: rows3:      477
D3/3: region item: depths:     1
D3/3: region item: e-w resol3: 30
D3/3: region item: n-s resol3: 30
D3/3: region item: t-b resol:  1
D1/3: Region: N = 4928010.000000 S = 4913700.000000 E = 609000.000000 W = 589980.000000
Jauna tukða karte ir izveidota.

D2/3: Vect_open_new(): name = bar
D1/3: Vect_set_thresh(): thresh = 0.000000
D1/3: V1_open_new_nat(): name = bar

D3/3:   byte order 0
D3/3:   header size 9
D1/3: V1_open_old_nat(): name = bar mapset = user1
D2/3: Coor header: file version 5.1 , supported from GRASS version 5.1
D2/3:   byte order 0
D2/3:   header size 14
D2/3:   with_z 0
D2/3:   coor size 14
D1/3: get coor info: C:\Users\Maris\Documents\GIS DataBase/spearfish60/user1/vector/bar/coor
D1/3: Info->size = 14, Info->mtime = 1270717167
D1/3: coor size in head = 14, real coor file size= 14
D1/3: Vect_open_old(): vector opened on level 2
D1/3: Vect_read_dblinks(): map = bar, mapset = user1
D3/3: Searching for FID column in OGR DB
D1/3: dbln file: C:\Users\Maris\Documents\GIS DataBase/spearfish60/user1/vector/bar/dbln
D1/3: Dblinks read
D1/3: Vect_Rewind(): name = bar
D3/3: Vect_build_sidx_from_topo()
D1/3: dig_spidx_init()
D3/3: Spatial index was built
D3/3: Vect_hist_command()
D3/3: G_recreate_command()
D1/3: Map opened
D2/3: cat_init()
D2/3: symb_line_init()
D2/3: symb_node_init()
D3/3: Starting Tk_Main.
D3/3: v.digit Tcl_AppInit (...)
D3/3: Starting toolbox.tcl

D3/3: c_tool_centre()
D2/3: var_init
D2/3: Variable = 0040E0C0
D2/3: cat_max_get() field = 1
D2/3: display_bg()
D2/3: display_map()
D2/3: set color to symb 2: 255 255 0
D2/3: set color to symb 13: 0 153 0
D2/3: set color to symb 12: 255 0 0
D2/3: get_symb_code(): name = background
D2/3: -> code = 1
D2/3: i_set_color(): background : 255 255 255
D2/3:  -> color = #ffffff
D2/3: i_set_on(): background : 1
D2/3: get_symb_code(): name = highlight
D2/3: -> code = 2
D2/3: i_set_color(): highlight : 255 255 0
D2/3:  -> color = #ffff00
D2/3: i_set_on(): highlight : 1
D2/3: get_symb_code(): name = point
D2/3: -> code = 3
D2/3: i_set_color(): point : 0 0 0
D2/3:  -> color = #000000
D2/3: i_set_on(): point : 1
D2/3: get_symb_code(): name = line
D2/3: -> code = 4
D2/3: i_set_color(): line : 0 0 0
D2/3:  -> color = #000000
D2/3: i_set_on(): line : 1
D2/3: get_symb_code(): name = boundary_0
D2/3: -> code = 5
D2/3: i_set_color(): boundary_0 : 153 153 153
D2/3:  -> color = #999999
D2/3: i_set_on(): boundary_0 : 1

D2/3: get_symb_code(): name = boundary_1
D2/3: -> code = 6
D2/3: i_set_color(): boundary_1 : 255 125 0
D2/3:  -> color = #ff7d00
D2/3: i_set_on(): boundary_1 : 1
D2/3: get_symb_code(): name = boundary_2
D2/3: -> code = 7
D2/3: i_set_color(): boundary_2 : 0 255 0
D2/3:  -> color = #00ff00
D2/3: i_set_on(): boundary_2 : 1
D2/3: get_symb_code(): name = centroid_in
D2/3: -> code = 8
D2/3: i_set_color(): centroid_in : 0 0 153
D2/3:  -> color = #000099
D2/3: i_set_on(): centroid_in : 1
D2/3: get_symb_code(): name = centroid_out
D2/3: -> code = 9
D2/3: i_set_color(): centroid_out : 153 153 0
D2/3:  -> color = #999900
D2/3: i_set_on(): centroid_out : 1
D2/3: get_symb_code(): name = centroid_dupl
D2/3: -> code = 10
D2/3: i_set_color(): centroid_dupl : 255 0 255
D2/3:  -> color = #ff00ff
D2/3: i_set_on(): centroid_dupl : 1
D2/3: get_symb_code(): name = node_1
D2/3: -> code = 12
D2/3: i_set_color(): node_1 : 255 0 0
D2/3:  -> color = #ff0000
D2/3: i_set_on(): node_1 : 1
D2/3: get_symb_code(): name = node_2
D2/3: -> code = 13

D2/3: i_set_color(): node_2 : 0 153 0

D2/3: Cat modes: $GWidget(cat_mode) configure -values [list "No category" "Manual entry" "Next not used"]
D2/3:  -> color = #009900
D2/3: i_set_on(): node_2 : 1
D3/3: c_update_tool()
D3/3: c_next_tool()
D2/3:   Tool_next = 2
D2/3: new_line(): type = 1
D2/3: Cat modes: $GWidget(cat_mode) configure -values [list "No category" "Manual entry" "Next not used"]
D2/3: Cat mode: $GWidget(cat_mode) setvalue @2
D3/3: new_line(): End
D2/3: new_line(): type = 1

D2/3: Cat mode: $GWidget(cat_mode) setvalue @2
D2/3: new_line(): type = 1
D2/3: Cat modes: $GWidget(cat_mode) configure -values [list "No category" "Manual entry" "Next not used"]
D2/3: Cat mode: $GWidget(cat_mode) setvalue @2
D3/3: c_update_tool()
D3/3: button = 1 x = 216 = 596366.280992 y = 184 = 4922569.834711
D2/3: snap(): x = 596366.280992, y = 4922569.834711
D3/3: Vect_find_node() for 596366.280992 4922569.834711 0.000000 maxdist = 295.661157
D3/3: Vect_select_nodes_by_box()
D3/3: Box(N,S,E,W,T,B): 4.922865e+006, 4.922274e+006, 5.966619e+005, 5.960706e+005, 1.#INF00e+000, -1.#INF00e+000
D3/3: dig_select_nodes()
D3/3:   0 nodes selected
D3/3:  0 nodes in box
D2/3: node = 0 x = 596366.280992, y = 4922569.834711
D2/3: write field = 1 cat = 1
D2/3: cat_max_get() field = 1
D2/3: cat_max_set() field = 1 cat = 1
D3/3: Vect_write_line(): name = bar, format = 0, level = 2
D3/3: V2_write_line_nat()
D3/3: Register node: type = 1,  596366.280992,4922569.834711
D3/3: dig_find_node()
D3/3: node = 0
D3/3: dig_add_node(): n_nodes = 0, alloc_nodes = 0
D3/3: dig_spidx_add_node(): node = 1, x,y,z = 596366.280992, 4922569.834711, 0.000000
D3/3: new node = 1, n_nodes = 1, alloc_nodes = 1000
D3/3: Add new node: 1

D3/3: dig_node_add_line(): node = 1 line = 1
D3/3: dig_node_alloc_line(): add = 1
D3/3:     angle = -9.000000
D3/3: dig_node_add_line(): line 1 added position 0 n_lines: 1 angle -9.000000
D3/3: dig_node_add_updated(): node = 1
D3/3: dig_spidx_add_line(): line = 1
D3/3: dig_line_add_updated(): line = 1
D3/3:   line added to topo with id = 1
D3/3: dig_cidx_add_cat_sorted(): field = 1 cat = 1 line = 1 type = 1
D3/3: Added new category to index
D3/3: updated lines : 1 , updated nodes : 1
D2/3: Updated line: 1
D2/3: Updated node: 1
D2/3: cat_max_get() field = 1
D2/3: set color to symb 1: 255 255 255
D2/3: display_node(): node = 1 color = 1
D2/3: set color to symb 1: 255 255 255
D2/3: display_icon()
D2/3: symb_updated_lines_set_from_map();
D2/3: line_symb_refresh()
D2/3: line_symb_from_map(): line = 1
D3/3: Vect_read_line()
D3/3: V2_read_line_nat(): line = 1
D3/3: Vect__Read_line_nat: offset = 14
D3/3:     type = 1, do_cats = 1 dead = 0
D3/3:     n_cats = 1
D3/3:     n_points = 1
D3/3:     off = 43
D2/3: node_update();

D2/3: line_symb_refresh()
D2/3: node = 1 nl = 1
D2/3: i = 0 line = 1
D3/3: Vect_read_line()
D3/3: V2_read_line_nat(): line = 1
D3/3: Vect__Read_line_nat: offset = 14
D3/3:     type = 1, do_cats = 1 dead = 0
D3/3:     n_cats = 1
D3/3:     n_points = 1
D3/3:     off = 43
D2/3: node = 1 nlines = 0
D2/3: display_line(): line = 1 color = 0
D3/3: Vect_read_line()
D3/3: V2_read_line_nat(): line = 1
D3/3: Vect__Read_line_nat: offset = 14
D3/3:     type = 1, do_cats = 1 dead = 0
D3/3:     n_cats = 1
D3/3:     n_points = 1
D3/3:     off = 43
D2/3: set color to symb 3: 0 0 0
D2/3: display_icon()
D3/3: new_line(): End
D2/3: new_line(): type = 1
D2/3: Cat modes: $GWidget(cat_mode) configure -values [list "No category" "Manual entry" "Next not used"]
D2/3: Cat mode: $GWidget(cat_mode) setvalue @2
D3/3: c_update_tool()
D3/3: button = 3 x = 216 = 596366.280992 y = 184 = 4922569.834711
D3/3: new_line(): End

D3/3: c_update_tool()
D3/3: c_next_tool()
D2/3:   Tool_next = 1
D2/3: Quit
D1/3: end()
D3/3: Vect_build(): build = 0
D3/3: Vect_build_nat() build = 0
D2/3: dig_free_plus_areas()
D2/3: dig_free_plus_isles()
D2/3: dig_free_plus_areas()
D2/3: dig_free_plus_isles()
D2/3: dig_free_plus_nodes()
D2/3: dig_free_plus_lines()
D3/3: Vect_build(): build = 4
Building topology for vector map <bar>...

D2/3: dig_cidx_free()
D3/3: dig_cidx_init()
D3/3: Vect_build_nat() build = 4
D1/3: Vect_Rewind(): name = bar
Registering primitives...

D3/3: Vect_read_next_line()
D3/3: V1_read_next_line_nat()
D3/3: Vect__Read_line_nat: offset = 14

D3/3:     type = 1, do_cats = 1 dead = 0
D3/3:     n_cats = 1
D3/3:     n_points = 1
D3/3:     off = 43
D3/3: Register line: offset = 14
D3/3: Register node: type = 1,  596366.280992,4922569.834711
D3/3: dig_find_node()
D3/3: node = 0
D3/3: dig_add_node(): n_nodes = 0, alloc_nodes = 0
D3/3: dig_spidx_add_node(): node = 1, x,y,z = 596366.280992, 4922569.834711, 0.000000
D3/3: new node = 1, n_nodes = 1, alloc_nodes = 1000
D3/3: Add new node: 1
D3/3: dig_node_add_line(): node = 1 line = 1
D3/3: dig_node_alloc_line(): add = 1
D3/3:     angle = -9.000000
D3/3: dig_node_add_line(): line 1 added position 0 n_lines: 1 angle -9.000000
D3/3: dig_node_add_updated(): node = 1
D3/3: dig_spidx_add_line(): line = 1
D3/3: dig_line_add_updated(): line = 1
D3/3: dig_cidx_add_cat(): field = 1 cat = 1 line = 1 type = 1
D3/3: Vect_read_next_line()
D3/3: V1_read_next_line_nat()
D3/3: Vect__Read_line_nat: offset = 43
1 primitives registered

1 vertices registered

Building areas...


0 areas built

0 isles built

Attaching islands...

Attaching centroids...


D2/3: dig_cidx_sort()
Number of nodes: 1

Number of primitives: 1

Number of points: 1

Number of lines: 0

Number of boundaries: 0

Number of centroids: 0

Number of areas: 0

Number of isles: 0

D1/3: Vect_close(): name = bar, mapset = user1, format = 0, level = 2
D1/3: get coor info: C:\Users\Maris\Documents\GIS DataBase/spearfish60/user1/vector/bar/coor
D2/3: ftell = 43
D1/3: Info->size = 43, Info->mtime = 1270717167
D1/3: Vect_save_topo()
D1/3: Open topo: C:\Users\Maris\Documents\GIS DataBase/spearfish60/user1/vector/bar/topo
D2/3: topo body offset 142
D3/3: dig_Wr_P_node()
D2/3: topo body offset 142
D2/3: Vect_cidx_save()
D2/3: Open cidx: C:\Users\Maris\Documents\GIS DataBase/spearfish60/user1/vector/bar/cidx
D3/3: dig_write_cidx_head()
D3/3: cidx 0 head offset: 13
D3/3: cidx 0 offset: 0
D3/3: cidx body offset 41
D3/3: dig_write_cidx_head()

D1/3: write coor size (43) to head
D2/3: coor body offset 14
D1/3: Vect_get_thresh(): thresh = 0.000000
D1/3: Vect_write_dblinks(): map = bar, mapset = user1
D1/3: dbln file: C:\Users\Maris\Documents\GIS DataBase/spearfish60/user1/vector/bar/dbln
D1/3: Dblinks written
Region restored to original extent.

D3/3: c_next_tool()
D2/3:   Tool_next = 1
D2/3: Quit
D1/3: end()
D3/3: Vect_build(): build = 0
D3/3: Vect_build_nat() build = 0
D2/3: dig_free_plus_areas()
D2/3: dig_free_plus_isles()
D2/3: dig_free_plus_areas()
D2/3: dig_free_plus_isles()
D2/3: dig_free_plus_nodes()
D2/3: dig_free_plus_lines()
D3/3: Vect_build(): build = 4
Building topology for vector map <(null)>...

D2/3: dig_cidx_free()
D3/3: dig_cidx_init()
D3/3: Vect_build_nat() build = 4
Registering primitives...

D3/3: Vect_read_next_line()
Unable to read vector map


D1/3: Vect_close(): name = (null), mapset = (null), format = 0, level = 1
D3/3: cidx 0 head offset: 13
D3/3: cidx 0 offset: 41
D3/3: cidx body offset 41
D1/3: close history file
D1/3: V1_close_nat(): name = bar mapset= user1
D1/3: get coor info: C:\Users\Maris\Documents\GIS DataBase/spearfish60/user1/vector/bar/coor
D2/3: ftell = 43
D1/3: Info->size = 43, Info->mtime = 1270717167
D1/3: dig__write_head()

comment:32 Changed 9 years ago by hamish

Priority: criticalmajor

as per comment:30 the "Building topology for vector map <(null)>..." + "Unable to read vector map" on close down messages remain, which is a bit of a worry, but overall the module still seems to work so downgrading from 'critical' into the noise.

Feel free to upgrade again if the effects can be felt..

comment:33 Changed 9 years ago by hamish

Resolution: fixed
Status: newclosed

closing bug as original form lib breakage is fixed; closing map <(null)> weirdness continued in #917.

Note: See TracTickets for help on using tickets.