Out of Memory with large collection (1 Viewer)

dir

MP Donator
  • Premium Supporter
  • August 30, 2006
    408
    36
    Home Country
    Afghanistan Afghanistan
    I've been having MP abort on me for several months and have started keeping the logs to try to figure out what's wrong. Unfortunately most of the recent aborts (for which I Have logs from MP1.2.2 and 1.2.1, and for at least 2 most recent versions of TVSeries) all show the same error, and looking into it I've got a sinking feeling about it:

    2012-01-01 21:49:23.963449 [ERROR][(353)]: Exception : System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
    (the rest of the stack is in the logs attached)

    My TV collection is large - 462 series, 1951 seasons, and 31378 episodes :eek:. My PC has 8GB of memory.

    If it's a bug, it'll be obscure. I suspect it's simply hitting some internal limit. I guess my e-penis should be hard for being the first one to hit it, but I'm more worried about there not being a solution short of chopping down my collection....

    I'll attach just the most recent log (I ran MP in debug mode this time) and I also have a zip file of the database, but it's 13MB zip of the 71MB database so I won't attach it until requested.

    Happy to help with debugging if needed.

    dir
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    The first error was much earlier and seems to relate to DirectX.

    Code:
    2012-01-01 20:47:36.247380 [Debug][ViewModeSwitcher(32)]: Error in the application.
    -2147024882 (E_OUTOFMEMORY)
       at Microsoft.DirectX.Direct3D.SurfaceLoader.SaveSurfaceToStreamInternal(ImageFileFormat destFormat, Surface srcSurface, PaletteEntry[]& sourcePalette, tagRECT* srcRectangle)
       at Microsoft.DirectX.Direct3D.SurfaceLoader.SaveToStream(ImageFileFormat destFormat, Surface srcSurface)
       at MediaPortal.FrameGrabber.GetCurrentImage()

    Comparing your DirectX version of "DxDiag Version: 6.01.7601.17514 32bit Unicode" to the one I get on my box of "DxDiag Version: 7.00.6002.18107 32bit Unicode", I would look at updating that one first.

    Also the error in question that did eventually cause the fatal crash might relate to FanartHandler and/or InfoService, so see if you can reproduce with those disabled. It's weird, I see FanartHandler.dll getting loaded, but there is no fanarthandler.log file, so not sure what's up with that. At least it's something you can look at next if the DirectX update still causes problems.
     

    dir

    MP Donator
  • Premium Supporter
  • August 30, 2006
    408
    36
    Home Country
    Afghanistan Afghanistan
    I downloaded the latest DirectX (directx_Jun2010_redist.exe) from here and rebooted. The version of DXDiag remains the same - 6.01.7601. Since DXDiag comes with DirectX, I couldn't find an independent version out there. I'm running 64-bit Windows 7.

    I got another abort just now - the err.log is shorter but still the same roughly.
    I thought I had already disabled FanartHandler a couple of months ago when I saw it in the older log files but I'll check again. I updated all the plugins via the MP Extension installer and probably re-enabled it recently after the MP 1.2.2 upgrade. I also upgraded all the other extensions and skins hoping a complete update would resolve things.

    Atttached is tonight's abort that happened after the DirectX update. Also attached is the DXDiag outputs.

    Will disable InfoService, FanartHandler, and 5 or 6 other plugins I don't need and try again. It's late now so it won't be until tomorrow night.
    I'll also update my NVidia drivers to the latest non-beta release (so DXDiag info will now be slightly out of date) [Update: Turns out I already have the latest version but I re-installed it anyway]

    THanks for looking into it - fingers crossed it's something simple.
     

    Attachments

    • DxDiag32.txt
      32.8 KB
    • DxDiag64.txt
      38.9 KB

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    The version of DXDiag remains the same

    I got another abort just now - the err.log is shorter but still the same roughly.

    My bad, was checking wrong DxDiag, so ignore that.

    And I see all new errors.

    FiresatApi.dll can not be found and "Google.GData.Client.dll" plugin is freaking out all over the place, now normally all those warnings should not make any difference, but considering you are not running stable who is to know for sure.

    And your error.log starts off with something new as well:

    Code:
    2012-01-05 00:12:45.105427 [ERROR][MPMain(1)]: HTPC Info: Speedfan Shared Memory Initialization Error. (Error Code: HTPCInfo.Core.SharedMemoryException: Error accessing shared memory area. (2)
       at HTPCInfo.Core.SpeedfanSharedMemory..ctor()
       at HTPCInfo.Core.SpeedfanHandler..ctor(Boolean filterZeroValues)
       at HTPCInfo.Core.SpeedfanHandler..ctor()
       at HTPCInfoPlugin.HTPCInfo.InitConnectors(), Error accessing shared memory area. (2))

    Unless you know 100% sure that this error is not the cause for every following error to happen direct or indirectly, it has no sense even looking at the rest until that error is gone.
     

    dir

    MP Donator
  • Premium Supporter
  • August 30, 2006
    408
    36
    Home Country
    Afghanistan Afghanistan
    Yeah, those new errors are from a new plugin I installed a day or so ago - SysInfo - but it's one of the ones I've disabled now so the next error logs should be "cleaner".
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    The first error was much earlier and seems to relate to DirectX.

    Code:
    2012-01-01 20:47:36.247380 [Debug][ViewModeSwitcher(32)]: Error in the application.
    -2147024882 (E_OUTOFMEMORY)
       at Microsoft.DirectX.Direct3D.SurfaceLoader.SaveSurfaceToStreamInternal(ImageFileFormat destFormat, Surface srcSurface, PaletteEntry[]& sourcePalette, tagRECT* srcRectangle)
       at Microsoft.DirectX.Direct3D.SurfaceLoader.SaveToStream(ImageFileFormat destFormat, Surface srcSurface)
       at MediaPortal.FrameGrabber.GetCurrentImage()

    Sounds like GPU did run out of memory when ViewModeSwitcher is grapping the video frame to be analyzed(?).

    It could be that My TV series manages to trigger a bug in MP when the GPU memory will be exhausted (huge amount of thumbnails could be loaded to fill up the GPU RAM).
     

    dir

    MP Donator
  • Premium Supporter
  • August 30, 2006
    408
    36
    Home Country
    Afghanistan Afghanistan
    Latest error with most plugins disabled doesn't directly point to My TVSeries - it's a Trakt error so I've logged a call over there. The error log file is very short - essentially just the following stack trace. I've posted the complete logs in the other thread.

    Code:
    2012-01-06 09:56:51.970207 [ERROR][TVSeries Sync(71)]: MediaPortal: Unhandled exception occured
    2012-01-06 09:56:51.974207 [ERROR][TVSeries Sync(71)]: Exception   :System.NullReferenceException: Object reference not set to an instance of an object.
       at TraktPlugin.TraktAPI.TraktAPI.GetUnSeenEpisodesForUser(String user)
       at TraktPlugin.TraktHandlers.TVSeries.SyncLibrary()
       at TraktPlugin.TraktHandlers.TVSeries.<OnImportCompleted>b__34()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    2012-01-06 09:56:51.976207 [ERROR][TVSeries Sync(71)]: Exception   :Object reference not set to an instance of an object.
    2012-01-06 09:56:51.978208 [ERROR][TVSeries Sync(71)]:   site      :System.Collections.Generic.IEnumerable`1[TraktPlugin.TraktAPI.DataStructures.TraktLibraryShow] GetUnSeenEpisodesForUser(System.String)
    2012-01-06 09:56:51.980208 [ERROR][TVSeries Sync(71)]:   source    :TraktPlugin
    2012-01-06 09:56:51.982208 [ERROR][TVSeries Sync(71)]:   stacktrace:   at TraktPlugin.TraktAPI.TraktAPI.GetUnSeenEpisodesForUser(String user)
       at TraktPlugin.TraktHandlers.TVSeries.SyncLibrary()
       at TraktPlugin.TraktHandlers.TVSeries.<OnImportCompleted>b__34()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

    I've now sisabled that plugin and will run MP again and leave it for a day or two.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,760
    7,224
    Sydney
    Home Country
    Australia Australia
    Latest error with most plugins disabled doesn't directly point to My TVSeries - it's a Trakt error so I've logged a call over there. The error log file is very short - essentially just the following stack trace. I've posted the complete logs in the other thread.

    [COLLAPSE]
    Code:
    2012-01-06 09:56:51.970207 [ERROR][TVSeries Sync(71)]: MediaPortal: Unhandled exception occured
    2012-01-06 09:56:51.974207 [ERROR][TVSeries Sync(71)]: Exception   :System.NullReferenceException: Object reference not set to an instance of an object.
       at TraktPlugin.TraktAPI.TraktAPI.GetUnSeenEpisodesForUser(String user)
       at TraktPlugin.TraktHandlers.TVSeries.SyncLibrary()
       at TraktPlugin.TraktHandlers.TVSeries.<OnImportCompleted>b__34()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    2012-01-06 09:56:51.976207 [ERROR][TVSeries Sync(71)]: Exception   :Object reference not set to an instance of an object.
    2012-01-06 09:56:51.978208 [ERROR][TVSeries Sync(71)]:   site      :System.Collections.Generic.IEnumerable`1[TraktPlugin.TraktAPI.DataStructures.TraktLibraryShow] GetUnSeenEpisodesForUser(System.String)
    2012-01-06 09:56:51.980208 [ERROR][TVSeries Sync(71)]:   source    :TraktPlugin
    2012-01-06 09:56:51.982208 [ERROR][TVSeries Sync(71)]:   stacktrace:   at TraktPlugin.TraktAPI.TraktAPI.GetUnSeenEpisodesForUser(String user)
       at TraktPlugin.TraktHandlers.TVSeries.SyncLibrary()
       at TraktPlugin.TraktHandlers.TVSeries.<OnImportCompleted>b__34()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    [/COLLAPSE]

    I've now sisabled that plugin and will run MP again and leave it for a day or two.
    This issue is fixed, see trakt thread for test dll. Its the same issue Rochess reported to me 3 days ago and occurs after tvseries finishes importing and trakt servers were unavailable for some reason. Nothing serious but error is now handled and sync aborts in that case.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,760
    7,224
    Sydney
    Home Country
    Australia Australia
    Your original error 'System.OutOfMemoryException', was coming from tvseries as well but was triggered by the latestmediahandler plugin. I noticed you use StreamedMP, most recents for tvseries do not need to be enabled in LatestMediaHandler for that skin...you are just giving your machine more work to do which is probably undesirable given the size of your collection.

    I suggest if you keep LatestMediaHandler enabled and ONLY use StreamedMP, then enter LatestMediaHandler plugin configuration and disable TVSeries from there.
     

    dir

    MP Donator
  • Premium Supporter
  • August 30, 2006
    408
    36
    Home Country
    Afghanistan Afghanistan
    This issue is fixed, see trakt thread for test dll. Its the same issue Rochess reported to me 3 days ago and occurs after tvseries finishes importing and trakt servers were unavailable for some reason. Nothing serious but error is now handled and sync aborts in that case.

    Thanks for that. I can't find it anywhere though - searched, used advanced search, checked the trakt forum, checked the MyTVSeries forrum, checked for all theads that Rochess has contributed to in the last 2 weeks. Can you point to it?

    Your original error 'System.OutOfMemoryException', was coming from tvseries as well but was triggered by the latestmediahandler plugin. I noticed you use StreamedMP, most recents for tvseries do not need to be enabled in LatestMediaHandler for that skin...you are just giving your machine more work to do which is probably undesirable given the size of your collection.

    I suggest if you keep LatestMediaHandler enabled and ONLY use StreamedMP, then enter LatestMediaHandler plugin configuration and disable TVSeries from there.

    Ok, have disabled TVSeries within LMH and re-enabled both LMH and FanArtHandler. (Haven't installed the updated trakt.dll yet)
    [update 10/1: Been running 3+ days with no errors. Will now copy across the updated Trakt.dll file and re-enable Trakt and run for a few days. ]
     

    Users who are viewing this thread

    Top Bottom