Project

General

Profile

Actions

Bug #277

closed

weather shows busy under some situations

Added by xbones almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Weather forecasts
Target version:
Start date:
04/01/2014
Due date:
% Done:

100%

Resolution:
fixed
Affected Version:

Description

Short term workaround with 2 line edit to weather.cpp requested in the absence of any other weather solution as reported on forum:

http://www.xbmc4xbox.org.uk/forum/viewtopic.php?f=6&t=1931#p16704

Example action:
UK xbox with correct local time;
View UK weather location after 7pm;

Expected result:
Current UK evening weather shown and refreshes ok;

Actual result:
Screen hangs showing 'busy' and xbox restart required to clear.

Actions #1

Updated by buzz almost 11 years ago

better to include relevent information here :):

I think I've got to the bottom of the random weather issues, also covered on this thread:
http://www.xbmc4xbox.org.uk/forum/viewtopic.php?f=7&t=1847

It looks like the returned xml from the weather site has been optimised and the 3.3.x releases can't cope. The reason it seems to come and go is that it depends on a few things:

  • The actual time according to weather site;
  • The time according to your xbox;
  • The location you're going for;

The xml change would appear to be that the first future day entry "dayf" no longer contains both day "d" and night "n" nodes IF the time according to weather site is now non-daytime - instead it just contains the "n" node. The existing xbmc code has a check based on local time to skip the first node assuming it to be "d" when it's after 7pm and tries to get the remaining "n" info. However, as the "d" info may not exist depending on the factors above, the code can end up with a null pDayTimeElement that causes it to hang and show busy.

Given the optimised xml it's now unnecessary to anything clever in xbmc and just use the first day/night "part", so the code in weather.cppcan be fixed by removing these two lines:

    if (i == 0 && (time.wHour < 7 || time.wHour >= 19)) //weather.com works on a 7am to 7pm basis so grab night if its late in the day
    pDayTimeElement = pDayTimeElement->NextSiblingElement("part");

You can check this yourself with existing 3.3.x as say it's evening UK and your first weather location is Auckland, NZ all is fine, but going to London will cause a busy and you'll need to restart.

I can put the change back into the SVN, but rather someone else did to avoid confusion, just let me know. I've only tested it based on 3.3.3 stable code base and could probably find a torrent of a fixed xbe if pushed in the meantime ;)

Thanks must go to the missus for spotting the time aspect of the busy feature :roll:

Actions #2

Updated by buzz almost 11 years ago

  • Category set to Weather forecasts
  • Status changed from New to Closed
  • Assignee set to buzz
  • Target version set to 3.5
  • % Done changed from 0 to 100
  • Resolution set to fixed

fixed in r32660. thanks for the fix.

Actions

Also available in: Atom PDF