Bug report #8422

Field Calculator doesn't work - spatiaLite

Added by Jonathan Moules almost 11 years ago. Updated over 9 years ago.

Category:Data Provider/SpatiaLite
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:No Copied to github as #:17191


I have a SpatiaLite database. When I try and use field calculator on it absolutely nothing happens. I don't get either an error nor any changes to the database.
I've tried using the area calculator, or simply entering the value of "1" (sans quotes). No change.

If I have set it to "create new column" it will create the column, but the values will all be NULL. Update column does nothing at all.

Field Calculator works fine on shapefiles.

Weekly build a13cdf8 - windows 7, x64.

Clipboard16.png (10.2 KB) Jonathan Moules, 2013-08-15 04:30 AM


#1 Updated by Giovanni Manghi almost 11 years ago

  • Status changed from Open to Feedback

I cannot confirm using for example the SL dataset you added to other tickets today. Tested on qgis master on both Linux and Windows.

#2 Updated by Jonathan Moules almost 11 years ago

Now updated to d61cb25. A little more testing shows the nature of the problem.

The SL driver is taking a very long time to update the SL database (using https://issues.qgis.org/attachments/6139/Compass_logs_-_Copy.7z from my other ticket).

There are only ~51,000 features in the database.

1) Add dataset
2) Toggle editing
3) Create field "test" -> Integer
4) Field Calculator -> value of "5555" into the "test" field.
5) Turn off editing -> Save changes.

At this point several bad things happen:
- QGIS locks up for five minutes (literally 5 minus) writing to the SL.
- If I attempt to close the attribute window during this time, QGIS crashes.
- If you look at the attached you can see the resource use during the save. This actually covers two saves (the bits where the IO bar is purple are where it is saving). Notice how RAM use keeps going up but isn't freed afterwards. Leak? No other tasks were performed during this QGIS session.

Nothing else is accessing the SL Dataset. The machine is a high end workstation; the dataset is on an SSD. Shouldn't it just take a few seconds to do this update? "update processed set tests = 9876;" in spatialite_gui takes 6.6 seconds.

#3 Updated by Giovanni Manghi almost 11 years ago

Just updated on both Linux and Windows and I cannot confirm this issue. It takes around the same amount of time as SL gui to save on QGIS.

#4 Updated by Giovanni Manghi over 9 years ago

  • Resolution set to worksforme
  • Status changed from Feedback to Closed

closing for lack of feedback, please reopen if necessary.

Also available in: Atom PDF