After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 770782 - Don't use an undefined ?item variable
Don't use an undefined ?item variable
Status: RESOLVED FIXED
Product: gnome-photos
Classification: Applications
Component: general
3.21.x
Other Linux
: Normal major
: ---
Assigned To: GNOME photos maintainer(s)
GNOME photos maintainer(s)
: 772003 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-09-03 11:01 UTC by Michael Biebl
Modified: 2016-11-18 15:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnome-photos failure (28.90 KB, image/png)
2016-09-03 11:02 UTC, Michael Biebl
  Details
search-type-manager: Only look for nmm:Photos inside collections (2.10 KB, patch)
2016-09-06 16:31 UTC, Debarshi Ray
committed Details | Review
query-builder: Split out the COUNT into a separate variable (1.61 KB, patch)
2016-09-06 16:31 UTC, Debarshi Ray
committed Details | Review
query-builder: Don't use an undefined ?item variable (1.76 KB, patch)
2016-09-06 16:31 UTC, Debarshi Ray
committed Details | Review

Description Michael Biebl 2016-09-03 11:01:49 UTC
according to locale I have
LANG=de_DE.UTF-8
LANGUAGE=
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=


When running gnome-photos, I get an error
1.762: syntax error, use of undefined variable 'item'
(see attached screenshot)

When I use a different locale, like
LANG=C gnome-photos
or
LANG=en_US.UTF-8 gnome-photos

it seems to work properly.
Comment 1 Michael Biebl 2016-09-03 11:02:12 UTC
Created attachment 334707 [details]
gnome-photos failure
Comment 2 Michael Biebl 2016-09-03 11:44:34 UTC
hm, the language settings seems to be a red herring. After a reboot I'm now also getting the failure for a C or en locale.

on the console I get a lot of those errors:
(gnome-photos:6775): Tracker-CRITICAL **: tracker_sparql_cursor_real_get_double: assertion '_tmp1_ == TRACKER_SPARQL_VALUE_TYPE_DOUBLE' failed

(gnome-photos:6775): Tracker-CRITICAL **: tracker_sparql_cursor_real_get_integer: assertion '_tmp1_ == TRACKER_SPARQL_VALUE_TYPE_INTEGER' failed

I wonder if it's related to the tracker update from 1.8.0 to 1.9.1
Comment 3 Debarshi Ray 2016-09-03 17:15:28 UTC
I have heard about this problem from multiple other people too. The behaviour of Tracker changed in 1.9.1 because gnome-photos master works fine with tracker-1.8.0. I have not bisected it yet to know whether tracker became stricter (and we need to fix our queries) or whether it is a regression.

Any help with bisecting it will be very appreciated. :)
Comment 4 Michael Biebl 2016-09-03 17:31:01 UTC
Maybe Carlos has an idea, added to CC
Comment 5 Carlos Garnacho 2016-09-06 14:21:38 UTC
It's probably https://git.gnome.org/browse/tracker/commit/?id=003f7fdd96e3c3e2588de64a69c889f848e912ec , the earlier behavior was IIRC an spec break. Would be great to know the specific query/aggregate function that triggers this, TRACKER_VERBOSITY=3 should shed some more light.
Comment 6 Debarshi Ray 2016-09-06 14:50:49 UTC
(In reply to Carlos Garnacho from comment #5)
> It's probably
> https://git.gnome.org/browse/tracker/commit/
> ?id=003f7fdd96e3c3e2588de64a69c889f848e912ec , the earlier behavior was IIRC
> an spec break. Would be great to know the specific query/aggregate function
> that triggers this, TRACKER_VERBOSITY=3 should shed some more light.

Thanks for digging into this, Carlos.
Comment 7 Carlos Garnacho 2016-09-06 15:11:49 UTC
np :), it seems to be https://git.gnome.org/browse/gnome-photos/tree/src/photos-query-builder.c#n120 from a cursory look
Comment 8 Debarshi Ray 2016-09-06 16:31:04 UTC
Created attachment 334917 [details] [review]
search-type-manager: Only look for nmm:Photos inside collections
Comment 9 Debarshi Ray 2016-09-06 16:31:28 UTC
Created attachment 334918 [details] [review]
query-builder: Split out the COUNT into a separate variable
Comment 10 Debarshi Ray 2016-09-06 16:31:54 UTC
Created attachment 334919 [details] [review]
query-builder: Don't use an undefined ?item variable
Comment 11 Jeremy Bicha 2016-09-06 18:30:32 UTC
I tried those 3 patches with gnome-photos 3.21.90 with tracker 1.9.1, and gnome-photos works again.
Comment 12 Debarshi Ray 2016-09-06 21:54:35 UTC
(In reply to Jeremy Bicha from comment #11)
> I tried those 3 patches with gnome-photos 3.21.90 with tracker 1.9.1, and
> gnome-photos works again.

Thanks for testing them out. I have pushed them to master now.
Comment 13 Debarshi Ray 2016-11-18 15:53:39 UTC
*** Bug 772003 has been marked as a duplicate of this bug. ***