Git Product home page Git Product logo

Comments (7)

BillyGalbreath avatar BillyGalbreath commented on August 11, 2024 1
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

from purpur.

BillyGalbreath avatar BillyGalbreath commented on August 11, 2024

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

from purpur.

mibby avatar mibby commented on August 11, 2024

@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.

from purpur.

BillyGalbreath avatar BillyGalbreath commented on August 11, 2024

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

from purpur.

mibby avatar mibby commented on August 11, 2024

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.

from purpur.

mibby avatar mibby commented on August 11, 2024

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.

from purpur.

BillyGalbreath avatar BillyGalbreath commented on August 11, 2024

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.

from purpur.

Related Issues (20)

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.