Memory leak in font engine when TV playing (1 Viewer)

Pirppuli

MP Donator
  • Premium Supporter
  • July 19, 2008
    63
    44
    Helsinki
    Home Country
    Finland Finland
    MP seems to leak resources when scrolling through a (large) collection on videos with TV playing. Even though memory usage for the process grows fairly modestly, system memory commit quickly reaches a point where no more can be allocated. The resources are not freed before MP is exited.

    Steps to reproduce:
    • have a collection of video files in separate folders and Folder.jpg in each of them (mine are 511 x 755 px )
    • start MP, start TV
    • go to Videos and scroll through the collection (Filmstript & List layouts seemed to function the same)
    • observe memory commit in Task Manager
    • continue, until thumbnails can no longer be shown and/or the system runs out of memory
    Logs attached.

    Images of Windows Task Manager: TV started, Movies scrolled back & forth, TV stopped, MP exited

    memoryleak1tvon.png
    memoryleak2moviesflippe.png
    memoryleak3tvstopped.png
    memoryleak4mediaportale.png


    Test system details (these differ from the production HTPC specs in my signature):

    MediaPortal Version: 1.1.1
    MediaPortal Skin: Blue3 Wide
    Windows Version: Windows 7 x64
    CPU Type: Intel Core 2 Duo E6700 @ 2.66 GHz
    HDD: Samsung EcoGreen F2 500 GB
    Memory: 4 GB DDR2
    Motherboard: Asus P5Q Deluxe
    Video Card: ATI Radeon HD5770 1 GB
    Video Card Driver: Catalyst 10.4
    Sound Card: Integrated
    Sound Card AC3: Optical out
    Sound Card Driver: Provided by the OS
    1. TV Card: TechniSat CableStar HD2
    1. TV Card Type: DVB-C
    1. TV Card Driver: 1.1.1.502
    2. TV Card:
    2. TV Card Type:
    2. TV Card Driver:
    3. TV Card:
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec: MS DTV-DVD Video Decoder
    MPEG2 Audio Codec: MS DTV-DVD Audio Decoder
    h.264 Video Codec: MS DTV-DVD Video Decoder
    Satelite/CableTV Provider: Welho
    HTPC Case: Antec P180
    Cooling:
    Power Supply:
    Remote:
    TV:
    TV - HTPC Connection: DVI
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Does the same leak happen when playing DVD or AVI? Most likely the recent recture manager changes aren't allowing textures to be released when EVR / VMR9 presenter's thread is used for rendering.
     

    Pirppuli

    MP Donator
  • Premium Supporter
  • July 19, 2008
    63
    44
    Helsinki
    Home Country
    Finland Finland
    Does the same leak happen when playing DVD or AVI? Most likely the recent recture manager changes aren't allowing textures to be released when EVR / VMR9 presenter's thread is used for rendering.

    Indeed, the same leak happens when playing DVD or AVI, so it's not specific to watching TV. The reason I noticed this was that my main HTPC started running regularly out of memory (without any specific process seemingly consuming it) when using MP for a longer period of time. Normally, the system is on standby when not in use, and MP is not restarted on resume. There may be other scenarios where memory is leaked, as well, but the steps I oulined above were the simplest to reproduce the issue very fast.
     

    infinite.loop

    Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Home Country
    Austria Austria
    I do have quite a lot of fanart and highres (1280* x) folder.jpg's.
    I did not notice such a behaviour yet.

    It is great that you posted the screenshots of taskmanager, but they do not help at all because they only show the total memory usage and not the one from MediaPortal.exe, which would be a lot more interesting.
    Maybe you can repeat your test, switch to "processes" in taskmanager and show us the actual amount of memeory mediaportal.exe uses?

    :D
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800

    Pirppuli

    MP Donator
  • Premium Supporter
  • July 19, 2008
    63
    44
    Helsinki
    Home Country
    Finland Finland
    Maybe you can repeat your test, switch to "processes" in taskmanager and show us the actual amount of memeory mediaportal.exe uses?

    Here are the images of Windows Task Manager: TV started, Movies scrolled back & forth, TV stopped, MP exited

    processes1tvon.png
    processes2moviesflipped.png
    processes3tvstopped.png
    processes4mediaportalex.png


    The increase in memory committed to MP is much lower than the increase I see at the system level.
     

    graemef

    Portal Pro
    November 28, 2004
    128
    4
    54
    Perth
    Home Country
    I have just done some more testing. It is definately if I have some running, eg TV, and browse a list, eg videos, that has a lot of entries. I see swap file memory increase steadly. When I stop the TV about 50% of the increase is freed up, the rest stays in use. Do this a couple of time and I soon have MP using about 1.5G of swap file. Stop and start MP client and all comes good again.
    I take it there is not going to be a patch released for this soon, is rolling back to 1.1.0 the only option at the moment as I need to restart a couple of times each TV session an the moment.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Could you test following attached mediaportal.exe and core.dll? Just take a backup of existing ones and then replace with the provided ones.

    TV most likely wont work since the tv service is on a different version.
     

    graemef

    Portal Pro
    November 28, 2004
    128
    4
    54
    Perth
    Home Country
    From what I can see initially, this looks good. TV works fine as well. Run Video and TV and browsed lots of lists and screens. Didn't seem to leak memory at all and freed up what was used all the time.
    Any reason I can't run this version instead of rolling back to 1.1.0 ?
    Thanks
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Any reason I can't run this version instead of rolling back to 1.1.0 ?

    No, if it works ok then there is no reasons - the code is almost identical to the 1.1.1 relase, only texture management related code is a bit different (and maybe some other minor change). But if it works it should be safe.

    One small catch would be that there is no "official" support for that combination - so you shouldn't report any bugs with that combination.
     

    Users who are viewing this thread

    Top Bottom