Opened 14 years ago
Closed 14 years ago
#6525 closed defect (fixed)
Memory Leaks (Valgrind Logs attached)
Reported by: | Owned by: | paulh | |
---|---|---|---|
Priority: | minor | Milestone: | 0.22 |
Component: | MythTV - General | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Hi there.
I recently upgraded to revision 20491 and started listening to my favorite radio show that I record each day.
After about 20 minutes my box ground to a halt.
I did some digging, and noticed memory growing a few megs each minute.
With a debug build and valgrind, I have produced 2 logs:
The first (valgrind-mythfrontend-20491M-start-and-quit.log) shows a small memory leak during initialisation - probably not significant. All I did was start mythfrontend and then quit again.
The second, more interesting log (valgrind-mythfrontend-20491M-radio-playback.log), is where I played back my radio show. It shows lots of leaks when dealing with MHI and OSD data. I only played around 20 seconds under valgrind, but it shows around 50MB leaked in total.
Am happy to do more testing etc. if required.
Attachments (2)
Change History (7)
Changed 14 years ago by
Attachment: | valgrind-mythfrontend-20491M-start-and-quit.log added |
---|
Changed 14 years ago by
Attachment: | valgrind-mythfrontend-20491M-radio-playback.log added |
---|
radio playback
comment:1 Changed 14 years ago by
The problem seems to be in OSDSet::Clear() for some reason Qt isn't deleting the OSD types after deleteLater() is called on them. The interative stuff is constantly clearing the OSD and recreating the OSD items again but because they never get deleted the memory usage grows rapidly.
comment:2 Changed 14 years ago by
Version: | unknown → head |
---|
In Qt4 deleteLater() is handled by the eventLoop() of the thread that where "new" was used to initially create the QObject. We are probably creating these objects in a thread which does not have a running Qt4 event loop. In Qt4, deleteLater() doesn't protect you from SLOT's being activated after a class is deleted anyway so the safest thing to do is probably to just remove all signals and slots from OSD objects, then remove the QObject inheritance and replace the deleteLater() with a simple delete.
comment:3 Changed 14 years ago by
Milestone: | unknown → 0.22 |
---|---|
Owner: | changed from Isaac Richards to paulh |
Status: | new → assigned |
start-and-quit.log