Opened 12 years ago

Closed 11 years ago

#4666 closed patch (fixed)

Leaking timers and deleteLater() for tv_play.cpp

Reported by: Shane Shrybman <gnome42@…> Owned by:
Priority: minor Milestone: unknown
Component: mythtv Version: unknown
Severity: low Keywords:
Cc: Ticket locked: no

Description

While tracking down a QTimer related segfault in the frontend that occurs when exiting the player a I noticed the timers aren't being disconnected or deleted. (patch attached)

That lead to looking into the QT docs and the issues with signals and deleteLater(). The second patch implements deleteLater() for the TV class and changes all the users to use it instead of delete.

The deleteLater() patch is partly for review/feedback. Since I'm not sure it's absolutely required but it seems like the safer thing to do.

Attachments (2)

mythtv_tv_play_delete_timers.diff (1.2 KB) - added by Shane Shrybman <gnome42@…> 12 years ago.
delete timers in tv_play
mythtv_tv_play_deleteLater.diff (3.3 KB) - added by Shane Shrybman <gnome42@…> 12 years ago.
deletLater() for tv_play

Download all attachments as: .zip

Change History (8)

Changed 12 years ago by Shane Shrybman <gnome42@…>

delete timers in tv_play

Changed 12 years ago by Shane Shrybman <gnome42@…>

deletLater() for tv_play

comment:1 Changed 12 years ago by Janne Grunau

Milestone: unknown0.21
Owner: changed from Isaac Richards to Janne Grunau
Status: newaccepted

Does the deletion of the timers fix the segfault?

comment:2 Changed 12 years ago by Shane Shrybman <gnome42@…>

The segfault only happened rarely on exit and it hasn't happened in a while so I think it's fixed. I'm using both patches so I'm not sure exactly which of the patches did the job or if they are both needed.

I split the patch for submission because I thought the timer deletions were more likely to be correct and more easily reviewed/applied separately. I'm not completely sure I've done the deleteLater() stuff correctly though.

comment:3 Changed 12 years ago by Janne Grunau

(In [16141]) proper cleanup of timers in TVPlay deconstructor

Fixes a segfault. Refs #4666 From: Shane Shrybman <gnome42 gmail com>

comment:4 Changed 12 years ago by Janne Grunau

(In [16144]) Merges revision [16141] from trunk: proper cleanup of timers in TVPlay deconstructor

Fixes a segfault. Refs #4666 From: Shane Shrybman <gnome42 gmail com>

comment:5 Changed 12 years ago by Janne Grunau

Milestone: 0.21unknown
Owner: Janne Grunau deleted
Status: acceptednew

The TVPlay deleteLater patch has to wait for the release. I'm not even sure if it's needed

comment:6 Changed 11 years ago by Shane Shrybman

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.