akrios-d / AkashaScanner

A Genshin Impact tool to export achievements, characters, artifacts, and weapons.
MIT License
14 stars 0 forks source link

`NullReferenceException` when trying to update weapons data. #15

Closed Zapdos333 closed 1 month ago

Zapdos333 commented 1 month ago

Describe the bug An Unhandled Exception (System.NullReferenceException) pops up when trying to update weapons data. This error occurs on both v0.5.1 and v0.5.0. Telling the application to continue (ignoring the error) results in it basically freezing.

To Reproduce In a fresh unpacked instance:

  1. Start the Akasha Scanner
  2. Go to Weapon Scanner
  3. Try to update the (at the time outdated) weapons data.
  4. The error popup (see in Screenshots) appears shortly afterwards.

Expected behavior When trying to update the weapons data the download should just complete after some time and the application continues to run normally afterwards.

Screenshots The error popup: image

Additional context The entire Exception Text:

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at AkashaScanner.Core.DataCollections.Repositories.WeaponsHoYoWikiRepository.Load() in C:\Users\ghfel\Documents\GitHub\AkashaScanner\AkashaScanner\Core\DataCollections\Repositories\WeaponsHoYoWikiRepository.cs:line 31
   at AkashaScanner.Core.DataCollections.BaseCollection`1.LoadRemote() in C:\Users\ghfel\Documents\GitHub\AkashaScanner\AkashaScanner\Core\DataCollections\BaseCollection.cs:line 72
   at AkashaScanner.Ui.Partials.DataUpdate.OnUpdate() in C:\Users\ghfel\Documents\GitHub\AkashaScanner\AkashaScanner\Ui\Partials\DataUpdate.razor:line 66
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
   at Microsoft.AspNetCore.Components.WebView.IpcSender.<>c__DisplayClass9_0.<NotifyUnhandledException>b__1()
   at Microsoft.AspNetCore.Components.WebView.WindowsForms.WindowsFormsDispatcher.InvokeAsync(Action workItem)
   at Microsoft.AspNetCore.Components.WebView.WindowsForms.WindowsFormsDispatcher.<>c.<.cctor>b__8_0(Exception exception)
akrios-d commented 1 month ago

Will take a look on it today

akrios-d commented 1 month ago

The problem is due to Mountain-Bracing Bolt and Peak Patrol Song not being able to parse atm due invalid response from the wiki

akrios-d commented 1 month ago

Will make a 0.5.2 avaliable today

akrios-d commented 1 month ago

@Zapdos333 if find any other bug let me know