RaphiMC / ImmediatelyFast

Speed up immediate mode rendering in Minecraft
https://modrinth.com/mod/immediatelyfast
GNU Lesser General Public License v3.0
294 stars 21 forks source link

IF crash with Skyblocker #101

Closed Julienraptor01 closed 1 year ago

Julienraptor01 commented 1 year ago

Original issue : https://github.com/SkyblockerMod/Skyblocker/issues/215

Steps and Explanation by @AzureAaron

Yep I can reproduce it reliably with skyblocker :  Steps:

  1. Be on your private island & have Fairy Souls Helper disabled
  2. Enter the hub
  3. Enable the fairy souls helper
  4. IF instantly crashes the game

Explanation: the "optimized" buffer stuff from ImmediatlyFast can cause crashes when attempting to render things.  I encountered the crash java.lang.NullPointerException: Cannot invoke "java.nio.ByteBuffer.rewind()" because "this.field_1555" is null from something in my own mod, but based on #215 (and from my own investigation) stuff in Skyblocker can trigger the crash as well.  It occurs because IF sets the buffer inside of the BufferBuilder to null sometimes (which can never happen in vanilla), so when the buffer is attempted to be rewound it triggers the NullPointerException.  Log: latest.log

RaphiMC commented 1 year ago

This build should fix it. Please confirm as I didn't test it: https://upload.raphimc.net/file/gqDmMBBUVZIxWMxE/1hbBFVZwS4LqFi6u/ImmediatelyFast-1.1.27-SNAPSHOT%2B1.20.1.jar

Julienraptor01 commented 1 year ago

image version does indeed fix