JimiIT92 / UniverseGuard2

An easy to use world protection plugin for Sponge
https://ore.spongepowered.org/Francesco_Jimi/Universe-Guard
GNU General Public License v3.0
19 stars 3 forks source link

Could not pass the event MoveEntityEvent$Position$Impl to an Event Listener #178

Open benllben opened 3 years ago

benllben commented 3 years ago

Hello, Ever since updating to the new version available, this issue seems to appear a few hours after restart and usually continues for the remainder of the day. It spams the console multiple times per seconds, sometimes resulting in lag, but also creating so many log files per day, and causing the Debug log files to expire after half a day.

This is making it really difficult to diagnose any other issues when having to sift through 120mb worth of text files per day.

[01:21:56] [Server thread/WARN] [Sponge]: / Could not pass MoveEntityEvent$Position$Impl /

[01:21:56] [Server thread/WARN] [Sponge]: / Could not pass the event MoveEntityEvent$Position$Impl to an Event Listener! / [01:21:56] [Server thread/WARN] [Sponge]: / / [01:21:56] [Server thread/WARN] [Sponge]: / Since the event can be modified during the event's listener, / [01:21:56] [Server thread/WARN] [Sponge]: / there could be adverse side effects of the exception occurring / [01:21:56] [Server thread/WARN] [Sponge]: / such that duplications or other game breaking issues could exist. / [01:21:56] [Server thread/WARN] [Sponge]: / / [01:21:56] [Server thread/WARN] [Sponge]: / Due to the nature of the exception, this is not likely an exception / [01:21:56] [Server thread/WARN] [Sponge]: / that is covered by SpongeForge or Forge itself, and therefore should / [01:21:56] [Server thread/WARN] [Sponge]: / be reported to the mod/plugin author first prior to reporting to / [01:21:56] [Server thread/WARN] [Sponge]: / Sponge or Forge. / [01:21:56] [Server thread/WARN] [Sponge]: / / [01:21:56] [Server thread/WARN] [Sponge]: / Owning Mod/Plugin: universeguard / [01:21:56] [Server thread/WARN] [Sponge]: / Exception: / [01:21:56] [Server thread/WARN] [Sponge]: / java.lang.ClassCastException: null /

JimiIT92 commented 3 years ago

That's weird, from the error it looks like is trying to cast something to null... Which mods were used on the server and have you noticed some steps that make this error pops up?

benllben commented 3 years ago

I have not been able to notice any particular steps to cause it. This was not an issue on previous versions of Universe Gaurd 2. The main mods are SpongeForge with Pixelmon and BiomesOplenty.

JimiIT92 commented 3 years ago

Now that you mentioned these mods, it could be something related to this issue https://github.com/JimiIT92/UniverseGuard2/issues/166. Basically the plugin tries to read some properties from the block/item/entity to do some checks. The problem is that when doing this check, Sponge actually checks for other properties as weel on that object for some reason, and if the properties it expects are not found it throws these errors... For instance for a leaf block it expects that the block has the "decayable" property, but if that block doesn't have that property, despite the fact that the plugin doesn't check that, it will still throwing an error. I already opened an issue at the Sponge framework itself, still waiting for a reply that at this point I'm not sure it will ever arrive. I might fork their repo to figure out what is going on and propose a PR

benllben commented 3 years ago

Just wondering if there could be any work around to stop the spam from going into the console logs. Currently, the Log files sit between 5-10gb per day. I cannot even open a 1gb text file so am struggling looking into other issues as the logs are unusable.

benllben commented 3 years ago

Logs2UniverseGuard.txt LogUniverseGuard.txt

Thankfully I have managed to open up one of the smaller 4gb log files with Sublime. I have included some examples and some other errors, some of them actually give you a stacktrace.

It seems to me the issue is mostly occurring when you warp, go home or spawn. Generally, the error will then occur for a second or so and spam over 50 errors in that time, though for some reason it appears this spamming of the same error can go on for minutes, sometimes 20+ minutes and other times it appears like it is hours on end.

Interestingly, they all seem to be a class cast exception, regardless of which event is firing the error.