Modify

Ticket #10073 (closed Bug Report - Crash: fixed)

Opened 20 months ago

Last modified 20 months ago

[Crash] mythfrontend crashes when navigating in Schedule Recordings screens

Reported by: Tony Lill <ajlill@…> Owned by: cpinkham
Priority: minor Milestone: 0.25
Component: MythTV - User Interface Library Version: 0.24.1
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Go to Manage Recordings->Schedule Recordings->Search Lists->New Titles->All and hit the END key. There's about a 50% chance that it will crash when you do. This seems to affect all the lists under Schedule Recordings when switching using the HOME or END keys or changing the sorting using 1 or 2. Basically anything that redraws a screen full of program listings.

Attachments

gdb.txt (46.5 KB) - added by Tony Lill <ajlill@…> 20 months ago.
backtrace
myth.log (3.8 KB) - added by Tony Lill <ajlill@…> 20 months ago.
log file

Change History

Changed 20 months ago by Tony Lill <ajlill@…>

backtrace

Changed 20 months ago by Tony Lill <ajlill@…>

log file

comment:1 Changed 20 months ago by paulh

This looks like a duplicate of #9388 and #9547 and is caused by two threads trying to access MythUIType member variables at the same time, usually m_DirtyRegion is involved from the crashes I've seen.

The two threads involved in this crash are the main thread running the gui and the thread fired up by MythScreenType::LoadInBackground?(). Both threads try to access MythUITypes at the same time resulting in random crashes. There's also a similar crash involving the main gui thread and the background image loading thread.

comment:2 Changed 20 months ago by stuartm

As the code for Load() says - " This method should only load data, it should never perform UI routines"

Although I accept that this wasn't added a doxygen comment so anyone relying on just the header/doxygen docs would have missed this. I'll improve the documentation but someone will have to fix proglister so that it doesn't touch UI stuff.

comment:3 Changed 20 months ago by stuartm

Just to correct myself, the header also carries the warning - " ONLY to be used for loading data, NO UI WORK"

comment:4 Changed 20 months ago by cpinkham

  • Owner changed from stuartm to cpinkham
  • Status changed from new to assigned

comment:5 Changed 20 months ago by Github

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Milestone changed from unknown to 0.25

Don't manipulate ProgList? MythUI elements outside the UI thread

FillItemList? is called both in the UI thread and outside the UI thread. Outside the UI thread, 'allowDisp' is false. We don't need to call m_progList->Reset() inside FillItemList? because it is called inside UpdateDisplay?() which is called from FillItemList? when updateDisp is true.

This commit also refactors the two UpdateDisplay?() methods a little and adds a new RestoreSelection?() method to perform the position restoration that was originally in the 2nd UpdateDisplay?() method.

Fixes #10073.

Branch: master Changeset: 8fed79e19f3fd6fada5c37f3ec3fc9224f872253

comment:6 Changed 20 months ago by Tony Lill <ajlill@…>

Backported this to 0.24 (just a bit of fuzz applying the patch) and it works great. Perhaps someone could do this in git?

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.