darklinkpower / PlayniteExtensionsCollection

Collection of extensions made for Playnite.
MIT License
307 stars 28 forks source link

[Filter Presets Quick Launcher] Interaction with HLTB addon causes crash-loop #528

Open FlyMandi opened 5 months ago

FlyMandi commented 5 months ago

Extension name

Filter Presets Quick Launcher

Bug Description

I was building out my quick launchers, when suddenly, after closing and opening, Playnite couldn't go for 2 seconds without crashing. consistently, immediately after opening. I could find nothing noted in the extension or Playnite logs. Uninstalling the extension fixes the crash. Deleting the exension data or the user.config file however, doesn't. No issues with any missing or weird icons. Re-ordering the presets inside of the quick launcher settings doesn't fix it, disabling all in both top and sidebar doesn't fix it. Deleting all icons doesn't fix it.

What briefly works: I deleted some of my presets, am now down to 43 and the extension worked as normal. That is, until I tried re-adding my quick launchers. At some point, it just starts the crash-loop again.

To Reproduce

I'm not sure how to reproduce this crash-loop. It's happened to me once before, but I have no idea how it fixed itself. High likelyhood that having tons (50+) of presets with icons will cause this crash-loop.

Logs

extensions.log playnite.log

Screenshots

No response

darklinkpower commented 5 months ago

Unfortunately nothing regarding a crash is in the logs. Can you share screenshots of the files you are deleting and where they are located? Also the extension doesn't use any user.config file so I'm confused about that one.

  1. Delete the extension.log and playnite.log log files to clear them
  2. Download this debug build and change the extension from zip to pext and then install it: FilterPresetsQuickLauncher_ef9df36c-24c2-418c-8468-eed95a09d950_1_7.zip
  3. Try to reproduce again and upload your logs after it crashes.
FlyMandi commented 5 months ago

Sorry, I mistook config.json for user.config. I was referring to the config.json file in Playnite\ExentionsData\ef9df36c-24c2-418c-8468-eed95a09d950: image

Now, I used the linked extension version and everything worked fine. Couldn't reproduce the crash. I added every icon and placement again, by hand. Then, I added like 20 more presets (now at 65+) and it didn't crash. That is, until I added one that was just a bunch of special characters. Naming a preset with these characters in it causes it to crash-loop. Re-naming it from safe mode and then restarting works as a fix for a single restart, then it crash loops until I clean install the extension (remove from safe mode, delete config.json and install again. If I just delete config.json without clean installing, it doesn't fix it.

logs after naming a preset test Q!($^&)$%_+(%_)(*,, 1

extensions.log playnite.log

99% sure it's the , that caused the issue, since that's the only character I remember using in my preset names. Maybe it's ., but I had a preset called "itch.io" for a long time without issues.

What's super interesting is that I backed up the ExentionsData\ef9df36c-24c2-418c-8468-eed95a09d950 folder after having successfully fixed the crashes, before adding test Q!($^&)$%_+(%_)(*,, 1 as a preset, but moving the files back into the extension data folder where they belong, overwriting config.json, causes the crash-loop to re-appear. There are currently no special characters in any of the preset names, just good letters and spaces. I'm also back to the working number, 43. Same state as before, but it crashes.

logs after fixing the preset names and no files in ExentionsData\ef9df36c-24c2-418c-8468-eed95a09d950, still crashing:

extensions.log playnite.log

Edit: I re-did what had fixed the issue before, by hand, not moving backups now, but it's still crashing. I am at a loss for ideas at this point. Sorry this issue is so enigmatic.

darklinkpower commented 5 months ago

I can't reproduce it even with that naming and according to the logs, all the procedures done by the extension are finishing correctly so if anything is happening is after that. The extension is not doing anything by the time the issue is happening.

Then, I added like 20 more presets (now at 65+) and it didn't crash.

  1. By this, do you mean you created the Filter Presets in Playnite itself or configured them to display in the sidebar or top bar in the extension?

  2. Have you tried disabling every extension and only leaving this one enabled?

  3. Are you adding images to the configured filter in the extension settings? If you are, can you try not adding any images and see if the issue still happens? It's possible that a corrupted image could cause an issue when Playnite reads it.

  4. After all that, can you then disable this extension so you don't have any enabled and try and see if it happens again by any chance?

FlyMandi commented 5 months ago
  1. By this, do you mean you created the Filter Presets in Playnite itself or configured them to display in the sidebar or top bar in the extension?

Just adding a filter preset by that name, even without adding it to top or sidebar, made it crash.

  1. Have you tried disabling every extension and only leaving this one enabled?

Yes, and this fixes the crash loop. I then tested every interaction with every single add-on, making sure to enable one at a time and closing and opening twice after the auto-restart (because the auto-restart never crashes, normal starts do). I don't know why and I don't know how, but enabling HowLongToBeat together with this add-on causes the loop. I can't get it to crash without the HLTB extension enabled. Every other addon at once plays nice.

These are my settings for the HLTB plugin, if they can be of any help: image

darklinkpower commented 5 months ago

Considering that, it seems the issue lies on the HLTB plugin, more so if you consider that the issue happens when this extension is not doing anything. Also just to be sure, have you tried disabling this extension and only having HTLB enabled to see if it happens? That extension in particular has a history of causing crashes, for example, for several people here: https://www.reddit.com/r/playnite/comments/1al0w35/the_howlongtobeat_plugin_has_been_updated_to/

FlyMandi commented 5 months ago

Also just to be sure, have you tried disabling this extension and only having HTLB enabled to see if it happens?

I have, version 3.2.1, and it causes absolutely no issues for me. No particular theme causes the crash-loop for me either, like the person saying the Helium Theme HLTB integration was the issue.

I then installed a previous version (3.1.2), like suggested by this person and this version plays nicely with Filter Presets. No crashes so far.