Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#8702 closed defect (fixed)

MythDownloadManager broken when used via MythUIImage::Load

Reported by: beirdo Owned by: cpinkham
Priority: blocker Milestone: 0.24
Component: MythTV - User Interface Library Version: Master Head
Severity: high Keywords:
Cc: Ticket locked: no


This is being used by MythWeather? for the static (and soon animated) maps, and it was working, but now is not. Seems that the changes for async loading broke it somewhat.

The following is a partial backtrace of the coredump I get when I start mythweather.

#0  0x00007f243a023da0 in QNetworkAccessManager::cache() const ()
   from /usr/lib/
#1  0x00007f244169fd53 in MythDownloadManager::GetLastModified (
    this=0x7f242cd63df0, url=...) at mythdownloadmanager.cpp:950
#2  0x00007f2441220334 in MythUIHelper::LoadCacheImage (this=0x7f242c002db0,
    srcfile=..., label=..., cacheMode=kCacheCheckMemoryOnly)
    at mythuihelper.cpp:1427
#3  0x00007f2441235974 in MythUIImage::Load (this=0x4917f30,
    allowLoadInBackground=true) at mythuiimage.cpp:604
#4  0x00007f2424b238b3 in WeatherScreen::prepareScreen (this=0x6265e80)
    at weatherScreen.cpp:138

The problem is that m_manager == NULL, and the call to m_manager->cache() blows up because NULL->cache() is rather invalid.

I would consider this to be a blocker as it will crash the frontend any time it is used.

Change History (2)

comment:1 Changed 11 years ago by cpinkham

Resolution: fixed
Status: newclosed

(In [25462]) Add a flag to indicate when the MythDownloadManager? thread is fully initialized and running. This fixes a race condition seen when the GetLastModified?() routine tried to the the QNetworkAccessManager instance before MythDownloadManager::run() had finished initializing and enterring its loop.

Closes #8702.

NOTE: This does change the binary API version, so make clean, etc..

comment:2 Changed 11 years ago by stuartm

Milestone: unknown0.24
Note: See TracTickets for help on using tickets.