isXander / YetAnotherConfigLib

YetAnotherConfigLib (yacl) is just that. A builder-based configuration library for Minecraft.
GNU Lesser General Public License v3.0
96 stars 37 forks source link

Images in descriptions crash when looked at, plus weird effect on .webps #87

Closed mrbuilder1961 closed 1 year ago

mrbuilder1961 commented 1 year ago

info

version info: mc 1.19.4, yacl 3.0.4+1.19.4, loader 0.14.21, api 0.85.0+1.19.4, modmenu 6.2.3 windows 10, nvidia rtx 3060, i9-119000k chat patches 194.5.1 (dev/debug build)

(sorry if i forgot anything, im not super good memory w specific things)

desc

so in dev, the (.webp !!) images load and work fine, although they do have a weird distortion/artifact/effect thing going on with all of them, but a couple aren't really noticable. i checked in paint.net and they look fine, so it must be some weird rendering/GLFW/hardware issue, but that's as far as i would know. note: this did NOT happen with .jpeg images, so maybe it has to do w the compression or something, i remember seeing something in the discord about that being a problem earlier. idk tho, you're the expert.

however, the main issue is that in prod, even with only required mods for chat patches (fabric loader+api, modmenu, and yacl) it still crashes when hovering over any button w an image. this error also happened with .jpeg images, but i switched back to .webp s (because of this) and it persisted. here are some images, a video to show the effect better, and a log from both using jpg and webp. note that both logs have way more mods, not only the requirements, so there could also be incompatibilies.

media and logs

jpeg log and webp log (ignore the webp link saying they're jpg files, i forgot to change the log message)

clearly see the effect: https://github-production-user-asset-6210df.s3.amazonaws.com/66807297/252530488-ae656348-68de-4e52-b466-b3cd06dc53fe.mp4

weird shift chat: image vs actual shift chat image

weird chat drafting image vs actual chat drafting: image

mrbuilder1961 commented 1 year ago

lmk if i need to split these into two separate bug reports

mrbuilder1961 commented 1 year ago

any updates w this?

isXander commented 1 year ago

I don't really see any issue? All I can see is WebP compression.

mrbuilder1961 commented 1 year ago

like you cant reproduce it? i literally cannot use images because they crash the game, and they would be really beneficial to chat patches

mrbuilder1961 commented 1 year ago

ok i think i fixed it on my own, probably had to do with this hacky resource stream getter thing. it would have been a lot more convenient if i knew that you could just get the Resource from the Identifier and then get a stream there lol. anyways, maybe just put a warning somewhere not to use the ClassLoader route. other than this final thing below, the issue seems to have already been fixed, so thanks !

the only other thing is the logs get spammed with this message, although everything seems to load fine:

[00:06:12] [Render thread/INFO]: OpenGL debug message: id=1281, source=API, type=ERROR, severity=HIGH, message='GL_INVALID_VALUE error generated. Invalid texture format.'

image

isXander commented 1 year ago

ok i think i fixed it on my own, probably had to do with this hacky resource stream getter thing.

That is definitely not how you're supposed to load images. You pass your Identifier to OptionDescription.Builder#webpImage! That's it!

I am aware of the OpenGL error but not sure how to fix it, but is a non issue!