[MP1-4578] Crashes after standby. (1 Viewer)

killer8

Portal Pro
July 29, 2012
378
186
Home Country
Netherlands Netherlands
I will disable the whole plugin and see if this makes a difference.
If you want to do proper testing to figure out the cause, you should let your system run with WatchDog option #1 for a couple of days/resumes. That way all plugins are disabled and the default skin is used.
I know it's a pita using the system then, but it's the only way to narrow down the possible causes.
As an alternative you could start WatchDog Option #1 before going to bed, so it goes to sleep without ANY plugin running + default skin.

Yes, will do, but i've noticed here, that the issue only occures after at least a few hours of sleep.
That's another problem in tackling down resume issues. I've had my share of freezes after resume and also noticed that it took a sleep cycle of at least 1/1.5 hours to trigger the issue (so overnights or during shutdown on work days). That makes it a lot harder to find the culprit, especially when the issue is 'random'.

Do you guys 'force' the system into standby with the remote/keyboard, or do you use the PowerScheduler plugin to let it go into standby?
I've setup PS to put my system into S3 after 15 minutes idle time, and my resumes are great every day.

Why? This way you can only confirm the problem is not with Mediaportal but it can still be every plugin or whatever has been custom. By just disabling specific parts and test without that you can confirm that's the part which breaks everything(incase it's one plugin, but that's what I expect for now).

For me it crashes 1/2 times out of 10 so quite easy to test just keep putting it into sleep and wake it up again.

I'm using 'force' standby by my Harmony remote. powerscheduler is set to 30 minutes but this is only used to sleep when for example a tv show recording has finished.
 

HomeY

Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    Because if we want to figure out what's causing the problems we need you to narrow it down (i can't reproduce, so i can't debug it).
    The best way to start doing that is by using only MP's core components and build-in plugins. If the problem occurs in that part, the team can have a look and try to figure it out. If the problem doesn't happen, then you know it's a plugin. Then it's simply enabling plugin by plugin and keep testing till you find the culprit.
    After that it's nothing more then contacting the plugin developer and ask for an explanation/fix, since we can't do anything about crashes happening because of plugins ;)
     

    killer8

    Portal Pro
    July 29, 2012
    378
    186
    Home Country
    Netherlands Netherlands
    I understand, seems to be the other way around to the way I would have debugged it. However if it was MP core I expected to have some logging since it will just throw a nullpointer or any other exception when it crashes.(I'm a java developer as job myself, so got some experience with debugging). But I've not seen anything regarding this problem in any of the logs. So I expect it's a plugin since not all plugins have logging as far as I can see. Or mediaportal must have some empty catch clauses where errors are not probably handled, so no error is logged?

    But incase it's really not happening anymore after I disable the weather plugin would this be oke to confirm this as the cause of the problem? I mean we've tried so many things now and this is the first time I'm even thinking it's maybe fixed.
     
    Last edited:

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    since it will just throw a nullpointer or any other exception when it crashes.
    If the try/catch is implemented ;)

    But incase it's really not happening anymore after I disable the weather plugin would this be oke to confirm this as the cause of the problem?
    Based on your testing efforts, that would indeed be possible, although i would have expected a lot more bug reports, since the plugin is used by a lot of users.
     

    augwave

    New Member
    April 6, 2008
    2
    0
    Home Country
    I dont use the World Weather plugin and still encounter this problem. I have both client/server and client PCs running 1.9.0 and both encounter this problem after resuming. I use Powerscheduler to put my PCs into standby. Both PCs use HDMI to TV.
     

    killer8

    Portal Pro
    July 29, 2012
    378
    186
    Home Country
    Netherlands Netherlands
    Hi,

    I've sleeped and woke up my pc for about a 100 times now and I've never had a crash like I experienced before. Normally the htpc has already crashed about 20 times by now. It seems it really helps to disable the world weather plugin. I also sleeped my computer for about 3 hours and the problem did not show up either.

    After all this testing I just had one crash where mediaportal closes to the desktop. I had watchdog running so here is the zip.

    It seems to be a totally different error:

    [2014-10-03 19:01:17,832] [Error ] [MPMain ] [ERROR] - GUIFont: Failed to load font TitanLight32 from cache. Trying to recreate it...
    [2014-10-03 19:01:18,059] [Log ] [MPMain ] [ERROR] - Exception: System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
    bij MediaPortal.GUI.Library.GUIFont.InitializeDeviceObjects()
    bij MediaPortal.GUI.Library.GUIFontManager.InitializeDeviceObjects()
    bij MediaPortal.D3D.RecreateSwapChain()
    bij MediaPortal.D3D.RecoverDevice()
    bij MediaPortalApp.OnDeviceLost(Object sender, EventArgs e)
    bij System.EventHandler.Invoke(Object sender, EventArgs e)
    bij Microsoft.DirectX.Direct3D.Device.raise_DeviceLost(Object i1, EventArgs i2)
    bij Microsoft.DirectX.Direct3D.Device.Reset(PresentParameters[] presentationParameters)
    bij MediaPortal.D3D.RecreateSwapChain()
    bij MediaPortalApp.OnGetMinMaxInfo(Message& msg)
    bij MediaPortalApp.WndProc(Message& msg) Message: De objectverwijzing is niet op een exemplaar van een object ingesteld. Site : Void InitializeDeviceObjects() Source : Core Stack Trace: bij MediaPortal.GUI.Library.GUIFont.InitializeDeviceObjects()
    bij MediaPortal.GUI.Library.GUIFontManager.InitializeDeviceObjects()
    bij MediaPortal.D3D.RecreateSwapChain()
    bij MediaPortal.D3D.RecoverDevice()
    bij MediaPortalApp.OnDeviceLost(Object sender, EventArgs e)
    bij System.EventHandler.Invoke(Object sender, EventArgs e)
    bij Microsoft.DirectX.Direct3D.Device.raise_DeviceLost(Object i1, EventArgs i2)
    bij Microsoft.DirectX.Direct3D.Device.Reset(PresentParameters[] presentationParameters)
    bij MediaPortal.D3D.RecreateSwapChain()
    bij MediaPortalApp.OnGetMinMaxInfo(Message& msg)
    bij MediaPortalApp.WndProc(Message& msg)
    [2014-10-03 19:01:18,703] [Log ] [MPMain ] [ERROR] - Exception: System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
    bij MediaPortal.GUI.Library.GUIFont.InitializeDeviceObjects()
    bij MediaPortal.GUI.Library.GUIFontManager.InitializeDeviceObjects()
    bij MediaPortal.D3D.RecreateSwapChain()
    bij MediaPortalApp.OnDisplayChange(Message& msg)
    bij MediaPortalApp.WndProc(Message& msg) Message: De objectverwijzing is niet op een exemplaar van een object ingesteld. Site : Void InitializeDeviceObjects() Source : Core Stack Trace: bij MediaPortal.GUI.Library.GUIFont.InitializeDeviceObjects()
    bij MediaPortal.GUI.Library.GUIFontManager.InitializeDeviceObjects()
    bij MediaPortal.D3D.RecreateSwapChain()
    bij MediaPortalApp.OnDisplayChange(Message& msg)
    bij MediaPortalApp.WndProc(Message& msg)
    [2014-10-03 19:01:19,372] [Log ] [MPMain ] [ERROR] - Exception: System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
    bij MediaPortal.GUI.Library.GUIFont.InitializeDeviceObjects()
    bij MediaPortal.GUI.Library.GUIFontManager.InitializeDeviceObjects()
    bij MediaPortal.D3D.RecreateSwapChain()
    bij MediaPortal.D3D.RecoverDevice()
    bij MediaPortalApp.OnProcess()
    bij MediaPortal.D3D.OnIdle(Object sender, EventArgs e)
    bij System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
    bij System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    bij System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    bij System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    bij System.Windows.Forms.Application.Run(Form mainForm)
    bij MediaPortalApp.Main(String[] args) Message: De objectverwijzing is niet op een exemplaar van een object ingesteld. Site : Void InitializeDeviceObjects() Source : Core Stack Trace: bij MediaPortal.GUI.Library.GUIFont.InitializeDeviceObjects()
    bij MediaPortal.GUI.Library.GUIFontManager.InitializeDeviceObjects()
    bij MediaPortal.D3D.RecreateSwapChain()
    bij MediaPortal.D3D.RecoverDevice()
    bij MediaPortalApp.OnProcess()
    bij MediaPortal.D3D.OnIdle(Object sender, EventArgs e)
    bij System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
    bij System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    bij System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    bij System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    bij System.Windows.Forms.Application.Run(Form mainForm)
    bij MediaPortalApp.Main(String[] args)
    [2014-10-03 19:01:19,374] [Error ] [MPMain ] [ERROR] - MediaPortal stopped due to an exception De objectverwijzing is niet op een exemplaar van een object ingesteld. Core bij MediaPortal.GUI.Library.GUIFont.InitializeDeviceObjects()
    bij MediaPortal.GUI.Library.GUIFontManager.InitializeDeviceObjects()
    bij MediaPortal.D3D.RecreateSwapChain()
    bij MediaPortal.D3D.RecoverDevice()
    bij MediaPortalApp.OnProcess()
    bij MediaPortal.D3D.OnIdle(Object sender, EventArgs e)
    bij System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
    bij System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    bij System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    bij System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    bij System.Windows.Forms.Application.Run(Form mainForm)
    bij MediaPortalApp.Main(String[] args)

    I will test this weekend without the weather plugin and contact the creator incase all crashes are really gone now.
     

    Micropolis

    Portal Pro
    July 22, 2009
    1,588
    1,796
    Bavaria
    Home Country
    Germany Germany
    Hello killer8,
    But incase it's really not happening anymore after I disable the weather plugin would this be oke to confirm this as the cause of the problem? I mean we've tried so many things now and this is the first time I'm even thinking it's maybe fixed.

    It's interesting to see your experience and your meaning, although other users stated that the same problem occurs without using the WorldWeather plugin.
    Today I investigate some hours again to find the root cause in your log files, in a MediaPortal 1.9.0 environment and in the source itself. Whatever I tried it's not reproducible on my development and productive system.

    Accordingly, I would hope that the problem would be re-tested under different constellations:
    • open the Settings section in the WorldWeather configuration, disable the option "Show notification dialogs", save and try to reproduce
    • open the Expert Settings section (see manual how you can do that) and increase the seconds under "After resume wait..." to a higher value than 0, save and try to reproduce
    • start MediaPortal, resume your HTPC and wake it up before the refresh timer of WorldWeather has expired (e.g. if you have configured 30min., wake it up after 10min.)
    • start MediaPortal, resume your HTPC and wake it up after the refresh timer of WorldWeather has expired (e.g. if you have configured 30min., wkae it up after 40min.)
    • try to reproduce the problem with the DefaultWide skin
    I'm waiting for your meaningful feedback,
    Micropolis
     
    Last edited:

    killer8

    Portal Pro
    July 29, 2012
    378
    186
    Home Country
    Netherlands Netherlands
    Hi Micropolis,

    I will test the conditions and will report back later. I'm still running without the plugin and had no crashes yet beside the font which could not be loaded(mentioned earlier with log). I also checked your forum topic about this plugin and saw some people who had similair problems in the past(2 years ago or something).[DOUBLEPOST=1412364021][/DOUBLEPOST]Results(I will update this post when i've done more tests):

    • open the Settings section in the WorldWeather configuration, disable the option "Show notification dialogs", save and try to reproduce: Doesn't make a difference, the applications still crashes(I only needed to sleep and wake up twice). Only difference is there is no dialog when mediaportal freezes. I will re-enable the dialogs with the next points.(zip: MediaPortalLogs_03_10_14__21_18)
    • open the Expert Settings section (see manual how you can do that) and increase the seconds under "After resume wait..." to a higher value than 0, save and try to reproduce Default on my setup is 5 seconds, this gives all the crashes. Changed it to 10 but this also makes mediaportal crash(MediaPortalLogs_03_10_14__21_36). Same crash with 15 seconds(straight after I got visual, not sure if this was even 15 seconds)(MediaPortalLogs_03_10_14__21_42). Will try 30. Got a crash, desktop was shown but mediaportal was crashed and still in the background. I had to kill the process anyway(MediaPortalLogs_03_10_14__21_55). Another crash like in the screenshot posted earlier(30 sec delay set), seems the crash wasn't even after 30 sec but straight after I got visual.(MediaPortalLogs_03_10_14__22_01). I will revert the value to 5 again like it was before for the next tests.
    • start MediaPortal, resume your HTPC and wake it up before the refresh timer of WorldWeather has expired (e.g. if you have configured 30min., wake it up after 10min.) I woke it up multiple times after a few minutes and it just crashed
    • start MediaPortal, resume your HTPC and wake it up after the refresh timer of WorldWeather has expired (e.g. if you have configured 30min., wkae it up after 40min.) Will test this later if still needed.
    • try to reproduce the problem with the DefaultWide skin All previous tests are done with Titan theme, will test this now. No crashes after 20/30 sleep/wakes. Seems the problem isn't with Defaultwide theme, just titan
    Conclusion: I guess the problem only occurs when using Mediaportal 1.9 with Worldweather plugin enabled and Titan as theme. Micropolis, do you have enough information to investigate the issue now? If you need anything else just ask. For now I will just disable the weatherplugin(I prefer titan over the Defaultwide theme)
     
    Last edited:

    Micropolis

    Portal Pro
    July 22, 2009
    1,588
    1,796
    Bavaria
    Home Country
    Germany Germany
    Hello killer8,
    thank you for your effort to identify the root problem.

    open the Settings section in the WorldWeather configuration, disable the option "Show notification dialogs", save and try to reproduce: Doesn't make a difference, the applications still crashes(I only needed to sleep and wake up twice). Only difference is there is no dialog when mediaportal freezes. I will re-enable the dialogs with the next points.(zip: MediaPortalLogs_03_10_14__21_18)

    This test gives me the certainty, that the window routing is coded correctly and the notification dialog does not messing up the window chains of MediaPortal.

    open the Expert Settings section (see manual how you can do that) and increase the seconds under "After resume wait..." to a higher value than 0, save and try to reproduce Default on my setup is 5 seconds, this gives all the crashes. Changed it to 10 but this also makes mediaportal crash(MediaPortalLogs_03_10_14__21_36). Same crash with 15 seconds(straight after I got visual, not sure if this was even 15 seconds)(MediaPortalLogs_03_10_14__21_42). Will try 30. Got a crash, desktop was shown but mediaportal was crashed and still in the background. I had to kill the process anyway(MediaPortalLogs_03_10_14__21_55). Another crash like in the screenshot posted earlier(30 sec delay set), seems the crash wasn't even after 30 sec but straight after I got visual.(MediaPortalLogs_03_10_14__22_01).

    All tests (excluding the latest one) shows the problem that MediaPortal tries to load the skin. Unfortunately each time the exception

    [2014-10-03 21:53:37,906] [Error ] [45 ] [ERROR] - LoadSkin: Running on wrong thread - StackTrace: ' bij System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
    bij System.Environment.get_StackTrace()
    bij MediaPortal.GUI.Library.GUIWindow.LoadSkin()
    bij MediaPortal.GUI.Library.GUIWindow.OnMessage(GUIMessage message)
    bij TvPlugin.TvFullScreen.OnMessage(GUIMessage message)
    bij MediaPortal.GUI.Library.GUIWindowManager.ActivateWindow(Int32 newWindowId, Boolean replaceWindow, Boolean skipHistory, String loadParameter, Boolean skipAnimation, Int32 focusControlId)
    bij MediaPortal.Player.g_Player.ShowFullScreenWindowTVDefault()
    bij MediaPortal.Player.g_Player.ShowFullScreenWindow()
    bij TvPlugin.TVHome.TvDelayThread()
    bij System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    bij System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    bij System.Threading.ThreadHelper.ThreadStart()'


    occurs. From my point of view, the crash after resuming is the result of this problem at startup (sequence error).

    In your last test (30sec at 22:01), a totally different exception is shown:

    [2014-10-03 22:00:41,897] [Error ] [MiniDisplayRender] [ERROR] - MiniDisplayPlugin.DisplayHandler.DisplayLines(): CAUGHT EXCEPTION De
    objectverwijzing is niet op een exemplaar van een object ingesteld.System.Object[]


    (I do not have Imon software on my machines, so I'm not be able to analyse this deeper.)

    start MediaPortal, resume your HTPC and wake it up before the refresh timer of WorldWeather has expired (e.g. if you have configured 30min., wake it up after 10min.) I woke it up multiple times after a few minutes and it just crashed
    start MediaPortal, resume your HTPC and wake it up after the refresh timer of WorldWeather has expired (e.g. if you have configured 30min., wkae it up after 40min.) Will test this later

    Hope, that this test gives me the certainty, that we do not have any race conditions in the refresh process.

    try to reproduce the problem with the DefaultWide skin ... No crashes after 10 sleep/wakes

    That was the expected result. I'm not the author of the Titan skin files but I suspect, that any part of the skin definition, visibility condition or things like this should be the root cause. Accordingly we must take a deeper look into the skin files itself. I suggest that from within the configuration of WorldWeather we switch on/off functionalities like "Images", "Astronomy" step by step to find the wrong part.

    Cheers, Micropolis
     

    killer8

    Portal Pro
    July 29, 2012
    378
    186
    Home Country
    Netherlands Netherlands
    For the first Skin error, Homey mentioned it's not a problem just to let the team know it's running on the wrong thread and he says this isn't the cause of the crash. (His comment is somewhere in this topic).

    The imon plugin always throws errors even when there are no crashes. The crashes also appear when Imon is disabled. Another thing is imon is always working correctly even when I got these errors in the logs.

    Maybe both errors can be fixed in a future mediaportal version but these are not the cause of the crashes which I experience when I enable World weather plugin.

    For the last point:
    • start MediaPortal, resume your HTPC and wake it up after the refresh timer of WorldWeather has expired (e.g. if you have configured 30min., wkae it up after 40min.) Will test this later if still needed.
    I just discussed this with my girlfriend and this morning mediaportal also crashed in the same way. So it doesn't make a difference if it's before 30 min(cache flush) or after. I don't have the support zip of this crash(most likely I've deleted it since I got to many of these zips today) however I don't think there is anything special in it since It never gives any errors about world weather when it crashes.
     

    Users who are viewing this thread

    Top Bottom