GeheimagentNr1 / SelectablePainting

Adds the Selectable Painting, with which the painting to be placed can be selected.
https://www.curseforge.com/minecraft/mc-mods/selectable-painting
Other
0 stars 1 forks source link

[Crash] Mousing over a painting in my inventory from a previous session #1

Closed faeldray closed 3 years ago

faeldray commented 3 years ago

Versions Minecraft Version: 1.16.5 Minecraft Forge Version: 36.1.61 Mod Version: 2.0.0

Log files Crash report: https://gist.github.com/faeldray/17ef4728f6cc8f2efe59b26e6a48011c

Describe the bug After loading a single player game where I had a selectable painting in my inventory, whenever I moused over the painting, the game would crash. The painting had been "configured" (AKA I had selected a particular painting during my previous session). The selected painting was a modded one if that matters.

To Reproduce Steps to reproduce the behaviour:

  1. Start a new SP game and get a selectable painting.
  2. Choose a painting.
  3. Exit and reload the game.
  4. Mouseover the painting.
  5. Client crashes.

Expected behaviour No crashes when mousing over the painting.

GeheimagentNr1 commented 3 years ago
Status:Fixed
Issue type:Critical Bug
Fix type:Bugfix
Fix version:2.0.1
Fix release date:05.08.2021

Issue confirmed for:

TODOs:

GeheimagentNr1 commented 3 years ago

Which mod added the modded paintings?

faeldray commented 3 years ago

I can't remember which painting I choose but I just did another test and I got the same crash with paintings from both Infernal Expansion and Macaw's Paintings.

I did notice that if the painting size I had chosen also had vanilla paintings of the same size, a vanilla painting would be selected when I loaded the game. But if the painting size only had modded paintings, that would cause it to crash instead.

faeldray commented 3 years ago

I was able to get the same crash with a much smaller mod list to reduce the chances of some weird interaction. I discovered that if I just had one mod that adds paintings (ie. either Infernal Expansion or Macaw's Paintings), when I loaded the game for the second time, the selectable painting would revert to a vanilla painting without issue. But if I had more than one mod that adds paintings (ie. both Infernal Expansion and Macaw's Paintings), that's when I would get the crash.

Crash report: https://gist.github.com/faeldray/9d722c43ec1a83078502851348d576b0

GeheimagentNr1 commented 3 years ago

I've implemented a fix. Please test, if this fix works for you. I will release this, if I get a positive response. SelectablePainting-1.16.5-2.0.1.zip

faeldray commented 3 years ago

Sorry it took me so long to test this. I just did though and no more crashes!

GeheimagentNr1 commented 3 years ago

Fixed with version 2.0.1