Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error executing task on Client - java.lang.IllegalArgumentException: Default value cannot be lower than minimum value! #13

Closed
mibby opened this issue Mar 24, 2020 · 7 comments

Comments

@mibby
Copy link

mibby commented Mar 24, 2020

Describe the bug
@BillyGalbreath Similar to this issue Tuinity/Tuinity#55 except the client seems to spam this separate error to the client, unique to connecting with Purpur.

[09:09:45] [Render thread/FATAL]: Error executing task on Client
java.lang.IllegalArgumentException: Default value cannot be lower than minimum value!
	at alx.<init>(SourceFile:21) ~[1.15.2.jar:?]
	at dnp.a(SourceFile:2167) ~[1.15.2.jar:?]
	at pf.a(SourceFile:70) ~[1.15.2.jar:?]
	at pf.a(SourceFile:15) ~[1.15.2.jar:?]
	at lv.a(SourceFile:21) ~[1.15.2.jar:?]
	at lv$$Lambda$2356/71536207.run(Unknown Source) ~[?:?]
	at ais.c(SourceFile:144) [1.15.2.jar:?]
	at aiw.c(SourceFile:23) [1.15.2.jar:?]
	at ais.w(SourceFile:118) [1.15.2.jar:?]
	at ais.bk(SourceFile:103) [1.15.2.jar:?]
	at dbn.d(SourceFile:956) [1.15.2.jar:?]
	at dbn.d(SourceFile:619) [1.15.2.jar:?]
	at net.minecraft.client.main.Main.main(SourceFile:204) [1.15.2.jar:?]

To Reproduce
Connect with a vanilla 1.15.2 client on Purpur dev 507 with Citizens2 dev 1852.

purpur.yml
https://paste.ubuntu.com/p/yYd9vk74JS/

tuinity.yml
https://paste.ubuntu.com/p/KzV4Y4j43j/

Plugins
[08:35:03 INFO]: Plugins (1): Citizens

Version
This server is running Purpur version git-Purpur-508 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)

Is bug present on Paper, Spigot, CraftBukkit, or Vanilla
No to all. Just Purpur as far as I can tell from testing.

@BillyGalbreath
Copy link
Contributor

BillyGalbreath commented Mar 27, 2020

This error is saying the client has received some attribute value that's lower the minimum allowed value.

I am unable to reproduce this with just Purpur (no plugins). Scratch that, I was able to reproduce with no plugins by summoning a bat

@mibby
Copy link
Author

mibby commented Mar 28, 2020

@BillyGalbreath Are you sure it isn't a conflict with a Purpur patch and Citizens (fake player entities)? Here is a self contained zipped test server you can use to easily reproduce the problem for testing and debugging.

--- Removed ---

Launch start-purpur.bat to run purpur dev 518.
Launch start-tuinity.bat to run tuinity dev 22 .
Launch start-paper.bat to run paper dev 146 .

Use a vanilla 1.15.2 client with Open output log when games start toggled on in the launcher settings. Only fatal log levels need to be enabled. Connect with localhost as the IP on the client. The errors should occur on login and also occur when flying away and back (triggering unload/reload of entities).

The only plugin is Citizens dev 1857.

This error only occurs on Purpur. It does not occur with Tuinity or Paper.

[00:55:50] [Render thread/FATAL]: Error executing task on Client
java.lang.IllegalArgumentException: Default value cannot be lower than minimum value!
	at alx.<init>(SourceFile:21) ~[1.15.2.jar:?]
	at dnp.a(SourceFile:2167) ~[1.15.2.jar:?]
	at pf.a(SourceFile:70) ~[1.15.2.jar:?]
	at pf.a(SourceFile:15) ~[1.15.2.jar:?]
	at lv.a(SourceFile:21) ~[1.15.2.jar:?]
	at lv$$Lambda$2351/1591433898.run(Unknown Source) ~[?:?]
	at ais.c(SourceFile:144) [1.15.2.jar:?]
	at aiw.c(SourceFile:23) [1.15.2.jar:?]
	at ais.w(SourceFile:118) [1.15.2.jar:?]
	at ais.bk(SourceFile:103) [1.15.2.jar:?]
	at dbn.d(SourceFile:956) [1.15.2.jar:?]
	at dbn.d(SourceFile:619) [1.15.2.jar:?]
	at net.minecraft.client.main.Main.main(SourceFile:204) [1.15.2.jar:?]

This error occurs on Tuinity and Purpur, caused by Tuinity's patches. It does not occur with Paper.

[00:55:48] [Render thread/FATAL]: Error executing task on Client
java.lang.NullPointerException: null
	at dnp.a(SourceFile:565) ~[1.15.2.jar:?]
	at mc.a(SourceFile:57) ~[1.15.2.jar:?]
	at mc.a(SourceFile:11) ~[1.15.2.jar:?]
	at lv.a(SourceFile:21) ~[1.15.2.jar:?]
	at lv$$Lambda$2351/1591433898.run(Unknown Source) ~[?:?]
	at ais.c(SourceFile:144) [1.15.2.jar:?]
	at aiw.c(SourceFile:23) [1.15.2.jar:?]
	at ais.w(SourceFile:118) [1.15.2.jar:?]
	at ais.bk(SourceFile:103) [1.15.2.jar:?]
	at dbn.d(SourceFile:956) [1.15.2.jar:?]
	at dbn.d(SourceFile:619) [1.15.2.jar:?]
	at net.minecraft.client.main.Main.main(SourceFile:204) [1.15.2.jar:?]

When testing with just Paper, no errors occur and client lag spikes when loading chunks are significantly less impactful.

@BillyGalbreath
Copy link
Contributor

BillyGalbreath commented Mar 28, 2020

java.lang.IllegalArgumentException: Default value cannot be lower than minimum value!

Ok, so i spent more time looking into this than I wanted to. In the end, this is actually a vanilla bug in the client.

This bit of code is called in the client when the server needs to update an attribute for an entity:

alr = dh.b(new alx(null, a2.a(), 0.0, Double.MIN_NORMAL, Double.MAX_VALUE));

Here is the constructor of the attribute

    public alx(alq a, String s, double d0, double d1, double d2) {
        super(a, b, d0);
        this.a = d1;
        this.maximum = d2;
        if (d1 > d2) {
            throw new IllegalArgumentException("Minimum value cannot be bigger than maximum value!");
        } else if (d0 < d1) {
            throw new IllegalArgumentException("Default value cannot be lower than minimum value!");
        } else if (d0 > d2) {
            throw new IllegalArgumentException("Default value cannot be bigger than maximum value!");
        }
    }

The middle check is the bit of code that's causing the error. The problem is 0.0 is evaluating to be smaller than Double.MIN_NORMAL so the condition is always true.

image

There is nothing I can do to fix this.

I was able to easily recreate the problem, even without Citizens, by simply summoning a bat into the game. Purpur sets the generic.flyingSpeed of the bat to 0.6, which is not a normal value for the bat so it sends this update attribute packet to the client. Sadly, the client has the above mentioned error in the code that is not fixable from the server's end.

Added this info to an existing Mojira ticket that I believe might be related: https://bugs.mojang.com/browse/MC-172801

@BillyGalbreath
Copy link
Contributor

As for the NPE

java.lang.NullPointerException: null

This is something to do with Tuinity's optimized tracker. The error goes away if you disable that in tuinity.yml

@mibby
Copy link
Author

mibby commented Mar 28, 2020

Is Purpur doing something to update or check attributes when entities are loaded into view of the client? Since it does not occur with Tuinity or Paper.

Edit: Would it be caused by this patch / commit? In which case, does the attribute need to be set if ridables is not used at all? 8888839 https://github.com/pl3xgaming/Purpur/blob/master/patches/server/0008-Ridables.patch

As for the NPE, I forwarded it to Tuinity a couple days ago but it's good to know that I can disable the optimized tracker in the meantime until it is fixed.

@mibby
Copy link
Author

mibby commented Mar 28, 2020

RE: NPE, are you sure the error goes away if you disable the optimized tracker? I have optimized-tracker: false set in all the worlds in the tuinity.yml but I still get the error. I'm able to trigger it by flying away from the NPCs and flying back -- forcing the NPCs to load into view again (but be invisible due to Tuinity's patch).

It seems unrelated to the optimized tracker setting but caused by the Tuinity patch.

@BillyGalbreath
Copy link
Contributor

RE: NPE, are you sure the error goes away if you disable the optimized tracker? I have optimized-tracker: false set in all the worlds in the tuinity.yml but I still get the error. I'm able to trigger it by flying away from the NPCs and flying back -- forcing the NPCs to load into view again (but be invisible due to Tuinity's patch).

It seems unrelated to the optimized tracker setting but caused by the Tuinity patch.

You'll have to take this to Tuinity as it is tracker related. Tuinity optimizes the entity tracker for performance, but Citizens also modifies the tracker for their own use as well. The two are known to conflict.

BillyGalbreath added a commit that referenced this issue Mar 14, 2021
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
8c74d3126 Updated Upstream (Bukkit) (#5359)
fd3c66a91 bug #5362 - correctly pass "render type" when registering a new scoreboard objective
39c487b37 Add per-command perms for paper command
cdbf2578c Add Item Rarity API (#5352)
d80e43647 [CI-SKIP] Removal from the MIT list (#5345)

Tuinity Changes:
aea6b8347 Merge dev/playerchunkloading
722c7ca8a Use hash table for maintaing changed block set
98ae59d85 Custom table implementation for blockstate state lookups
8b8704fb6 Oprimise map impl for tracked players
ea71d6ba4 Optimise snow & ice in chunk ticking
9871d4ce5 Remove chunk lookup & lambda allocation from counting mobs
5a4a35f3e Add patreon
7d93d9618 Refactor data management for region manager
c3035219f Change license from MIT to LGPLv3

Airplane Changes:
580f380b6 Updated Upstream (Tuinity)
82253fd36 Early return optimization for target finding
9572643bb Cache entityhuman display name
5df98254f Remove iterators from inventory contains
18d2be193 Merge pull request #14 from violetwtf/patch-1
f716d4c33 Merge pull request #13 from violetwtf/master
128cbe519 Reduce entity chunk ticking checks from 3 to 1
03ac0933b Skip copying unloading tile entities
97dd027b5 Smaller pool size for tracking
9e9f57be4 Only set up Flare if token is available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants