Asnivor / MedLaunch

A Windows (.NET) Front-End for the Mednafen Emulator
http://medlaunch.asnitech.co.uk/
Other
36 stars 6 forks source link

Support new gamesdb API #225

Open gibbdude opened 6 years ago

gibbdude commented 6 years ago

I'm using version 0.5.25.3 and Mednafen version 1.21.1. My OS is Windows 10 Home version 1803. My issue is as follows: whenever I manually select a game's title and try to fetch its data from online, the program will crash as soon as the scrape is finished. This is true whichever database I use. I only have two test cases, Policenauts and Panzer Dragoon for the Saturn. There is a slight possibility that my antivirus removed some files necessary for the operation in question, but I was pretty thorough in ensuring that that didn't happen. Thanks for reading, and keep up the great work with this GUI!

Here are the two entries in Exceptions.log that were generated:


**** Exception detail - 7/27/2018 9:54:12 PM - ****

HResult: -2146232000 HelpLink:
Message: Data at the root level is invalid. Line 1, position 1. Source: System.Xml StackTrace: at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.LoadXml(String xml) at MedLaunch.Classes.TheGamesDB.GDBNETGamesDB.GetGame(Int32 ID) at MedLaunch.Classes.TheGamesDB.GDBScraper.ScrapeGame(ScrapedGameObjectWeb o, ScraperOrder order, ProgressDialogController controller, ScraperMaster masterrecord, String message) at MedLaunch.Classes.Scraper.ScraperHandler.ScrapeGame(ProgressDialogController controller, String message) at MedLaunch.Classes.Scraper.ScraperHandler.ScrapeGame(ProgressDialogController controller) at MedLaunch.ListBoxChildWindow.<>cDisplayClass3_0.b0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at MedLaunch.ListBoxChildWindow.d3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b6_0(Object state) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)


**** Exception detail - 7/27/2018 9:54:12 PM - ****

HResult: -2146232000 HelpLink:
Message: Data at the root level is invalid. Line 1, position 1. Source: System.Xml StackTrace: at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.LoadXml(String xml) at MedLaunch.Classes.TheGamesDB.GDBNETGamesDB.GetGame(Int32 ID) at MedLaunch.Classes.TheGamesDB.GDBScraper.ScrapeGame(ScrapedGameObjectWeb o, ScraperOrder order, ProgressDialogController controller, ScraperMaster masterrecord, String message) at MedLaunch.Classes.Scraper.ScraperHandler.ScrapeGame(ProgressDialogController controller, String message) at MedLaunch.Classes.Scraper.ScraperHandler.ScrapeGame(ProgressDialogController controller) at MedLaunch.ListBoxChildWindow.<>cDisplayClass3_0.b0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at MedLaunch.ListBoxChildWindow.d3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b6_0(Object state) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at System.Windows.Application.Run(Window window) at System.Windows.Application.Run() at MedLaunch.App.Main()


These two are given every time.

Asnivor commented 6 years ago

It looks like thegamesdatabase have changed their API. I will have to look at this when I have time. But also the code should really gracefully handle this problem rather than crashing.

Thanks for the report!

goldug commented 5 years ago

Any update on this? For the record, it would be great if the api could be changed manually in the future, so that these problems don't happen.

AwesumIndustrys commented 4 years ago

I have the same problem, so here's a temporary workaround. Go to settings, click 'Scraping Options', set the primary scraper to be Moby Games and uncheck the 'When scraping attempt use the secondary scraper (the one not selected above) to 'fill in the blanks'. That should let you get metadata for some games until this bug gets fixed.