Opened 15 years ago

Closed 15 years ago

#6191 closed defect (fixed)

Deleting programs from within PBB causes segfault about 1/4 of the time

Reported by: jppoet@… Owned by: stuartm
Priority: minor Milestone: 0.22
Component: MythTV - General Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Using the D key to delete programs in PBB results in a segfault about 1/4 of the time.

What may be interesting, is I can predict when the segfault is going to happen, because the pop-up dialog asking for confirmation (allow re-record, etc), does not instantly appear -- Instead it kind of stutters into existence. Whenever it stutters into view, as soon as I select what mode of deletion I want, mythfrontend segfaults.

Trunk Revision: 19866 metallurgy-ui theme

BT attached

Attachments (2)

del-segfault.bt (15.9 KB) - added by jppoet@… 15 years ago.
BT of PBB delete segfault
del2.bt (12.9 KB) - added by jppoet@… 15 years ago.
Alternate BT

Download all attachments as: .zip

Change History (9)

Changed 15 years ago by jppoet@…

Attachment: del-segfault.bt added

BT of PBB delete segfault

comment:1 Changed 15 years ago by anonymous

When the segfault happens, chanid is invalid in:

QString ProgramInfo::MakeUniqueKey(void) const
{
    return chanid + "_" + recstartts.toString(Qt::ISODate);
}
(gdb) p chanid
$2 = {static null = {<No data fields>}, static shared_null = {ref = {_q_value = 27622}, alloc = 0, size = 0, data = 0x7d099a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, static shared_empty = {ref = {_q_value = 11598}, alloc = 0, size = 0, data = 0x39fdc27dba, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0}}, d = 0xd420fa0, static codecForCStrings = 0x0}


Changed 15 years ago by jppoet@…

Attachment: del2.bt added

Alternate BT

comment:2 Changed 15 years ago by jppoet@…

Adding another BT. This one is different then the first, but caused by the same scenario, except I did not see the pop-up dialog "stutter" into existence.

comment:3 Changed 15 years ago by R. Geoffrey Newbury <newbury@…>

My experience is that it seg-faults 100% of the time when deleting from the PBB. Does NOT do so when deleting while playing the recording. Mythfrontend -v playback,extra is:

<date-time> Warning: container 'pbbmainmenupopup' is missing child 'title' Segmentation fault

comment:4 Changed 15 years ago by stuartm

Milestone: unknown0.22
Version: unknownhead

Reasonably certain that this is a race condition with the RECORDING_LIST_CHANGE event invalidating the ProgramInfo? pointer for the item to be deleted. Are you deleting these recordings immediately after watching? What happens if you wait 30 seconds first?

On a side note, RECORDING_LIST_CHANGE events are inefficient, causing a complete rebuild of the ProgInfo? cache and UI list even though the change is usually minimal - addition or removal of one or two recordings. I'd be much happier if they included a list of recordings added and removed, that would allow much smoother and faster updates of the UI as well as avoiding problems like that above.

comment:5 Changed 15 years ago by jppoet@…

I get the crashes most often when deleting a batch of shows, one at a time. Most of the time, I have not watched the episode in question at all.

I am debugging a recording issue, and I am starting/stopping/starting/stopping/... mythbackend which results in a long list of short recordings. I get the crash when I go and clean up all of those short snippets.

comment:6 Changed 15 years ago by stuartm

Owner: changed from Isaac Richards to stuartm
Status: newaccepted

comment:7 Changed 15 years ago by stuartm

Resolution: fixed
Status: acceptedclosed

(In [20171]) Fix for segfault when deleting recordings immediately after playback. Tested this as best I can with the myriad different paths to the deletion of recording, but there are a great number of variables involved so let me know if you see strange behaviour with deletion. Closes #6191

Note: See TracTickets for help on using tickets.