new install on Ubuntu 20.04 generates endless sql queries

Hi everyone,

I tend to run darktable (master) via a terminal window with -d all so that I can work out what is going on if it seems to become unresponsive, as well as for pure geekish curiosity. A new install on a new install of Ubuntu 20.04 (but with my ~/.config/darktable copied across), and most things work fine. However I am getting an enormous stream of continuous sql queries (tiny excerpt: see below). To my inexpert eye, there seems to be some sort of endless loop in the selection module.

323.708611 [sql] /usr/src/packages/BUILD/src/common/image.c:221, function dt_image_full_path(): prepare "SELECT folder || '/' || filename FROM main.images i, main.film_rolls f WHERE i.film_id = f.id and i.id = ?1"
323.708698 [sql] /usr/src/packages/BUILD/src/common/image.c:306, function dt_image_path_append_version(): prepare "SELECT version FROM main.images WHERE id = ?1"
323.808829 [sql] /usr/src/packages/BUILD/src/common/collection.c:997, function dt_collection_get(): prepare "SELECT id FROM main.selected_images AS s JOIN (SELECT DISTINCT mi.id FROM images AS mi WHERE   (flags & 256) != 256  AND  (1=1 AND (datetime_taken LIKE '2020:05:%')) ORDER BY datetime_taken, mi.id , filename, version LIMIT ?1, ?2) AS mi WHERE mi.id = s.imgid LIMIT -1, ?3"
323.816767 [sql] /usr/src/packages/BUILD/src/common/image.c:221, function dt_image_full_path(): prepare "SELECT folder || '/' || filename FROM main.images i, main.film_rolls f WHERE i.film_id = f.id and i.id = ?1"
323.816858 [sql] /usr/src/packages/BUILD/src/common/image.c:306, function dt_image_path_append_version(): prepare "SELECT version FROM main.images WHERE id = ?1"
323.917202 [sql] /usr/src/packages/BUILD/src/common/collection.c:997, function dt_collection_get(): prepare "SELECT id FROM main.selected_images AS s JOIN (SELECT DISTINCT mi.id FROM images AS mi WHERE   (flags &`Preformatted text` 256) != 256  AND  (1=1 AND (datetime_taken LIKE '2020:05:%')) ORDER BY datetime_taken, mi.id , filename, version LIMIT ?1, ?2) AS mi WHERE mi.id = s.imgid LIMIT -1, ?3"

$ darktable --version

this is darktable 3.1.0~git1670.92a7e6aeb
    copyright (c) 2009-2020 johannes hanika
    darktable-dev@lists.darktable.org

    compile options:
      bit depth is 64 bit
      normal build
      SSE2 optimized codepath enabled
      OpenMP support enabled
      OpenCL support enabled
      Lua support enabled, API version 6.0.0
      Colord support enabled
      gPhoto2 support enabled
      GraphicsMagick support enabled
      ImageMagick support disabled
      OpenEXR support enabled

Sorry … it would be best if I actually requested something:

Is this a bug, or something wrong with my installation?
I don’t want to just add noise by creating an issue on github if it really is operator error.

Just for laughs: :laughing:
(In my undergrad days at uni in 1988 I remember a cartoon Muamar Gadaffi pointing a Kalashnikov at a CRT terminal saying "Whaddya mean, “user error”? - this was placed at the physical helpdesk of the Computing Services Centre - i.e. the place where the uni computers were supported from, as opposed to the CompSci department computers).

Stop use ‘-d all’ except if there is something definitely wrong :slight_smile: No problem in sight to me…

Thanks for the reassurance, Pascal. I’m still not 100% convinced that there is no problem, but unless I get impaired functionality …