Lacro59 / playnite-backgroundchanger-plugin

This plugin can show many game background with many options. 
https://playnite.link
MIT License
13 stars 3 forks source link

System.NullReferenceException: Object reference not set to an instance of an object. #48

Open SpunkyAmbassador opened 4 months ago

SpunkyAmbassador commented 4 months ago

Describe the bug I am not able to save background images. Whenever I click on save, Object reference not set to an instance of an object error comes.

To Reproduce

  1. Go to any game
  2. Manage Background Images
  3. Select File
  4. I select 1 jpeg file
  5. Save
  6. BG Image doesn't get saved and playnite notifies about error.

Expected behavior The images should get saved.

Screenshots image The numbering corresponds with steps to reproduce the bug

image Error message showed by playnite

Extensions log

24-07 14:10:33.863|DEBUG|Extras#ThemeExtras:Pushed "Details View - SOA"
24-07 14:10:47.121|ERROR|BackgroundChanger#Common:Error on PART_BtOK_Click()|C:\Projects\C#\Lacro59\playnite-backgroundchanger-plugin\source\Views\ImagesManager.xaml.cs|0
System.NullReferenceException: Object reference not set to an instance of an object.
   at BackgroundChanger.Views.ImagesManager.PART_BtOK_Click(Object sender, RoutedEventArgs e) in C:\Projects\C#\Lacro59\playnite-backgroundchanger-plugin\source\Views\ImagesManager.xaml.cs:line 0

Others I also have other extensions installed like Extra Metadata Loader, ThemeExtras and Mythic Theme

I used this extension two weeks ago and everything was working fine but it is giving problems today.

Also I tried restarting playnite but the bug is still there

jbrown1597 commented 4 months ago

Reporting the same issue. Will check back if anything changes.

Appreciate you!

ciaron88 commented 2 months ago

Didi you find a fix for this. been working fine for months now but now im getting this same issue..........

restarted, removed and reintalled addon. nothing........

SpunkyAmbassador commented 2 months ago

Didi you find a fix for this.

I fresh installed the addon then set the ffmpeg file and webpinfo file both to a valid exe file and then it started working. image

SpunkyAmbassador commented 1 month ago

Well today out of nowhere it again started giving same error.

SpunkyAmbassador commented 1 month ago

I think I found what's causing the problem...

The error is happening when I am not having a default background of game and trying to add background directly from bg-changer plugin.

If I have selected a game background from game>edit>media>bg image section and then I add background from bg-changer plugin, the plugin works as expected.

I don't trust my explanation skills so here is video of same

https://github.com/user-attachments/assets/585d7d21-9397-401c-81e0-ddb5eadc97da

Hopefully this helps in solving the error.