RoChess / IMDbPlus

IMDb+ scraper for MediaPortal's MovingPictures plugin
4 stars 6 forks source link

First real bug - SaveSettings on DeInit causes problem when shutting down MePo #17

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As reported by chemelli:

2011-10-14 14:05:44.500702 [ERROR][MPMain(1)]: MediaPortal stopped due to an 
exception Object reference not set to an instance of an object. IMDb+    at 
IMDb.XmlWriter.SetOptionsEntry(String name, String id, String value)
    at IMDb.PluginSettings.SaveSettings()
    at IMDb.IMDb.DeInit()
    at MediaPortal.GUI.Library.GUIWindowManager.<Clear>b__4(GUIWindow window)
    at MediaPortal.GUI.Library.GUIWindowManager.LockAndDoOnAllRegisteredWindows(Action`1 toDo)
    at MediaPortal.GUI.Library.GUIWindowManager.Clear()
    at MediaPortalApp.OnExit()
    at MediaPortalApp.Main(String[] args)

I know we currently do a load+save on init and a save at OnPageDestroy. But 
there is also the save at DeInit. Was that the one that got added to get around 
the bug of the options.xml file not getting created correctly on the first 
install?

Instead of doing it at DeInit, then perhaps a time-delayed SaveSettings can be 
used to solve the first-time install problem to give MediaPortal and 
MovingPictures time to init themselves.

Original issue reported on code.google.com by RoChess....@gmail.com on 14 Oct 2011 at 3:56

GoogleCodeExporter commented 8 years ago
I think this should be fixed now in r115. It's hard to know which setting 
caused a crash...but atleast this function shouldn't error out anymore.

Will need a PDB and Line No. if it happens again.

Original comment by damien.haynes@gmail.com on 15 Oct 2011 at 3:14