Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#2638 closed defect (fixed)

Race condition on delete with video preview

Reported by: garrick@… Owned by: skamithi
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Stuart Auchterlonie Ticket locked: no

Description

This is a pretty easy frontend lockup to reproduce. In the playback screen, move focus to a recorded show (right cursor), then move focus back to the title (left cursor), and hit delete. The frontend will now be locked up. The gf does this about once a week :)

I'm attaching a patch that simply ignores the delete if inTitle.

Attachments (1)

mythtv-delete.patch (367 bytes) - added by garrick@… 14 years ago.
ignore delete key when inTitle in playback screen

Download all attachments as: .zip

Change History (14)

Changed 14 years ago by garrick@…

Attachment: mythtv-delete.patch added

ignore delete key when inTitle in playback screen

comment:1 Changed 14 years ago by garrick@…

Since the patch doesn't show much useful context, it is at the top of PlaybackBox::deleteSelected()

void PlaybackBox::deleteSelected() {

previewVideoState = kStopping;

if (inTitle)

return;

comment:2 Changed 14 years ago by skamithi

i cannot reproduce the lockup.. can anyone else ? works everytime for me. it shows the delete prompt.

comment:3 Changed 14 years ago by Mark Spieth

I can do it too. but its not as bad as it used to be. happens on my low power xbox FE. If I delete and press back/ESC before the delete is complete I can get back to the previous menu. Sometimes it takes several minutes before it responds to the remote. Sometimes it works within a few seconds. I suspect the FE is trying to play preview the just deleted file and then it goes away in a way it doesnt like. No logs but can get some if required. If it goes bad I have to restart myth FE to use it again. reasonably current HEAD.

comment:4 Changed 14 years ago by danielk

When you initially enter "Watch Recordings" does it take a long time to load? If so you may be waiting on the recordings list, a reload happens one second after the delete. Otherwise, if your SVN head is older than about two weeks you may be getting hit with the reschedule which gets scheduled right after a delete.

If the problem is with the preview video playback, just turn off that feature; skamithi is working on a better preview video player in #843.

comment:5 Changed 14 years ago by anonymous

The problem I'm seeing doesn't seem related to preview or any actual deletes. It is just simply that pressing the delete button freezes FE (no delete menu shows up) if a title is focused after a left cursor from a show.

This seems unrelated to markspieth's problem.

Initially entering "Watch Recordings" is fine. It takes a reasonable second to grab everything from the database and paint the screen.

  1. Enter "Watch Recordings"
  2. right cursor to a show (focus is now in the right pane on an episode)
  3. left cursor back to the left pane
  4. hit delete (the "red" button on my remote)
  5. FE is now locked up (no delete menu appeared)

This is 100% reproducible for me. It's not racey at all.

I'm using current ATrpms' 20-fixes line.

comment:6 Changed 14 years ago by garrick@…

I just found out that the preview is involved. Before cursor left, you must be focused on the show long enough for the preview to start.

  1. Enter "Watch Recordings"
  1. right cursor to a show
  1. wait a second for the preview to start
  1. left cursor back to category
  1. hit delete and FE will be locked up

It appears to me that killPlayerSafe() isn't returning.

deleteSelected()->remove()->showDeletePopup()->initPopup()->killPlayerSafe()

comment:7 Changed 14 years ago by Mark Spieth

entry duration before watchrecordings is shown is fast with or without items in watch recordings also it only locks up when the last recording is deleted. if a recording is deleted and its not the last one then everything is ok. also only seems to happen on my slow resource starved machine. 733MHz+64MB

comment:8 in reply to:  7 Changed 14 years ago by garrick@…

Replying to markspieth:

also it only locks up when the last recording is deleted. if a recording is deleted and its not the last one then everything is ok. also only seems to happen on my slow resource starved machine. 733MHz+64MB

You are describing a different problem. The problem I'm reporting doesn't require any previous deletes.

The reported problem seems to be related to killPlayerSafe() waiting forever for the preview player to stop when it wasn't actually running.

comment:9 Changed 14 years ago by danielk

Owner: changed from Isaac Richards to skamithi
Summary: delete causes frontend lock up when a title is focusedRace condition on delete with video preview
Version: 0.20head

Stanley, this should be fixed by your PiP rewrite, can you close this when that goes into SVN head (which may be a while from now, admittedly).

comment:10 Changed 14 years ago by Stuart Auchterlonie

Cc: Stuart Auchterlonie added

comment:11 Changed 13 years ago by garrick@…

This bug is still present in 0.20.2. Since I originally reported this bug, I've just disabled the previews. Can the 2 line patch be applied to 0.20-fixes?

comment:12 Changed 13 years ago by cpinkham

Resolution: fixed
Status: newclosed

Based on the description in comment #8, I believe this ticket was fixed by [15392]. Someone can reopen if they can reproduce the issue. Tickets #4421 and #3099 described similar circumstances.

comment:13 Changed 13 years ago by garrick@…

Will this be checked into release-0-20-fixes? If so, then I'll test on the next atrpms release.

The other comments don't match the problem that I'm describing. Despite the summary change, I'm seeing a race condition because it happens 100% of the time. It doesn't matter how long I wait before hitting "delete".

Note: See TracTickets for help on using tickets.