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 309492 - weather applet hangs with "Updating..."
weather applet hangs with "Updating..."
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: gweather
2.11.x
Other Linux
: High major
: 2.12
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
: 315619 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-07-05 00:55 UTC by bugreports
Modified: 2005-09-09 12:52 UTC
See Also:
GNOME target: 2.12.x
GNOME version: 2.11/2.12


Attachments
Updates fix (1.09 KB, patch)
2005-07-10 21:06 UTC, Pierre Ossman
none Details | Review
Fixed logic (449 bytes, patch)
2005-07-10 21:10 UTC, Pierre Ossman
none Details | Review
the fix. (2.72 KB, patch)
2005-08-24 23:54 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description bugreports 2005-07-05 00:55:12 UTC
Distribution/Version: Debian/SID - PPC

Whenever a internet connection is lost gweather hangs with "Updating..." even
when the internet connection is reestablished, NOT updating weather information.

gweather should definitely retry obtaining weather information as scheduled even
if it failed before. as this was working in gnome 2.4/2.6/2.8 but now is not
with gnome 2.10 this is a regression bug, which could very well also be in
gnome-vfs...

The bug is major for me as it makes the weather information displayed very
unreliable.
Comment 1 Teppo Turtiainen 2005-07-09 10:37:02 UTC
Thanks for the bug report. This particular bug has already been reported into
our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 154535 ***
Comment 2 Pierre Ossman 2005-07-10 19:30:29 UTC
I don't agree that this is a duplicate of 154535. That bug talks about making
the applet update its information immediatly, not at the next update interval.
This bug is about the applet not updating information at all. Not now, not in 5
minutes, not ever.
Comment 3 bugreports 2005-07-10 19:34:09 UTC
True. Thanks for making pointing that out. gweather really from time to time
never ever again updates is weather info's but hangs with "Updating..."
Comment 4 Pierre Ossman 2005-07-10 21:06:52 UTC
Created attachment 48928 [details] [review]
Updates fix

The timer was only restarted when the update went well. So a single failure
caused the update cycle to break.
Comment 5 Pierre Ossman 2005-07-10 21:10:00 UTC
Created attachment 48929 [details] [review]
Fixed logic

The if-clauses weren't correct causing the fault counter logic to be useless.

I'm not sure I like the fault counter as it is. With the default update time of
30 minutes it takes 1½ hour before the applet indicates that there is a
problem. I see two solution to this:

* Use a shorter update cycle if there was a failure. Causing the three attempts
to go quicker (or get a correct update faster if it was just a short network
glitch).
* Remove the fault counter and update the applet on the first failure.
Comment 6 Danielle Madeley 2005-08-03 18:46:56 UTC
This needs to be reviewed.
Comment 7 Luis Villa 2005-08-24 21:30:24 UTC
So review it :) Nasty regression. 
Comment 8 Allison Karlitskaya (desrt) 2005-08-24 23:54:52 UTC
Created attachment 51299 [details] [review]
the fix.

Changed around the patch from comment #4 a bit to deal with the libnotify code
that has since been inserted.

I've also dealt with the logic problem talked about in comment #5:

  if( fail )
  {
    var++;
  }
  else if ( !fail || var > limit )
  {
    /* NEVER EVER RUNS SO LONG AS STILL FAILING!! Bad Davyd!  No cookie. */
  }

as such, the counter variable just runs to infinity and does absolutely nothing
else.

I reversed the order of the if/elseif so now it reads:

  if( !fail || var > limit )
    ...
  else
    ...

Since this is on Luis's list, I'm going to insta-merge this to CVS.  Please
check it out and test it ASAP.
Comment 9 Allison Karlitskaya (desrt) 2005-09-09 12:52:14 UTC
*** Bug 315619 has been marked as a duplicate of this bug. ***