Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Problems at use | Problèmes à l'utilisation 2 Bugs on weather.
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Problems at use | Problèmes à l'utilisation

Subjects Author Language Messages Last message
[Locked] 2 Bugs on weather. [Bug #306]
SQP English 5 matttbe [Read]
05 December 2012 à 01:28

SQP, Wednesday 31 October 2012 à 14:19


Subscription date : 03 July 2010
Messages : 1081
I had no network connection for two days, so it forced me to work on error reporting of my applets, as having an error popup every minute isn't bearable. While I was working on improving my logging system (I managed to get a result I hope will be efficient), I was somehow flooded by the weather applet. So here are my bugs:

Refresh timing problem. I don't know if it can be related to the network problem, but wether (haha) I set it to 10 or 60 min, it seem to refresh more often. The screenshot seem (see 2) to show it triggered 3 times in a minute.

And the second I want to report for so long:
Could it be possible to clean a little the error message on network problems. Weather applet and other network polling applets (rss is the same IIRC) aren't critical, and :
(1) network down is a "normal" problem, it doesn't require 5 lines of info.
(2) shouldn't produce cryptic messages
These are common trivial problems and should be treated as is. Here is my idea to fix this:

/src/gldit/cairo-dock-packages.c:cairo_dock_get_url_data_with_post:352
shouldn't display error. It's up to the caller to determine if error is relevant. We need a "no flood download" for pollers.
+
The message, which seem forwarded as the weather displays it again, could be reduced a little:
an error occured while downloading 'http://xml.weather.com/weather/local/FRXX1980?cc=*&unit=m' : Couldn't resolve host name

to
Download error 'http://xml.weather.com/weather/local/FRXX1980?cc=*&unit=m' : Couldn't resolve host name


and if we change the added message by weather
/cairo-dock-plug-ins/weather/src/applet-read-data.c:cd_weather_get_distant_data:308
while downloading current conditions data:
http://xml.weather.com/weather/local/FRXX1980?cc=*&unit=m ->

to
CD-Warning Weather:


We end up with this log message, from 5 lines, impossible to read because really too long, to only one simple line that get the same informations. 115 char is still too long but it's already a big step forward. And even if splitted, it should remain readable (like my mail check).

What we could get with my idea:
CD-Warning Weather: Download error 'http://xml.weather.com/weather/local/FRXX1980?cc=*&unit=m' : Couldn't resolve host name


Message logs must be short and direct, to decide quickly if it matters or not. With something like that, after only 4 words I already dropped and forgot the info.

http://uppix.net/2/e/f/06be455a6c9fa3dfea069a94a27bc.png

fabounet, Wednesday 07 November 2012 à 16:30


Subscription date : 30 November 2007
Messages : 17118
well, this is because if the applet can't connect, it will re-try in a few time for a few times before giving up
this is because on startup, the connection is often not yet ready.
having some temporary connection loss is also quite common.

OK for reducing the warnings as you proposed !

SQP, Wednesday 07 November 2012 à 16:46


Subscription date : 03 July 2010
Messages : 1081
I know from experience (console flooded) that weather.com don't have a 100% reply rate. I guess there's no need to stress it too much, and maybe we could reduce a little the retry rate. Something like time /5 could be enough (10m -> 2m, and 60m -> 12m)

And thanks for my idea approval

matttbe, Saturday 17 November 2012 à 19:25


Subscription date : 24 January 2009
Messages : 12573
Yes it can be interesting to have better log messages with the hour and other colors
(but it's also interesting to have the file and the line, it's really helpful when debugging something with a filter. But you're right, some messages are too long )

SQP, Monday 19 November 2012 à 13:20


Subscription date : 03 July 2010
Messages : 1081
file and the line are cool and just require 1 line to be changed to appear for my programs (need compile tought, I still need to find more configurable debug reporting settings (debug level from the dock would be a nice first step))
but they aren't needed for most reports. Both flood from the dock in my example don't need them.

And they're not supposed to appear for those error messages visible from my modules either. They are 'normal' errors related to download problems and shouldn't output more than that. (a warning may be enough)
(debug messages are pink messages on my screen, I added some more since, and they should help better see at which step a problem occured.)

[GoGmail] 2012/11/17 20:06:34 [Check mails]
[GoGmail] 2012/11/17 20:06:34 [Get mails from server]
[GoGmail] 2012/11/17 20:06:35 [ * no change]


when debugging something with a filter

filter can be set on action name, which is after the red Error

Imho error location should only be triggered for very special cases not supposed to happen, and related to application problem, not for every error message outputted to the used, when most of them are just simple "data" (missing/incomplete...) problems.

Date and time may be a little too much on my debug msg, but time at least proved usefull when working (helps detect multiple not synchronized polling loops)

Options I can think of atm: date/time, file/line, colors (a no color by default).

Here is a new bug that flood time helped me confirm. I don't see any valid reason why installing or removing a program (using console apt-get) would trigger a multi applet reload :
[GoGmail] 2012/11/19 13:10:13 [Reload module]
[Update] 2012/11/19 13:10:13 [Reload module]

[GoGmail] 2012/11/19 13:14:35 [Reload module]
[Update] 2012/11/19 13:14:35 [Reload module]


And the confirmation the signal really comes from the dock.

[GoGmail] 2012/11/19 13:17:41 [Received from dock on_reload_module]
[GoGmail] 2012/11/19 13:17:41 [Reload module]
[Update] 2012/11/19 13:17:41 [Reload module]

matttbe, Wednesday 05 December 2012 à 01:28


Subscription date : 24 January 2009
Messages : 12573
I'll try to not add debug messages with more than 80 chars, you're right, it's not interesting to add very long messages.

Date and time may be a little too much on my debug msg, but time at least proved usefull when working (helps detect multiple not synchronized polling loops)
Yes but date is certainly a bit too much

Problems at use | Problèmes à l'utilisation

Subjects Author Language Messages Last message
[Locked] 2 Bugs on weather. [Bug #306]
SQP English 5 matttbe [Read]
05 December 2012 à 01:28


Glx-Dock / Cairo-Dock List of forums Problems at use | Problèmes à l'utilisation 2 Bugs on weather. Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.