Memory leak in latest build (1 Viewer)

Raven

Retired Team Member
  • Premium Supporter
  • September 12, 2005
    124
    0
    Stockholm
    Has anyone else noticed a huge memory leak in the latest build?
    When I woke up this morning Media Portal was using 758 MB of RAM and had consumed 1 hour and 15 minutes of CPU time since 3 AM this morning.
     

    wortelsoft

    Portal Pro
    May 13, 2005
    374
    1
    46
    Rotterdam, The Netherlands
    Home Country
    Netherlands Netherlands
    I noticed it also it's in todays and yesterday cvs build. I sitch back to acvs from a week ago (just had that one on my harddrive)
    After startup today my system was running out of memory and task manager showed mp with 800MB+.
     

    BoelShit

    Portal Pro
    November 6, 2005
    235
    8
    42
    Home Country
    Netherlands Netherlands
    Same problem here..... switching back to older CVS.....
    running out of memory LOL
     

    Raven

    Retired Team Member
  • Premium Supporter
  • September 12, 2005
    124
    0
    Stockholm
    I think I may have found what caused the problem on my system at least. I deleted the task for updating the tv guide and now MP doesn't seem to leak memory anymore.
     

    scoop

    Retired Team Member
  • Premium Supporter
  • November 14, 2004
    614
    7
    Hi,

    I'm experiencing the exact same thing. It seems that while updating the tvguide (with WebEPG in my case) MP gets into a race condition. Some extracts from the log:

    Code:
    7-1-2006 6:55:01 WebEPG: TimeZone Not valid
    7-1-2006 7:16:07 SQL:TVDatabaseV21.db3 cmd:sqlite3_step err:ERROR detailed:database schema has changed query:select * from channel,tblPrograms,genre where genre.idGenre=tblPrograms.idGenre and tblPrograms.idChannel=channel.idChannel and channel.strChannel like 'NET5'  and ( (tblPrograms.iEndTime>='20060105071600' and tblPrograms.iEndTime <='20060109071600')  or (tblPrograms.iStartTime>='20060105071600' and tblPrograms.iStartTime <= '20060109071600' )  or (tblPrograms.iStartTime<='20060105071600' and tblPrograms.iEndTime >= '20060109071600') ) order by iStartTime
    It seems the message "database schema has changed" is the key, since it's repeated a few times after this. After a little while, the error.log shows:
    Code:
    7-1-2006 7:29:29 SQL:TVDatabaseV21.db3 cmd:sqlite3_step err:ERROR detailed:SQL logic error or missing database query:vacuum
    and eventually a:
    Code:
    7-1-2006 7:57:34 TVDatabase exception err:Exception of type 'System.OutOfMemoryException' was thrown. stack:   at System.Collections.Generic.List`1.set_Capacity(Int32 value)
    Today I began with a clean TVDatabase, to see if corruption of the database might be causing this. We'll see tomorrow. I do however think that this error is caused because some objects in the database have been changed/updated while the tvguide is being updated. Maybe a (multi)threading issue?

    EDIT: All this with CVS version mediaportal-cvs-01-06-2006--01-04

    Kind regards,
    Michel
     

    scoop

    Retired Team Member
  • Premium Supporter
  • November 14, 2004
    614
    7
    OK,

    It looks like MediaPortal lived through the night :)
    No "OutOfMemoryException", "SQL logic error or missing datbase query" anymore in the error.log. But, I still see the "database schema has changed" errors:
    Code:
    8-1-2006 6:56:07 SQL:TVDatabaseV21.db3 cmd:sqlite3_step err:ERROR detailed:database schema has changed query:select * from channel,tblPrograms,genre where genre.idGenre=tblPrograms.idGenre and tblPrograms.idChannel=channel.idChannel and channel.strChannel like 'RTL 4'  and ( (tblPrograms.iEndTime>='20060106065600' and tblPrograms.iEndTime <='20060110065600')  or (tblPrograms.iStartTime>='20060106065600' and tblPrograms.iStartTime <= '20060110065600' )  or (tblPrograms.iStartTime<='20060106065600' and tblPrograms.iEndTime >= '20060110065600') ) order by iStartTime
    8-1-2006 6:56:07 TVDatabase exception err:SQL:TVDatabaseV21.db3 cmd:sqlite3_step err:ERROR detailed:database schema has changed query:select * from channel,tblPrograms,genre where genre.idGenre=tblPrograms.idGenre and tblPrograms.idChannel=channel.idChannel and channel.strChannel like 'RTL 4'  and ( (tblPrograms.iEndTime>='20060106065600' and tblPrograms.iEndTime <='20060110065600')  or (tblPrograms.iStartTime>='20060106065600' and tblPrograms.iStartTime <= '20060110065600' )  or (tblPrograms.iStartTime<='20060106065600' and tblPrograms.iEndTime >= '20060110065600') ) order by iStartTime stack:   at SQLite.NET.SQLiteClient.ThrowError(String statement, String sqlQuery, SqliteError err)
       at SQLite.NET.SQLiteClient.ReadpVm(String query, SQLiteResultSet set1, IntPtr pVm)
       at SQLite.NET.SQLiteClient.Execute(String query)
       at MediaPortal.TV.Database.TVDatabase.GetProgramsPerChannel(String strChannel1, Int64 iStartTime, Int64 iEndTime, List`1& progs) select * from channel,tblPrograms,genre where genre.idGenre=tblPrograms.idGenre and tblPrograms.idChannel=channel.idChannel and channel.strChannel like 'RTL 4'  and ( (tblPrograms.iEndTime>='20060106065600' and tblPrograms.iEndTime <='20060110065600')  or (tblPrograms.iStartTime>='20060106065600' and tblPrograms.iStartTime <= '20060110065600' )  or (tblPrograms.iStartTime<='20060106065600' and tblPrograms.iEndTime >= '20060110065600') ) order by iStartTime
    8-1-2006 6:56:25 SQL:TVDatabaseV21.db3 cmd:sqlite3_step err:ERROR detailed:database schema has changed query:select * from tblEPGMapping where xmltvid like 'bbcworld.com'
    8-1-2006 6:56:25 TVDatabase exception err:SQL:TVDatabaseV21.db3 cmd:sqlite3_step err:ERROR detailed:database schema has changed query:select * from tblEPGMapping where xmltvid like 'bbcworld.com' stack:   at SQLite.NET.SQLiteClient.ThrowError(String statement, String sqlQuery, SqliteError err)
       at SQLite.NET.SQLiteClient.ReadpVm(String query, SQLiteResultSet set1, IntPtr pVm)
       at SQLite.NET.SQLiteClient.Execute(String query)
       at MediaPortal.TV.Database.TVDatabase.GetEPGMapping(String xmlTvId, Int32& idChannel, String& strChannel)
    8-1-2006 7:06:34 WebEPG: TimeZone Not valid
    8-1-2006 7:06:34 WebEPG: ChannelId: [email]ned3@omroep.nl[/email] grabber error
    8-1-2006 7:06:34 WebEPG: TimeZone Not valid
    8-1-2006 7:51:04 SQL:TVDatabaseV21.db3 cmd:sqlite3_step err:ERROR detailed:database schema has changed query:select * from channel,tblPrograms,genre where genre.idGenre=tblPrograms.idGenre and tblPrograms.idChannel=channel.idChannel and channel.strChannel like 'RTL 4'  and ( (tblPrograms.iEndTime>='20060106075100' and tblPrograms.iEndTime <='20060110075100')  or (tblPrograms.iStartTime>='20060106075100' and tblPrograms.iStartTime <= '20060110075100' )  or (tblPrograms.iStartTime<='20060106075100' and tblPrograms.iEndTime >= '20060110075100') ) order by iStartTime
    8-1-2006 7:51:04 TVDatabase exception err:SQL:TVDatabaseV21.db3 cmd:sqlite3_step err:ERROR detailed:database schema has changed query:select * from channel,tblPrograms,genre where genre.idGenre=tblPrograms.idGenre and tblPrograms.idChannel=channel.idChannel and channel.strChannel like 'RTL 4'  and ( (tblPrograms.iEndTime>='20060106075100' and tblPrograms.iEndTime <='20060110075100')  or (tblPrograms.iStartTime>='20060106075100' and tblPrograms.iStartTime <= '20060110075100' )  or (tblPrograms.iStartTime<='20060106075100' and tblPrograms.iEndTime >= '20060110075100') ) order by iStartTime stack:   at SQLite.NET.SQLiteClient.ThrowError(String statement, String sqlQuery, SqliteError err)
       at SQLite.NET.SQLiteClient.ReadpVm(String query, SQLiteResultSet set1, IntPtr pVm)
       at SQLite.NET.SQLiteClient.Execute(String query)
       at MediaPortal.TV.Database.TVDatabase.GetProgramsPerChannel(String strChannel1, Int64 iStartTime, Int64 iEndTime, List`1& progs) select * from channel,tblPrograms,genre where genre.idGenre=tblPrograms.idGenre and tblPrograms.idChannel=channel.idChannel and channel.strChannel like 'RTL 4'  and ( (tblPrograms.iEndTime>='20060106075100' and tblPrograms.iEndTime <='20060110075100')  or (tblPrograms.iStartTime>='20060106075100' and tblPrograms.iStartTime <= '20060110075100' )  or (tblPrograms.iStartTime<='20060106075100' and tblPrograms.iEndTime >= '20060110075100') ) order by iStartTime
    (please ignore the WebEPG "grabber error" for ChannelId: ned3@omroep.nl, it's known to me and something I need to fix ;))
    So far it seems that at least the race condition is gone since I've recreated the TVDatabase.

    Kind regards,
    Michel
     

    midiboy

    Portal Pro
    March 14, 2005
    78
    0
    Hi !

    Is this problem solved already in the latest builds ? I don´t see anything in the changelog .... :D

    Thanks,
    Alex
     

    5teve

    Retired Team Member
  • Premium Supporter
  • April 26, 2005
    118
    3
    47
    Perth, Australia
    guys a bit off topic but are you all running VMR7? i think i remember a memory leak occuring with vmr7 (overlay) enabled... if so change to vmr9 and see if that helps

    Thanks

    Steve
     

    midiboy

    Portal Pro
    March 14, 2005
    78
    0
    Hi !

    No, I am using VMR9 already. also this leak occurs with no video playing ...
     

    KRA

    Portal Pro
    July 5, 2005
    145
    5
    44
    Home Country
    Norway Norway
    Any news on this? I still have this problem with yesterdays build.

    Everything was fine, then memory usage startet raising, from the normal 130mb, and already at 200mb mediaportal startet skipping sound/video, a little later mediaportal was not responding. I've seen it using 7-800MB before then I killed the process.

    Area: Media Portal Program
    MediaPortal Version: 0.2.0.0 RC1 (2005-11-23)
    MediaPortal Skin: BlueTwo
    Windows Version: Windows XP (SP2)
    .NET CLR Version: 2.0.50727
    DirectX Version: 4.09.00.0904 (9.0c)
    Audio Codec: InterVideo Audio Decoder
    Video Codec: InterVideo Video Decoder
    CPU Type: AMD Athlon 64 X2 Dual Core 3800+
    Memory: 1 GB
    Motherboard: MS-7025
    TV Card Model: Hauppauge PVR 350
    TV Card Type: Hardware
    TV Card Driver: latest
    TV Card Model: FloppyDTV
    TV Card Type: Software/DVB
    TV Card Driver: latest
    Video Card Model: Nvidia Geforce 6600 GT (128 MB)
    Video Card Driver: 81.95
    Video Card Resolution: 1368x768
    Video Render Type: VMR9
    Audio Card Model: Realtek AC'97 Audio
    Audio Card Driver: -
     

    Users who are viewing this thread

    Similar threads

    As a general note on this, if GC.Collect were to resolve the issue then it's not a true memory leak as the GC only collects managed objects that the runtime can see are no longer being referenced, as oppose to either unmanaged memory being allocated outside of the runtime which the GC doesn't touch either way, or a lot of objects...
    As a general note on this, if GC.Collect were to resolve the issue then it's not a true memory leak as the GC only collects managed...
    There appears to be a memory leak in TvService.exe of about 15KB per hour. After restarting my system (W10, MP 1.27) Windows task...
    Replies
    42
    Views
    5K
    Many people found the Lentoid decoder better optimised than LAV for software decoding. If you want to try it, download it from the link below, run reg.bat as an admin to install it and change the HEVC Video settings in MediaPortal Configuration/Codecs and Renderer...
    Many people found the Lentoid decoder better optimised than LAV for software decoding. If you want to try it, download it from the...
    For some unknown reason I can't play HEVC encoded video with MP1 on my system. I have tried every trick I know, but nothing works...
    Replies
    10
    Views
    3K
    I have the same problem in Win 11 pro and MP 2.4.1... As soon I move the mouse the MP client turns really slow or unresponsive.
    I have the same problem in Win 11 pro and MP 2.4.1... As soon I move the mouse the MP client turns really slow or unresponsive.
    Good evening, having just fresh installed media portal 2.3.2. Looking at trialing again as it now seems to support what I am...
    Replies
    3
    Views
    2K
    Good afternoon. I realized I never got back to posting the solution I found. Basically, I think I broke this on my own. I had made some registry changes to attempt to increase the video quality, which ended up not being supported by Kodi. Attached is a screenshot of what my final (working) settings are, just in case anyone else...
    Good afternoon. I realized I never got back to posting the solution I found. Basically, I think I broke this on my own. I had...
    Good morning. Back a few months ago, I replaced my original HTPC with updated hardware. I have a few Hauppauge ATSC tuners I'm...
    Replies
    2
    Views
    1K
    I have added missing fields to schedule structure, with "-1" as default for margins. According to comments this should apply the configured pre- and post record margins of TvMosaic. Please extract the TvMosaic.API.dll into ProgramFiles\Team MediaPortal\MP2-Client\Plugins\SlimTv.TvMosaicProvider and then create a new schedule. Please...
    I have added missing fields to schedule structure, with "-1" as default for margins. According to comments this should apply the...
    The current TV engine (TVE3) for Media Portal 1 and 2 was developed long time before and is not state of the art any more...
    Replies
    328
    Views
    37K
    Top Bottom