Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new gamesdb API #225

Open
gibbdude opened this issue Jul 28, 2018 · 3 comments
Open

Support new gamesdb API #225

gibbdude opened this issue Jul 28, 2018 · 3 comments
Assignees

Comments

@gibbdude
Copy link

gibbdude commented Jul 28, 2018

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.<>c__DisplayClass3_0.<btnSelect_Click>b__0()
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.<btnSelect_Click>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_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.<>c__DisplayClass3_0.<btnSelect_Click>b__0()
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.<btnSelect_Click>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_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
Copy link
Owner

Asnivor commented Jul 28, 2018

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!

@Asnivor Asnivor self-assigned this Dec 18, 2018
@Asnivor Asnivor changed the title Issue When Scraping Data from Online Database Support new gamesdb API Dec 18, 2018
@goldug
Copy link

goldug commented Aug 30, 2019

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants