gvSIG bugs #2583

Can't save a temporary layer

Added by Antonio Falciano almost 10 years ago. Updated over 9 years ago.

Status:Closed% Done:

0%

Priority:NormalSpent time:-
Assignee:Joaquín del Cerro Murciano
Category:Vector editing
Target version:2.1.0-2260
Severity:Minor Add-on version:
gvSIG version:2.1.0 Add-on build:
gvSIG build:2229 Add-on resolve version:
Operative System:Windows Add-on resolve build:
Keywords: Proyecto:
Has patch: Hito:
Add-on name:Unknown

Description

If I edit a temporary shp layer created by one geoprocess and then try to save the edits, a warning says that it's not possible and consequently I'm forced to discard the changes.

gvSIG.log (339 KB) Antonio Falciano, 06/19/2014 05:28 AM

cant_save_dbf_2258.png (24.3 KB) Antonio Falciano, 11/28/2014 05:43 PM

cant_save_dbf_2258.log (348 KB) Antonio Falciano, 11/28/2014 05:43 PM

1199

Related issues

Related to Application: gvSIG desktop - gvSIG bugs #2850: Error opening a project Closed 10/03/2014
Related to Application: gvSIG desktop - gvSIG bugs #2837: Error saving project Closed 09/22/2014
Related to Application: gvSIG desktop - gvSIG bugs #2973: Error saving a project Invalid 11/06/2014
Related to Application: gvSIG desktop - gvSIG bugs #2972: Error opening a project after a Spatial join Invalid 11/06/2014
Related to Application: gvSIG desktop - gvSIG bugs #2675: File locking Closed 07/15/2014
Related to Application: gvSIG desktop - gvSIG bugs #3067: Aviso en el log de "notify close in a resource already cl... New 12/16/2014

Associated revisions

Revision 41853
Added by Joaquín del Cerro Murciano over 9 years ago

refs #2583, añadido soporte en gvSIG para marcar capas como temporales. Las capas temporales no se guardaran en el proyecto.

Revision 626
Added by Joaquín del Cerro Murciano over 9 years ago

refs #2583, añadido soporte en los geoprocesos para que las capas temporales se generen como capas temporales en gvSIG.

Revision 129
Added by Joaquín del Cerro Murciano over 9 years ago

refs #2583, añadido soporte en los geoprocesos para que las capas temporales se generen como capas temporales en gvSIG.

Revision 632
Added by Joaquín del Cerro Murciano over 9 years ago

refs #2583. Libera el featureStore cuando termina de usarlo para desbloquear los ficheros/recursos que tuviese cogidos

Revision 41882
Added by Joaquín del Cerro Murciano over 9 years ago

refs #2583, a¤adido que libere recursos al terminar la edicion en modo append.

Revision 41883
Added by Joaquín del Cerro Murciano over 9 years ago

refs #2583, sustituido lanzar una excepcion por presentar un mensaje de error en el log cuando se intenta notificar el cierre de un recurso ya cerrado.

History

#1 Updated by Antonio Falciano almost 10 years ago

#2 Updated by Antonio Falciano almost 10 years ago

The same issue happens with layer created by SEXTANTE and saved on the disk.
In the following error reported in the gvSIG.log:

Caused by: Error while executing an action in resource 'MultiResource ...etc.

the three files (shp, dbf and shx) of the SHP file are repeated 4 times, why? Maybe the issue may depend by this anomaly.

PS: This ticket would be title "Can't save edit in SHPs generated by SEXTANTE"

#3 Updated by Antonio Falciano over 9 years ago

Severity: Major

This ticket should be titled "Can't save edit in SHPs generated by SEXTANTE geoprocesses (not gvSIG ones)"
I think that it's related at least in part to #2849 (GeoAlgorithm vs AbstractSextanteGeoProcess).
The issue is still present in build 2247.

#4 Updated by Antonio Falciano over 9 years ago

  • Target version set to 2.1.0-2259-rc3

The Geoprocesses work quite fine now, but this tedious issue makes very difficult to edit vector layers generated by SEXTANTE geoprocesses (e.g. "Create random vector layer"). The only possible workaround at the time of writing (build 2254) consists into avoiding the use of SEXTANTE temporary layers (saving all layers on the disk), saving the project, closing and restarting gvSIG and... finally editing the layer. Very time consuming.

#5 Updated by Álvaro Anguix over 9 years ago

#6 Updated by Álvaro Anguix over 9 years ago

#7 Updated by Joaquín del Cerro Murciano over 9 years ago

#8 Updated by Joaquín del Cerro Murciano over 9 years ago

  • Related to gvSIG bugs #2972: Error opening a project after a Spatial join added

#9 Updated by Joaquín del Cerro Murciano over 9 years ago

  • Target version changed from 2.1.0-2259-rc3 to 2.1.0-2255-testing

#10 Updated by Joaquín del Cerro Murciano over 9 years ago

  • Target version changed from 2.1.0-2255-testing to 2.1.0-2259-rc3

#11 Updated by Joaquín del Cerro Murciano over 9 years ago

  • Target version changed from 2.1.0-2259-rc3 to 2.1.0-2258-testing
  • Assignee set to Joaquín del Cerro Murciano

#12 Updated by Joaquín del Cerro Murciano over 9 years ago

He hecho algunas correcciones, pero no tengo clara que lo que haya tocado corrija el problema.
He añadido soporte para que en gvSIG puedan haber capas temporales y he modificado los geoprocesos para que las capas que se generen como temporales se marquen adecuadamente,
Las capas temporales no se guardaran con el proyecto.

Respecto al problema que cuentas que te pasa al editar una capa generada a partir de un geoproceso, no lo he podido reproducir.
He intentado hacer:

  • cargar una capa de poligonos
  • Hacer un buffer con sextante indicando el fichero de salida (no una capa temporal)
  • Poner en edicion la capa generada.
  • Crear un rectangulo.
  • Terminar edicion y decirle que lo guarde. Lo ha guardado sin errores.
  • He guardado el proyecto
  • He cerrado gvSIG y lo he vuelto a abrir
  • He cargado el proyecto de nuevo y ahi estaban las dos capas, y la generada con el geoproceso de buffer con su rectangulo extra.

He provado tambien diciendole al geoproceso que genere una capa temporal y tambien ha funcionado, pero claro, no se guardo en el proyecto la capa.

He probado tanto con el buffer de gvSIG como con el "Fixed distance buffer" de sextante, y los resultados son los mismo.

¿ Alguna idea sobre si estoy haciendo algo distinto a lo que has hecho ?

#13 Updated by Antonio Falciano over 9 years ago

Joaquín del Cerro Murciano wrote:

He añadido soporte para que en gvSIG puedan haber capas temporales y he modificado los geoprocesos para que las capas que se generen como temporales se marquen adecuadamente,
Las capas temporales no se guardaran con el proyecto.

Ok, thank you very much. Skipping the temporary layers when saving a project is a good idea.

Respecto al problema que cuentas que te pasa al editar una capa generada a partir de un geoproceso, no lo he podido reproducir.
[...]
¿ Alguna idea sobre si estoy haciendo algo distinto a lo que has hecho ?

In order to reproduce the issue:
  • create a random vector layer of points (with or without saving it on the disk);
  • start editing and add a new point feature;
  • try to save the layer.
Result:
  • the layer can't be saved, so I'm forced to discard the changes;
  • furthermore, I've just discovered that if I open the attribute table, I can see a new record (but not the relative geometry, because I discarded the changes before). Consequently the layer is corrupted, because there's a misalignment between geometries and alfanumeric attributes. This issue happens only with temporary layers.

#14 Updated by Álvaro Anguix over 9 years ago

In Linux (ubuntu 64) it works and the layer can be saved.

#15 Updated by Joaquín del Cerro Murciano over 9 years ago

  • Operative System set to Windows
  • Target version changed from 2.1.0-2258-testing to 2.1.0-2259-rc3

He estado haciendo pruebas y añadiendo trazas y ya tengo una idea de que puede estar pasando.

Cuando se edita una capa shape se hace:

  • Se genera una capa temporal con todos los datos.
  • Se borran los ficheros de la capa originales
  • Se renombran/mueven los ficheros temporales con el nombre de los originales.

El error se esta produciendo cuando intenta borrar los ficheros originales, no puede y falla. Parece ser que no consigue cerrar los ficheros y cuando intenta borrarlos no puede por que el mismo los tiene en uso.

Ademas esto solo pasa en Windows, en linux los cierra adecuadamente y no tiene problamas para borrarlos.

A ver si lo puedo corregir para los proximos builds.

#16 Updated by Antonio Falciano over 9 years ago

I've just tried with build 2258 and it seems due to file locking (see #2675).
I attach the new gvSIG.log and the more verbose warning message.

#17 Updated by Joaquín del Cerro Murciano over 9 years ago

  • Target version changed from 2.1.0-2259-rc3 to 2.1.0-2268-rc4

#18 Updated by Álvaro Anguix over 9 years ago

  • Target version changed from 2.1.0-2268-rc4 to 2.1.0-2260

#19 Updated by Álvaro Anguix over 9 years ago

#20 Updated by Joaquín del Cerro Murciano over 9 years ago

  • Related to gvSIG bugs #3067: Aviso en el log de "notify close in a resource already closed" added

#21 Updated by Joaquín del Cerro Murciano over 9 years ago

  • Status changed from New to Fixed

Bueno, creo que ya esta.
Sigue habiendo un problema, #3067, pero yo daria el ticket este ya por cerrado ya que parece que en Windows ya edita y guarda los datos en capas creadas desde los geoprocesos.

Por lo que he visto habian varios problemas, por un lado en el proveedor de shape, y por otro en la libreria de geoprocesos.

#22 Updated by Antonio Falciano over 9 years ago

  • Status changed from Fixed to Closed

Joaquín del Cerro Murciano wrote:

Bueno, creo que ya esta.
Sigue habiendo un problema, #3067, pero yo daria el ticket este ya por cerrado ya que parece que en Windows ya edita y guarda los datos en capas creadas desde los geoprocesos.

Por lo que he visto habian varios problemas, por un lado en el proveedor de shape, y por otro en la libreria de geoprocesos.

It works like a charm in build 2260, thanks.

Also available in: Atom PDF