sp614x / optifine

1.81k stars 418 forks source link

[BUG] Shaders remove texturepacks #6556

Closed Bittu5134 closed 2 years ago

Bittu5134 commented 2 years ago

Description of Issue

whenever I try to load a shader all my resource packs get unloaded

Steps to Reproduce

  1. Use the latest version on optifine for 1.8.9
  2. load a shader pack
  3. and all your resource packs get unloaded

OptiFine Version

OptiFine HD U M5

Installation Method

dropped the jar into the mods folder

Other Installed Mods

Autotip-3.0.1 [1.8-1.12.2] LabyMod_3.9.5_mc1.8.9 Scrollable Tooltips-1.3 (1.8.9)

Log Files/Crash Reports

https://paste.ee/p/iMSyj

F3 Debug Screenshot

2022-01-11_16 06 53

Prior Testing

Still happens

Additional Information

I am using multimc launcher I was using sildurs enhanced default shaders(happens with other shaders too) My PC specs Capture

Ari-RERA-43 commented 2 years ago

Does it happen without LabyMod?

Bittu5134 commented 2 years ago

Yes it does

Ari-RERA-43 commented 2 years ago

Are the resource packs still listed as active and you just can't see them or were they completely deactivated?

Bittu5134 commented 2 years ago

They were completely deactivate and if tried to reactivate they deactivate again

fayer3 commented 2 years ago

relevant part from the log


[16:05:51] [Client thread/INFO] [Config]: [OptiFine] *** Reloading custom textures ***
[16:05:51] [Client thread/INFO] [Config]: [OptiFine] CustomColors: Colormap mcpatcher/lightmap/world0.png
[16:05:51] [Client thread/INFO] [Config]: [OptiFine] CustomSky properties: mcpatcher/sky/world0/sky1.properties
[16:05:51] [Client thread/INFO] [Config]: [OptiFine] CustomSky properties: mcpatcher/sky/world0/sky2.properties
[16:05:51] [Client thread/INFO] [Config]: [OptiFine] CustomSky: Texture not found: minecraft:mcpatcher/sky/world0/sky2.png
[16:05:51] [Client thread/INFO] [Config]: [OptiFine] CustomSky properties: mcpatcher/sky/world0/sky3.properties
[16:05:52] [Client thread/INFO] [Config]: [OptiFine] CustomSky properties: mcpatcher/sky/world0/sky4.properties
[16:05:53] [Client thread/INFO] [net.labymod.support.util.CapturePrintStream]: Negative index in crash report handler (32/39)
[16:05:54] [Client thread/INFO]: Caught error stitching, removing all assigned resourcepacks
net.minecraft.util.ReportedException: Registering texture
    at net.minecraft.client.renderer.texture.TextureManager.func_110579_a(TextureManager.java:121) ~[bmj.class:?]
    at net.optifine.util.TextureUtils.getTexture(TextureUtils.java:288) ~[TextureUtils.class:?]
    at net.optifine.CustomSky.readCustomSkies(CustomSky.java:90) ~[CustomSky.class:?]
    at net.optifine.CustomSky.update(CustomSky.java:48) ~[CustomSky.class:?]
    at net.optifine.util.TextureUtils.resourcesReloaded(TextureUtils.java:316) ~[TextureUtils.class:?]
    at net.optifine.util.TextureUtils$1.func_110549_a(TextureUtils.java:362) ~[TextureUtils$1.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.func_110544_b(SimpleReloadableResourceManager.java:130) ~[bnn.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.func_110541_a(SimpleReloadableResourceManager.java:111) ~[bnn.class:?]
    at net.minecraft.client.Minecraft.func_110436_a(Minecraft.java:732) [ave.class:?]
    at net.minecraft.client.Minecraft$16.run(Minecraft.java:2553) [ave$16.class:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_301]
    at net.minecraft.client.Minecraft.func_152343_a(Minecraft.java:2964) [ave.class:?]
    at net.minecraft.client.Minecraft.func_152344_a(Minecraft.java:2976) [ave.class:?]
    at net.minecraft.client.Minecraft.func_175603_A(Minecraft.java:2549) [ave.class:?]
    at net.optifine.shaders.Shaders.loadShaderPack(Shaders.java:976) [Shaders.class:?]
    at net.optifine.shaders.Shaders.setShaderPack(Shaders.java:871) [Shaders.class:?]
    at net.optifine.shaders.gui.GuiSlotShaders.selectIndex(GuiSlotShaders.java:91) [GuiSlotShaders.class:?]
    at net.optifine.shaders.gui.GuiSlotShaders.func_148144_a(GuiSlotShaders.java:81) [GuiSlotShaders.class:?]
    at net.minecraft.client.gui.GuiSlot.func_178039_p(GuiSlot.java:323) [awi.class:?]
    at net.optifine.shaders.gui.GuiShaders.func_146274_d(GuiShaders.java:120) [GuiShaders.class:?]
    at net.minecraft.client.gui.GuiScreen.func_146269_k(GuiScreen.java:524) [axu.class:?]
    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1674) [ave.class:?]
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1024) [ave.class:?]
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:349) [ave.class:?]
    at net.minecraft.client.main.Main.main(SourceFile:124) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_301]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_301]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_301]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_301]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_301]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_301]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_301]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_301]
    at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210) [NewLaunch.jar:?]
    at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245) [NewLaunch.jar:?]
    at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
    at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]
Caused by: java.lang.OutOfMemoryError: Java heap space
    at net.optifine.shaders.ShadersTex.getIntArray(ShadersTex.java:71) ~[ShadersTex.class:?]
    at net.optifine.shaders.ShadersTex.loadSimpleTexture(ShadersTex.java:812) ~[ShadersTex.class:?]
    at net.minecraft.client.renderer.texture.SimpleTexture.func_110551_a(SimpleTexture.java:63) ~[bme.class:?]
    at net.minecraft.client.renderer.texture.TextureManager.func_110579_a(TextureManager.java:99) ~[bmj.class:?]
    at net.optifine.util.TextureUtils.getTexture(TextureUtils.java:288) ~[TextureUtils.class:?]
    at net.optifine.CustomSky.readCustomSkies(CustomSky.java:90) ~[CustomSky.class:?]
    at net.optifine.CustomSky.update(CustomSky.java:48) ~[CustomSky.class:?]
    at net.optifine.util.TextureUtils.resourcesReloaded(TextureUtils.java:316) ~[TextureUtils.class:?]
    at net.optifine.util.TextureUtils$1.func_110549_a(TextureUtils.java:362) ~[TextureUtils$1.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.func_110544_b(SimpleReloadableResourceManager.java:130) ~[bnn.class:?]
    at net.minecraft.client.resources.SimpleReloadableResourceManager.func_110541_a(SimpleReloadableResourceManager.java:111) ~[bnn.class:?]
    at net.minecraft.client.Minecraft.func_110436_a(Minecraft.java:732) ~[ave.class:?]
    at net.minecraft.client.Minecraft$16.run(Minecraft.java:2553) ~[ave$16.class:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_301]
    at net.minecraft.client.Minecraft.func_152343_a(Minecraft.java:2964) ~[ave.class:?]
    at net.minecraft.client.Minecraft.func_152344_a(Minecraft.java:2976) ~[ave.class:?]
    at net.minecraft.client.Minecraft.func_175603_A(Minecraft.java:2549) ~[ave.class:?]
    at net.optifine.shaders.Shaders.loadShaderPack(Shaders.java:976) ~[Shaders.class:?]
    at net.optifine.shaders.Shaders.setShaderPack(Shaders.java:871) ~[Shaders.class:?]
    at net.optifine.shaders.gui.GuiSlotShaders.selectIndex(GuiSlotShaders.java:91) ~[GuiSlotShaders.class:?]
    at net.optifine.shaders.gui.GuiSlotShaders.func_148144_a(GuiSlotShaders.java:81) ~[GuiSlotShaders.class:?]
    at net.minecraft.client.gui.GuiSlot.func_178039_p(GuiSlot.java:323) ~[awi.class:?]
    at net.optifine.shaders.gui.GuiShaders.func_146274_d(GuiShaders.java:120) ~[GuiShaders.class:?]
    at net.minecraft.client.gui.GuiScreen.func_146269_k(GuiScreen.java:524) ~[axu.class:?]
    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1674) ~[ave.class:?]
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1024) ~[ave.class:?]
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:349) ~[ave.class:?]
    at net.minecraft.client.main.Main.main(SourceFile:124) ~[Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_301]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_301]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_301]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_301]```
Bittu5134 commented 2 years ago

Ohh yes but what does this error mean??

fayer3 commented 2 years ago

looks like you are running out of memory when it tries to reload the textures

Bittu5134 commented 2 years ago

I can't put more than 1 gb

Bittu5134 commented 2 years ago

looks like you are running out of memory when it tries to reload the textures

how can I fix it?

Ari-RERA-43 commented 2 years ago

You can't fix it without allocating more ram (you said you can't allocate more than 1gb) or using a different shader pack with a smaller RAM footprint.

fayer3 commented 2 years ago

You could try disabling mipmaps, they need some ram, maybe it's enough.

Bittu5134 commented 2 years ago

ok i will test it

sp614x commented 2 years ago

Caused by: java.lang.OutOfMemoryError: Java heap space Can't be fixed by OptiFine.