Opened 15 years ago

Closed 15 years ago

#1572 closed bug (fixed)

new features will not display before spatial index is recreated/QGIS restarted

Reported by: paull Owned by: mhugent
Priority: critical: causes crash or data corruption Milestone: Version 1.2.0
Component: Vectors Version: Trunk
Keywords: Cc: pcav
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: no

Description

I've imported some shapefile-exports (Geomedia) and added line-features in QGIS. The lines were showing up nicely, until I hit "Toggle editing" and "save". After saving, the features immediately disappeared. I saved everything, restarted QGIS, still not there. (Features were showing up in the table though). I restarted QGIS again, still no sign. I've tried theo whole thing again, drawing new features, and again: as soon as I saved the edits, they would disappear. I hit "create spatial index" and boom: immediately all those features get displayed.

Attachments (1)

shapefiles.zip (54.0 KB ) - added by paull 15 years ago.
Shapefiles

Download all attachments as: .zip

Change History (10)

comment:1 by borysiasty, 15 years ago

Component: Build/InstallVectors

I confirm. I observed the same issue several times.

comment:2 by msieczka, 15 years ago

Milestone: Version 1.0.2
Must Fix for Release: NoYes
Platform: DebianAll
Priority: major: does not work as expectedcritical: causes crash or data corruption

I noticed a similar thing on Windows couple of versions ago.

comment:3 by paull, 15 years ago

same thing happens again today, after a restart, with the same layers. Newly added features will only show up after (re-)creating the spatial index.

by paull, 15 years ago

Attachment: shapefiles.zip added

Shapefiles

comment:4 by paull, 15 years ago

Component: VectorsMapCanvas
Priority: critical: causes crash or data corruptionmajor: does not work as expected
Summary: new features will not display before spatial index is creatednew features will not display before spatial index is recreated/QGIS restarted

Theres a second funny thing that I think is related to this bug.

  • Layer A and Layer B both use the same shape-file to display features of that shape-file (in my case: Points)
  • I add points (working with Layer A); The new points are being drawn on the map in Layer A; They disappear as soon as I save the changes to the shapefile and reappear as soon as I rebuild the index (see description above). However: The new points never appear on Layer B throughout the process, even though this layer references the same Shapefile as Layer A.
  • It takes a complete Restart of QGIS to have Layer B display the newly added points as well. Zooming, panning, disabling and reenabling all doesn't work; the only way to force Layer B to refresh seems to be a restart of QGIS.

comment:5 by paull, 15 years ago

Priority: major: does not work as expectedcritical: causes crash or data corruption

comment:6 by paull, 15 years ago

Component: MapCanvasVectors

comment:7 by lutra, 15 years ago

Cc: pcav added
Milestone: Version 1.0.3Version 1.2.0
Version: 1.0.0HEAD

Confirmed on Qgis 1.2 from trunk on Ubuntu 9.04. Pushing the milestone to 1.2

comment:8 by pcav, 15 years ago

Owner: changed from nobody to mhugent

comment:9 by mhugent, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in r11225. The spatial index is now recreated if geometry changes are commited. Note that there is work in progress in the OGR library related to a more efficient update of the spatial index.

Note: See TracTickets for help on using tickets.