[mythtv-commits] Ticket #7253: mythfrontend segfault with threaded loading of images

MythTV mythtv at cvs.mythtv.org
Wed Oct 7 01:44:57 UTC 2009


#7253: mythfrontend segfault with threaded loading of images
---------------------------------------------+------------------------------
 Reporter:  simons.philippe at gmail.com        |        Owner:  cpinkham
     Type:  defect                           |       Status:  closed  
 Priority:  major                            |    Milestone:  0.22    
Component:  MythTV - User Interface Library  |      Version:  head    
 Severity:  medium                           |   Resolution:  fixed   
  Mlocked:  0                                |  
---------------------------------------------+------------------------------
Changes (by cpinkham):

  * status:  assigned => closed
  * resolution:  => fixed


Comment:

 (In [22287]) A group of changes and bugfixes related to MythUIImage
 threading.

 - Delete MythQtImage's QPixmap inside the UI thread in MythQtPainter.
   This fixes #7253.

 - Add a QMutex lock around all accesses to MythImage::m_RefCount so
   that we can access and update this value from multiple threads.
   This fixes segfaults reported in IRC.

 - Add a QReadWriteLock lock in MythUIImage to protect values that
   are read and written from more than one thread, such as m_Filename.

 - Create a dummy filename for gradients so that they can be treated
   uniquely, previously the filename was set empty, so in the event
   handler we were unable to tell what gradient was loaded.  This is
   part of the fix for the incorrectly drawn buttons on popup menus.

 - Reload the image/gradient when MythUIImage::ForceSize is called
   instead of resizing the currently loaded image.  There are places
   in the code where we create an image, then immediately force a
   new size on it, which was having no effect because there was no
   image loaded yet since we load images in the background now.
   This fixes an issue with incorrectly scaled coverart in MythVideo.

 - Add better locking around the in-memory image cache to prevent
   deadlocks which were encountered.

 - Reset the in-memory image cache's timestamp for an image when
   MythUIImage loads an image out of the cache.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/7253#comment:3>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list