Amecs (Fabric)

Amecs (Fabric)

200k Downloads

GL Error log spam with keybinds for some mods.

Felix14-v2 opened this issue · 14 comments

commented

[Demo]
(Sorry for the video quality)

Examples of problematic mods:
Memory Usage Screen
NBT Tooltip

Amecs 1.3.4, Minecraft 1.17.1

latest.log

commented

Oh my, this really isn't looking good.

I'm going to see if I can make the reasons out and fix this.

commented

Yeah, this is definitely not good.
image

Can I help by providing additional necessary information?

commented

I tried NBT Tooltip together with Amecs and Nmuk (both from my fork) and I can not reproduce this.
And I do not think that I did anything in the render direction. So it should not even be a problem of current Amecs.
The information is very limited but my best guess where the problem comes from is Sodium

You should try to spot the mod which leads to this problem. Thats best done with using the half of your mods and run. If the problem occures you know the problematic mod must be in this half. If not it is in the other half. Continue doing this until you found the problematic mod

commented

This issue also occurs without Sodium.

I don't know what can go wrong... Here are all the mods that I tested with:
mods.zip
As you can see, log spam is still happens.

I think this might be useful:
options.txt

commented

I used these excat mods and I still can not reproduce this problem. During what stage of the game does this problem occur? World loading, Main menu, general gameplay?
It might have something to do with your game language.
I will look into that. Please try english (en_us) to test this

commented

I tried running with the same language then you did: ru_ru. But I still do not get these errors. Maybe it has something to do with your hardware or game overlays that you have active. Please disable all such overlays, remove all resource packs and let the game crash (holding F3 + C for 10 seconds while in game). Then send me the latest.log

commented

As I could see in the latest.log you are still having more mods than you should if you want to test whether Amecs causes problems with Memory Usage Screen or NBT Tooltip.
Please remove the following mods and try again:

AzerusTeam
Happy Birthday
TeslaCraft!
”лучшенное меню
commented
commented
AzerusTeam
Happy Birthday
TeslaCraft!
”лучшенное меню

These are resourcepacks, not mods, by the way. But even with a clean installation, the problem still persists. I can't even imagine what could be wrong.
I even tested the same mods in minecraft 1.16.5 and got the same result.

commented

Thanks for that detailed information. Now I have a good chance at finding the cause. I will let you know what I find (or not find)

commented

With the information given I was able to reproduce the problem. That was the most important part

commented

Heyho, a lot is going on here :)

I think the cause of the GL errors is that both of these mods (and possibly also a bunch of other ones) call to pretty thin wrappers around GL functions like here:

https://github.com/MORIMORI0317/MemoryUsageScreen/blob/18e5084a0d7956128a906d030eddd9806097f14e/src/main/java/net/morimori/mus/mixin/MinecraftMixin.java#L25

or here:

https://github.com/zabi94/NBTTooltip/blob/7c3e38adbf8d5b2e018202de6a6c50f37ddca3e2/src/main/java/zabi/minecraft/nbttooltip/NBTTooltip.java#L114

Since at least some of the codes that Amecs uses are non-standard (like the scrolling) this can blow up.
I'm not sure why the -1 is broken though.

The solution might be to mixin to InputConstants and InputUtil.
I don't really like that tho :/

commented

I also found the cause of the problem in MemoryUsageScreen and fixed it already (I made a pull request)
I am going to do that for NBTTooltip as well.

As @Siphalor mentioned we COULD mixin to InputUtil (yarn)/InputConstants (mojang) but we SHOULD NOT. Since this method is designed for keyboard keys ONLY. But these mods call it with any key that is bound to the binding (this would also have caused the same problem without Amecs since vanilla supports mouse buttons)

commented

The problem is fixed in MemoryUsageScreen with my prs merged.
I also made a pr for NBTTooltip but he does not want to merge it. There is nothing I can do more.
If you want the fixed NBTTooltip version you have to compile my forked repo youself:
https://github.com/Klotzi111/NBTTooltip