gvSIG bugs #787

Error when remove a postgis feature with a null geometry

Added by Francisco Puga about 12 years ago. Updated over 10 years ago.

Status:Awaiting response% Done:

100%

Priority:Normal
Assignee:-
Category:-
Target version:-
Severity: Add-on name:Unknown
gvSIG version:1.11.0 Add-on version:
gvSIG build:1311 Add-on build:
Operative System: Add-on resolve version:
Keywords: Add-on resolve build:
Has patch:No

Description

Steps to reproduce:

1.- Set NULL for the geometry column of one record of a postgis layer
2.- Open the layer with gvSIG
3.- Remove the "null record" with navtable or with the gvsig table

An exception is thrown:

DEBUG [AWT-EventQueue-0] (NotificationManager.java:104) - java.lang.NullPointerException
java.lang.NullPointerException
at com.iver.cit.gvsig.fmap.edition.VectorialEditableAdapter.doRemoveRow(VectorialEditableAdapter.java:571)
at com.iver.cit.gvsig.fmap.edition.VectorialEditableDBAdapter.doRemoveRow(VectorialEditableDBAdapter.java:430)
at com.iver.cit.gvsig.fmap.edition.EditableAdapter.removeRow(EditableAdapter.java:558)

0001-libFMap-also-check-for-NULL-bounding-boxes.patch Magnifier (1.64 KB) Andrés Maneiro, 06/20/2013 06:48 PM

History

#1 Updated by Francisco Puga about 12 years ago

Originally reported by Andrés Maneiro (iCarto, Navtable)

https://github.com/navtable/navtable/issues/40

#2 Updated by Francisco Puga over 11 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r40328.

#3 Updated by Francisco Puga over 11 years ago

  • Target version set to 1.13.0

#4 Updated by Andrés Maneiro about 11 years ago

As far as I understand, this section of code makes the spatial index to update according the bounding boxes of geometry set. Besides checking for feature and geometry to not be null, also we should check for bounding box to be null. I can imagine at least 1 case where that happens (actually, it's happening to me now): a FGeometryCollection which happens to have no geometries. Although the geom is not null, the bounding box is. Attached a patch to check for this too: "0001-libFMap-also-check-for-NULL-bounding-boxes.patch".

#5 Updated by Andrés Maneiro about 11 years ago

As far as I understand, this section of code makes the spatial index to update according the bounding boxes of geometry set. Besides checking for feature and geometry to not be null, also we should check for bounding box correctness. I can imagine at least 1 case where that's needed (actually, I needed right now): a FGeometryCollection which happens to have no geometries. Although the geom is not null, the bounding box is. Attached a patch to check for this too: "0001-libFMap-also-check-for-NULL-bounding-boxes.patch".

#6 Updated by Álvaro Anguix over 10 years ago

  • Project changed from Application: gvSIG desktop to | gvSIG desktop 1
  • Category deleted (Database)
  • Target version deleted (1.13.0)

Also available in: Atom PDF