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 737179 - Guard against invalid forecast entries
Guard against invalid forecast entries
Status: RESOLVED OBSOLETE
Product: gnome-weather
Classification: Applications
Component: general
3.14.x
Other All
: Normal normal
: ---
Assigned To: GNOME Weather Maintainer(s)
GNOME Weather Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-09-23 13:38 UTC by Debarshi Ray
Modified: 2021-07-05 10:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bug in the weather extension (572.71 KB, image/png)
2014-09-23 13:38 UTC, Debarshi Ray
  Details
Guard against invalid forecast entries (2.06 KB, patch)
2014-09-23 13:42 UTC, Debarshi Ray
none Details | Review
Screenshot of broken weekly forecast (459.48 KB, image/png)
2014-09-23 14:10 UTC, Debarshi Ray
  Details
Screenshot of correct weekly forecast (481.51 KB, image/png)
2014-09-23 14:11 UTC, Debarshi Ray
  Details

Description Debarshi Ray 2014-09-23 13:38:55 UTC
Created attachment 286872 [details]
Bug in the weather extension

While debugging a bug in the weather extension [1] (see screenshot), I realized that some of the entries returned by gweather_info_get_forecast_list can be invalid, and their validity should be checked using gweather_info_get_value_update

Although I have not been able to reproduce this bug in gnome-weather, it might be a good idea to guard against this anyway.

[1] https://extensions.gnome.org/extension/613/weather/
Comment 1 Debarshi Ray 2014-09-23 13:42:23 UTC
Created attachment 286873 [details] [review]
Guard against invalid forecast entries
Comment 2 Debarshi Ray 2014-09-23 14:08:22 UTC
Actually, now that I am trying out 3.13.x/3.14, I see that the weekly forecast looks broken without this patch. Obviously that did not affect older versions because the weekly forecast was limited.
Comment 3 Debarshi Ray 2014-09-23 14:10:54 UTC
Created attachment 286874 [details]
Screenshot of broken weekly forecast
Comment 4 Debarshi Ray 2014-09-23 14:11:33 UTC
Created attachment 286875 [details]
Screenshot of correct weekly forecast
Comment 5 Debarshi Ray 2014-09-23 14:30:22 UTC
I found the following cities to be affected today: Berlin, Helsinki, Stockholm, Hamburg, Prague, Brno

The list can change from one day to another because this depends on what we are getting from the server.
Comment 6 Giovanni Campagna 2014-09-23 14:58:18 UTC
Mh... do you have an example of the specific XML returned by the server when the bug occurs?
Comment 7 Debarshi Ray 2014-09-23 15:17:44 UTC
No, I don't, but it should be easy to get it today for one of those cities. But what is the history behind the gboolean returned by gweather_info_get_value_update ?
Comment 8 Giovanni Campagna 2014-09-23 16:15:04 UTC
Historical, mostly. The value is guaranteed to be == get_valid (), which is also guaranteed to be true for slave infos (ie, those obtained by get_forecast_list (), but not those created by hand).
It's also a matter of consistency with other get_value_*, which can fail for more reasons.
Comment 9 GNOME Infrastructure Team 2021-07-05 10:59:30 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-weather/-/issues/

Thank you for your understanding and your help.