Litematica (Forge)

Litematica (Forge)

336k Downloads

OpenGL log spam error

initialcommit810 opened this issue · 17 comments

commented

Minecraft 1.19.2
Litematica 0.12.4 - litematica-fabric-1.19.2-0.12.4.jar
MaLiLib 0.13.0 - malilib-fabric-1.19.2-0.13.0.jar

In my Minecraft log it spams this error whenever I load a schematic:
[20:24:59] [Render thread/INFO]: OpenGL debug message: id=1282, source=API, type=ERROR, severity=HIGH, message='Error has been generated. GL error GL_INVALID_OPERATION in (null): (ID: 173538523) Generic error'
It then just keeps spamming this until the schematic is unloaded, then the game gets slower so I can't keep a schematic loaded for too long. I tried with my normal mods and I tried with just Litematica and MaLiLib and it spams with my normal mods and without them.

commented

I had the same problem. I always got this error when I used "Litematica configs > Hotkeys > cloneSelection". Just unload schematics in "Loaded schematics menu" and I didn't get the error anymore.

commented

@FOFOLA1 Do you also have an Intel GPU/integrated graphics?

commented

Yes, I have this: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz 2.80 GHz

commented

Which GPU and GPU driver version do you have?

Can you create a separate 1.18.2 test instance and see if this also happens there? And if it does, then also try in 1.17.1.

commented

I have an Intel UHD 630 with driver version 30.0.101.1404.
I tried 1.18.2 and 1.17.1 but it doesn't happen in either one. So it seems to be 1.19

Edit: I updated my GPU drivers but it still happens

commented

Having the same issue on Intel UHD 620

commented

Same issues happening on Intel HD 5500

commented

Can confirm this same issue on Intel UHD 600

commented

The same in Fabric 1.19.3 (Litematica 0.13.X). It happens when enabling enableSchematicBlocksRendering

commented

Having the same issue on Intel UHD 730

commented

Still same in Fabric 1.20.1 (Litematica 0.15.0). It seems that another mods related to rendering are causing this.

commented

It seems that another mods related to rendering are causing this.

Can you elaborate on that? Does this happen with just malilib + Litematica, no other mods? (Especially no Optifine.)

commented

As a temporary patch I've forked a mod and made it suppress this specific error: https://github.com/kikugie/suppress-OpenGL-1282 (1.19.4+, I haven't tested older versions).

This of course is not a complete replacement of a fix, but at least will keep logs cleaner.

commented

I can provide more info, as I've been having this issue occasionally for quite a while, but didn't pay much attention.
Here's the log: https://mclo.gs/TBD1W3j

I used dev env with a template mod (no code there) to force Minecraft to use my integrated GPU, as the error doesn't appear when using nvidia one.

Exact PC specs:

        Minecraft Version: 1.20.1
	Minecraft Version ID: 1.20.1
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 17.0.6, Eclipse Adoptium
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Eclipse Adoptium
	Memory: 1322704248 bytes (1261 MiB) / 3003121664 bytes (2864 MiB) up to 8527020032 bytes (8132 MiB)
	CPUs: 8
	Processor Vendor: GenuineIntel
	Processor Name: 11th Gen Intel(R) Core(TM) i5-11300H @ 3.10GHz
	Identifier: Intel64 Family 6 Model 140 Stepping 1
	Microarchitecture: Tiger Lake
	Frequency (GHz): 3.11
	Number of physical packages: 1
	Number of physical CPUs: 4
	Number of logical CPUs: 8
	Graphics card #0 name: NVIDIA GeForce RTX 3050 Ti Laptop GPU
	Graphics card #0 vendor: NVIDIA (0x10de)
	Graphics card #0 VRAM (MB): 4095.00
	Graphics card #0 deviceId: 0x25a0
	Graphics card #0 versionInfo: DriverVersion=31.0.15.2756
	Graphics card #1 name: Intel(R) Iris(R) Xe Graphics
	Graphics card #1 vendor: Intel Corporation (0x8086)
	Graphics card #1 VRAM (MB): 1024.00
	Graphics card #1 deviceId: 0x9a49
	Graphics card #1 versionInfo: DriverVersion=30.0.100.9805
	Memory slot #0 capacity (MB): 16384.00
	Memory slot #0 clockSpeed (GHz): 3.20
	Memory slot #0 type: DDR4
	Memory slot #1 capacity (MB): 16384.00
	Memory slot #1 clockSpeed (GHz): 3.20
	Memory slot #1 type: DDR4
	Virtual memory max (MB): 43767.12
	Virtual memory used (MB): 33331.50
	Swap memory total (MB): 11253.13
	Swap memory used (MB): 654.71
	JVM Flags: 0 total; 
commented

Can reproduce with only malilib and litematica and enableSchematicRendering is true

commented

This can be solved simply: make a mod and mixin GlDebug class, inject at @Inject(method="info",@at("HEAD"),cancellable=true), and cancel it(it.cancel()).

commented

I got some tips for those who met this issue while using optifine for shaders.

Here I got the nearly same error in minecraft 1.20.1. with optifabric + optifine (GTX1660S, -Xmx10000M, azul-zulu jdk17, optifine-hd-u-I5, fabric api 0.85). Well I don't wanna this can be really fixed, just make sure that it won't break my shader experience. I know it will be hard to make the Litematica mod compatible with optifine/shaders.

So I got a way to avoid bad influences(terrible effects? I'm not good at english XD). This will need you, whatever turn off your shader BEFORE or AFTER you turning PLACEMENT ON, please MAKE SURE TO TURN OFF PLACEMENT BEFORE YOU TURNING YOUR SHADER ON AGAIN

here I'll put images:

both PLACEMENT and SHADER are OFF:
image

turn on SHADER while PLACEMENT OFF: (here i'm using BSL)
image

then turn on PLACEMENT while SHADER keep working:
image

huh, then error come. now both water and ice surfaces (perhaps those included by water?) gone.
then turn shader off for Litematica PLACEMENT.
image
this guy still not working. but water is back! :D (forsure lol) only after re-switch the PLACEMENT toggle, will the placement re-render and show up.

okay what if I'm done my contribution and enjoy my work with shader ON?
turn OFF PLACEMENT, then turn ON SHADER:
image

HERE WE GO, THE ALL-RENDER-ENABLED SHADER IS BACK!
but anyway, if contributors of litematica can fix this, all of us who met this issue will appreciate it. good luck! :D

ugh, I will leave a sentence as Chinese version of my tips:

管求他的,先关投影再开光影,屁事没有。