Opened 14 years ago

Closed 14 years ago

#1185 closed defect (invalid)

v.in.ogr on WinGrass: "Bad file descriptor"

Reported by: hamish Owned by: grass-dev@…
Priority: normal Milestone: 6.4.1
Component: Vector Version: unspecified
Keywords: v.in.ogr, wingrass Cc:
CPU: Unspecified Platform: MSWindows XP

Description

Hi, this was posted to the wiki by "JeeJah".

Not tested, no other idea about it. version and binary build unknown. But it warrants looking into..

When importing an ESRI shapefile using the v.in.ogr
command the following error may occur:

[Bad file descriptor: Files]

The output vector file is created but GRASS is "unable
to open the vector map."

Sample dialog:

[v.in.ogr dsn=D:\acadia\Skyland\ortho\G_Ortho_Index.shp \
  output=orthoindex01
Projection of input dataset and current location appear to match
Layer: G_Ortho_Index
 Bad file descriptor: Files
Please note that the data are left in incosistent stage
and can be corrupted (Thu Sep 30 14:15:16 2010) Command
 aborted (20 sec)]


Solution:

???

HB: It seems you found a bug: "C:\Program" got sent as the first argument, and the second half, "Files\GRASS-64\..." was sent as the second argument. Somewhere some path variable is not quoted correctly to protect against spaces in pathnames.

Change History (2)

in reply to:  description comment:1 by hellik, 14 years ago

Replying to hamish:

Hi, this was posted to the wiki by "JeeJah".

Not tested, no other idea about it. version and binary build unknown. But it warrants looking into..

When importing an ESRI shapefile using the v.in.ogr
command the following error may occur:

[Bad file descriptor: Files]

The output vector file is created but GRASS is "unable
to open the vector map."

Sample dialog:

[v.in.ogr dsn=D:\acadia\Skyland\ortho\G_Ortho_Index.shp \
  output=orthoindex01
Projection of input dataset and current location appear to match
Layer: G_Ortho_Index
 Bad file descriptor: Files
Please note that the data are left in incosistent stage
and can be corrupted (Thu Sep 30 14:15:16 2010) Command
 aborted (20 sec)]


Solution:

???

HB: It seems you found a bug: "C:\Program" got sent as the first argument, and the second half, "Files\GRASS-64\..." was sent as the second argument. Somewhere some path variable is not quoted correctly to protect against spaces in pathnames.

test with the actual WinGrass64-release (installed in c:\Program Files\...):

v.in.ogr --verbose dsn=C:\wd\gextension\firestations.shp output=testvimport     
Die Projektionsinformationen des Eingabedatensatzes und der aktuellen Location scheinen übereinzustimmen.
Layer: firestations
Spaltenname wurde geändert: 'cat' -> 'cat_'
Importiere 71 Objekte der Karte...
-----------------------------------------------------
Erstelle Topologie für die Vektorkarte <testvimport>...
Registriere Primitive...
71 Primitive registriert
71 Vertices registriert
Erzeuge Flächen...
0 Flächen angelegt
0 Inseln angelegt
Füge Inseln hinzu...
Füge Zentroide hinzu...
Die Topologie wurde erstellt
Anzahl der Knoten: 71
Anzahl der Primitive: 71
Anzahl der Punkte: 71
Anzahl der Linien: 0
Anzahl der Grenzen: 0
Anzahl der Zentroide: 0
Anzahl der Flächen: 0
Anzahl der Inseln: 0
(Fri Oct 01 20:08:31 2010) Command finished (0 sec)        

it works. I would vote for closing the ticket.

Helmut

comment:2 by hamish, 14 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.