optifine icon indicating copy to clipboard operation
optifine copied to clipboard

[Bug Report] Optifine crash

Open martijnpu opened this issue 1 year ago • 11 comments

Description of Issue

For a long time there were no issues, but since 2 days I can't play anymore with Optifine. Minecraft starts lagging (maximum of 6 fps) and after a few seconds it crashes. Updated all graphic drivers but the issue still persists.

Steps to Reproduce

  1. Login to a server (no issues)
  2. Go to a different gamemode (issues start)
  3. FPS drops to max. 10 fps, after some time (5-60 sec) the game crashes

OptiFine Version

OptiFine HD U I7 pre2

Installation Method

Standalone installer

Log Files/Crash Reports

Log file: https://pastebin.com/s65Mv1eF Crash report: https://pastebin.com/d6h1JeDu

F3 Debug Screenshot

image Screenshot taken 2s before a crash

Prior Testing

If you've installed standalone:

  • Does this happen in Vanilla without OptiFine? With Vanilla this doesn't happen

Additional Information

.

martijnpu avatar Feb 02 '24 16:02 martijnpu

Do you have a GPU? In the F3 screenshot you are using the integrated gpu. The log is saying that it's running out of memory, which would cause the low FPS and crash

KaiAF avatar Feb 03 '24 16:02 KaiAF

I do indeed have a Nvidia GPU. My thoughts were that is was running on the GPU already, but apparently it's not 🤔 Any idea how to enforce this setting?

But besides that, it's still strange that it's running out of memory. Minecraft was the only thing I had open

martijnpu avatar Feb 03 '24 16:02 martijnpu

If you have the Microsoft Store version of the Minecraft launcher then follow these instructions:

  1. Download and install a separate JDK like Adoptium: https://adoptium.net/temurin/archive/
  2. Open Settings -> System -> Display.
  3. Scroll to "Graphics/Graphics settings."
  4. Press Browse.
  5. Browse to C:\Program Files\Eclipse Adoptium\jdk-17.0.10.x-hotspot\bin\javaw.exe and hit add.
  6. Press Options and select High Performance.
  7. Open the Minecraft Launcher and go to the installations tab.
  8. Press the three dots on your installation and press edit.
  9. Press more options.
  10. Press browse under Java Executable.
  11. Browse to C:\Program Files\Eclipse Adoptium\jdk-17.0.10.x-hotspot\bin\javaw.exe and press open.
  12. Press save.

If you have the old Minecraft launcher then follow these instructions:

  1. Open Settings -> System -> Display
  2. Scroll to "Graphics/Graphics settings."
  3. Press Browse.
  4. Add Minecraft's Java under C:\Program Files (x86)\Minecraft Launcher\runtime\java-runtime-gamma\windows-x64\java-runtime-gamma\bin\javaw.exe
  5. Press Options and select "High Performance."

KaiAF avatar Feb 03 '24 16:02 KaiAF

Thanks for this information. I've done all steps 12 steps, and it looks like it now runs on my Nvidia GPU. The fps still drops, only change is that it didn't crash.

image

martijnpu avatar Feb 03 '24 17:02 martijnpu

Try disabling Smooth FPS (settings -> video settings -> performance.) Since you are on a laptop, you may have power saving mode enabled which would cause the low FPS. It usually can be disabled in the graphics driver panel and choosing which program should run in power saving mode. (Probably need to disable it for javaw.exe)

KaiAF avatar Feb 03 '24 18:02 KaiAF

Disabling smooth FPS doesn't change anything. In the Graphics driver program I've selected the javaw.exe also as high performance (same as in windows settings).

In addition to this I do think I found the root cause and am able to replicate it in a new void world:

  1. No issues in a void world
  2. Make a big WE selection (>1000 blocks)
  3. Run this command: //set blue_stained_glass,light_blue_stained_glass,white_stained_glass
  4. Game starts lagging/crashing image

martijnpu avatar Feb 03 '24 20:02 martijnpu

Try disabling connected textures. Having so much glass would probably make rendering slow

KaiAF avatar Feb 06 '24 22:02 KaiAF

Hi, sorry for the delayed response. Was not able to test this before. Disabling connected textures did not solve my issue. image

martijnpu avatar Feb 21 '24 19:02 martijnpu

Does it work with other blocks, not stained glass?

sp614x avatar Mar 05 '24 17:03 sp614x

Resetting video settings could help: Options -> Video Settings -> Other -> Reset Video Settings

sp614x avatar Mar 05 '24 17:03 sp614x

Does it work with other blocks, not stained glass?

With any other block it seems file, but as soon as there is a pattern with more multiple colors it's starts to lagg. The more different colored stained glass, the worst it is.

Resetting video settings could help: Options -> Video Settings -> Other -> Reset Video Settings

Resetting reduce the lagg a little bit, but it's still around 10fps

martijnpu avatar Mar 05 '24 18:03 martijnpu