Giter VIP home page Giter VIP logo

Comments (14)

d0sboots avatar d0sboots commented on September 26, 2024

Thanks for the report!

You mention that this happened on a modded server. Unless your client has the same set of enchanting-related mods as the server (and for lots of servers that don't publicly publish the mods they run, that's impossible), it can't calculate the same enchanting result that the server is going to get.

You should still be able to use the enchanting table (i.e. applying enchantments should still function correctly), let me know if it doesn't. But unfortunately using EnchantmentRevealer with this modded server (or any modded server that changes how enchanting works) will pop up this error; you can either live with it or disable the mod. :(

from enchantmentrevealer.

Somdudewillson avatar Somdudewillson commented on September 26, 2024

I know the exact set of mods used, this is a small community server.
The problem is/was Optifine.

from enchantmentrevealer.

Somdudewillson avatar Somdudewillson commented on September 26, 2024

The mod now works...slightly more tahn before, although not entirely. I can rarely get it to register an observation correctly (as far as I can tell), but, guessing from the logs, most of the time it appears to be associating its observation with air. This, of course, breaks it. Log output:

[CHAT] ERROR: Exhausted all possibilities. Please report this to [email protected], especially if the problem persists.
13:23:25.371
[CHAT] Technical details follow (please copy this whole chunk from the Minecraft log when reporting):
13:23:25.372
[CHAT] Observation(seed: 0x5C30, power: 10, enchants: [-1, -1, -1], levels: [0, 0, 0], item: 1xitem.book@0, now: 2021-01-01 13:22:18.018-0700
13:23:25.372
[CHAT] Observation(seed: 0x5C30, power: 10, enchants: ["Power I" (0x30 1), "Protection I" (0x0 1), "Projectile Protection IV" (0x4 4)], levels: [2, 6, 20], item: 0xtile.air@0, now: 2021-01-01 13:22:38.117-0700

Not sure if it's relevant, but it only does this part:

[CHAT] Observation(seed: 0x5C30, power: 10, enchants: [-1, -1, -1], levels: [0, 0, 0], item: 1xitem.book@0, now: 2021-01-01

the first time. Afterward, it just thinks everything is always air.

from enchantmentrevealer.

d0sboots avatar d0sboots commented on September 26, 2024

OK, this is definitely something different than what I initially thought. It looks like a failure to properly associate items with observations, which I haven't seen before... and for optifine to cause it is extra strange. (I test with and without optifine.)

Can you attach a full Minecraft log from a session where you play around with the table, assuming there's nothing sensitive in there (like chat between your buddies or something)? What you've posted gives me an idea of where to look, but it won't be enough on its own.

And just to double-check: the same set of client mods works properly if you start your own (temporary) server locally, and connect to it?

from enchantmentrevealer.

Somdudewillson avatar Somdudewillson commented on September 26, 2024

Oh, Optifine didn't cause this issue, this is what happens w/out Optifine or any other client-sided optimization mods.

Here's some logs from connecting to the server (FYI there's a lot of spam from another mod):
2021-01-01-1.log
2021-01-01-2.log
2021-01-01-3.log
2021-01-01-4.log
The same logs with that spam removed:
2021-01-01-1_trimmed.log
2021-01-01-2_trimmed.log
2021-01-01-3_trimmed.log
2021-01-01-4_trimmed.log

And a local server with the same mods eventually fails in a similar way, although it takes longer. Logs for that here:
latest-client-orig.log
latest-server-orig.log
And minus the other mod's spam:
latest-client-trimmed.log
latest-server-trim.log

from enchantmentrevealer.

d0sboots avatar d0sboots commented on September 26, 2024

Thanks for those, that's helpful. You don't need to worry about trimming the logs, I can filter them on my own (and sometimes even spammy logs are interesting, although admittedly not in this case).

That first log shows something even more disturbing: You used an enchanting table on your server (and got the error), then started a local game and got the same error, but internally it still had the same object from the previous game. That really should not happen - nothing should be left over from before.

from enchantmentrevealer.

d0sboots avatar d0sboots commented on September 26, 2024

One other note - due to the nature of this bug plus how the mod is designed to deal with this error case, when you get an "air bubble" like this it will basically linger until you either quit the server, or (based on evidence from that log) quit the game entirely. Obviously, that's not great. Normally a "possibilities exhausted" error will clear itself, but since having "enchanted air" will always fail with a single observation, it will continue to linger and never self-clear.

Observing air is a natural and normal part of how this mod works; what's causing problems is that it's seeing air associated with enchantments, which is obviously impossible. But the information on enchanting doesn't all come at the same time, or from the same source, so this must be a failure to properly correlate it.

from enchantmentrevealer.

d0sboots avatar d0sboots commented on September 26, 2024

OK, I think I'm going to need your help a bit more. Sorry I didn't ask for this up-front - it's been a while since I worked on this, so I was coming back up to speed on the debugging features I had built-in already. :|

If you go to your minecraft directory, and then in config/, there should already be an EnchantmentRevealer.cfg file. In there, change verboseDebug from "false" to "true". Then do enchanting stuff in a local world until it fails (like before), and send me that log. It should contain lines that look like this:

[EnchantmentWorker/INFO] [STDOUT]: [io.github.d0sboots.enchantmentrevealer.EnchantmentWorker:run:151]: Worker io.github.d0sboots.enchantmentrevealer.EnchantmentWorker@668dfc6a exiting

...as well as lots of other stuff that would normally be spammy, but should help me figure this out.

from enchantmentrevealer.

Somdudewillson avatar Somdudewillson commented on September 26, 2024

Here are the client/server logs (The server one's probably not useful, but I have no reason not to upload it):
latest-client.log
latest-server.log

And, in case it's helpful:
Gameplay Video

from enchantmentrevealer.

d0sboots avatar d0sboots commented on September 26, 2024

Thanks! That client log was exactly what I needed to get a solid theory for what's behind this, and hopefully I'll be able to reproduce it on my end now.

Are you playing on an older/less powerful computer? I ask because the issue seems to be caused by an unusually large lag between client-server actions, especially for a server you're running locally. But if your machine were very bogged down, that could potentially explain it.

from enchantmentrevealer.

Somdudewillson avatar Somdudewillson commented on September 26, 2024

My pc's actually decently powerful. The server I was playing on is pretty far away and so my ping can get pretty bad sometimes though. For the local server, the culprit is possibly allocating too much ram to the client and not leaving enough for the server-or it could be that logspam slowing things down.

from enchantmentrevealer.

d0sboots avatar d0sboots commented on September 26, 2024

I tried a fix, but then I was able to reproduce the issue (exactly once) in a local game shortly after startup, when the server was bogged down with chunk-loading. I've got some other ideas, but they're a bit more involved.

from enchantmentrevealer.

d0sboots avatar d0sboots commented on September 26, 2024

If you have access to 1.13.2, here's a WIP jar with my best shot at fixing the issue:

EnchantmentRevealer-v1.3.UNOFFICIAL-1.13.2-25.0.219.jar.zip

If you don't, hopefully I should have my 1.13.2 work wrapped up soon and have this backported to 1.12.2. (My dev branch was set up for upgrading the mod to 1.13.2, and I was mostly done with that when this bug came in.)

A new feature added is the ability to disable/re-enable the mod by clicking on the title-text in the GUI. This also resets the state, so if you run into a persistent error, you can try that to clear it. Also, I updated the way logging works, so if you test this and there's still issues, just grab the debug.log (which will probably be huge) and that should have everything... although I suspect I already know what the issue will be. But hopefully I fixed it this time! It's just hard to tell because I can't really reproduce it on my end.

from enchantmentrevealer.

d0sboots avatar d0sboots commented on September 26, 2024

OK, 1.12.2 backport complete:
EnchantmentRevealer-v1.4-1.12.2-2768.jar.zip

Note to the future: That 1.13.2 jar is broken, don't bother with it. But the features described above should work correctly here. I've done some decently extensive manual testing during heavy chunkloading, and seen server response lags sometimes as large as multiple seconds, but the new heuristic seems to be pretty solid. I'd appreciate it if you'd give it a try.

I'm going to continue backporting this to older versions (which may take some time; 1.8.9 in particular hasn't been updated since the beginning), and then release them all at once.

from enchantmentrevealer.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.