[mythtv-commits] Ticket #2746: Frontend SEGV editing search rules via watch recordings.

MythTV mythtv at cvs.mythtv.org
Wed Nov 29 17:26:47 UTC 2006


#2746: Frontend SEGV editing search rules via watch recordings.
---------------------+------------------------------------------------------
 Reporter:  stuarta  |        Owner:  ijr 
     Type:  defect   |       Status:  new 
 Priority:  minor    |    Milestone:  0.21
Component:  mythtv   |      Version:  0.20
 Severity:  medium   |   Resolution:      
---------------------+------------------------------------------------------
Comment (by mikerice1969 at comcast dot net):

 Replying to [ticket:2746 stuarta]:

 Just adding what I know about this problem...

 I've been having this problem for awhile now (in 0.20-fixed) and finally
 brought it up in the debugger to see what was going on.

 In PlaybackBox::doEditScheduled() a ScheduledRecording (record) is created
 which is loaded
 in loadByProgram to contain a pointer to a ProgramInfo object (curitem).

 Note that the object is not copied.. there is a pointer assignment:

 void ScheduledRecording::loadByProgram(const ProgramInfo* proginfo)
 {
 m_pginfo = proginfo;

 So take note m_pginfo and set a breakpoint on the ProgramInfo
 destructor when this==&m_pginfo.

 You will see it is destroyed during processing in
 PlaybackBox::updateShowTitles()

 When you eventually try to use "schedRec" in
 RecOptDialog::updateInfo the ProgramInfo object
 is no longer valid and things go bad from there.

 No idea what the real fix is since I am not familiar with the code but the
 following takes care of the crash for me:

 Index: playbackbox.cpp
 ===================================================================[[BR]]
 --- playbackbox.cpp (revision 11748)[[BR]]
 +++ playbackbox.cpp (working copy)[[BR]]
 @@ -3007,10 +3007,12 @@[[BR]]
 else[[BR]]
 {[[BR]]
 ScheduledRecording record;[[BR]]
 - record.loadByProgram(curitem);[[BR]]
 + ProgramInfo* proginfo = new ProgramInfo(*curitem);[[BR]]
 + record.loadByProgram(proginfo);[[BR]]
 record.exec();[[BR]]
 [[BR]]
 connected = FillList();[[BR]]
 + delete proginfo;[[BR]]
 }[[BR]]
 } [[BR]]

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


More information about the mythtv-commits mailing list