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 752544 - libtracker-common: String to date conversion to return with GError when null string
libtracker-common: String to date conversion to return with GError when null ...
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2015-07-17 22:21 UTC by Andres Gomez
Modified: 2015-08-03 12:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libtracker-common: String to date conversion to return with GError when null string (1.99 KB, patch)
2015-07-17 22:21 UTC, Andres Gomez
committed Details | Review

Description Andres Gomez 2015-07-17 22:21:53 UTC
When a null string is passed to the "tracker_string_to_date" function, we can see this kind of output in the stderr:

tracker-miner-fs[2622]: GLIB CRITICAL ** Tracker - tracker_string_to_date: assertion 'date_string' failed

It would be better to return in a nicer way and with further information in the passed GError.
Comment 1 Andres Gomez 2015-07-17 22:21:58 UTC
Created attachment 307646 [details] [review]
libtracker-common: String to date conversion to return with GError when null string

Previously we were failing with a GLIB CRITICAL.
Now, return gentlier and with a filled GError.
Comment 2 Debarshi Ray 2015-07-31 12:08:29 UTC
Review of attachment 307646 [details] [review]:

Looks good to me, apart from the fact that the commit message should not be wider than 72 characters per line. I am not a tracker maintainer, so I can't give you the final stamp of approval.
Comment 3 Martyn Russell 2015-07-31 12:13:13 UTC
Review of attachment 307646 [details] [review]:

Good patch, thanks Andres, please commit! :)
Comment 4 Andres Gomez 2015-08-03 12:08:29 UTC
Attachment 307646 [details] pushed as b97e8db - libtracker-common: String to date conversion to return with GError when null string
Comment 5 Andres Gomez 2015-08-03 12:09:02 UTC
(In reply to Martyn Russell from comment #3)
> Review of attachment 307646 [details] [review] [review]:
> 
> Good patch, thanks Andres, please commit! :)

Thanks for the review!