Opened 10 years ago

Closed 10 years ago

#7253 closed defect (fixed)

mythfrontend segfault with threaded loading of images

Reported by: simons.philippe@… Owned by: cpinkham
Priority: major Milestone: 0.22
Component: MythTV - User Interface Library Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

while browsing my media in mythvideo, mythfront did a segfault here is the log and backtrace of mythfrontend

Attachments (3)

mythfrontend.log (8.2 KB) - added by simons.philippe@… 10 years ago.
mythfrontend log
bt.log (23.5 KB) - added by simons.philippe@… 10 years ago.
mythfrontend backtrace
mythfrontendcrash.txt (8.9 KB) - added by ryan.goat@… 10 years ago.
mythfrontend log showing crash while browsing in mythvideo

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by simons.philippe@…

Attachment: mythfrontend.log added

mythfrontend log

Changed 10 years ago by simons.philippe@…

Attachment: bt.log added

mythfrontend backtrace

comment:1 Changed 10 years ago by robertm

Component: MythTV - GeneralMythTV - User Interface Library
Owner: changed from Isaac Richards to cpinkham
Status: newassigned
Summary: mythfrontend segfault while browsing mythvideo librarymythfrontend segfault with threaded loading of images

Fix for this is under way, but leaving open as there isn't another ticket tracking it.

Changed 10 years ago by ryan.goat@…

Attachment: mythfrontendcrash.txt added

mythfrontend log showing crash while browsing in mythvideo

comment:2 Changed 10 years ago by ryan.goat@…

I think I just saw the same crash. Log attached as: mythfrontendcrash.txt just because more is better.

comment:3 Changed 10 years ago by cpinkham

Resolution: fixed
Status: assignedclosed

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

  • 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.
Note: See TracTickets for help on using tickets.