Zulfen / ZulfBungee

A Skript addon which adds proxy integration.
Apache License 2.0
10 stars 2 forks source link

ZulfBungee bug : Server crashes #35

Open LeVraiTheGO opened 1 year ago

LeVraiTheGO commented 1 year ago

Describe the bug When a player executes a function where or tries to return the size of all bungee players on a specified server. It sometimes crashes the server. (eg: size of all bungee players on "skyblock") (error below).

When we execute that it either returns the correct value or crash.

To reproduce

  1. Install Skript, skript-gui, Zulfbungee and Protocollib.
  2. Place the script below in the scripts folder (plugins/Skript/scripts).
  3. Execute the function mainGUI(player) using skript effect commands or by doing /test.
  4. Try again multiple times (up to 10 times) and the server will crash.

Script:

function mainGUI(p: player):
    create a gui with virtual chest inventory with 3 rows named "Main Menu":
        set {_} to size of all bungee players on "skyblock"
        make gui slot 10 with player head with nbt nbt compound from "{SkullOwner:{Id:[I;162119669,710429448,-1690736789,-84268047],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzY5MTk2YjMzMGM2Yjg5NjJmMjNhZDU2MjdmYjZlY2NlNDcyZWFmNWM5ZDQ0Zjc5MWY2NzA5YzdkMGY0ZGVjZSJ9fX0=""}]}}}" named "&aSkyBlock &8[&2&lSEASON 5&8]" with lore "&8Persistent Game%nl%&7" and "&7SkyBlock is the most popular%nl%&7game on FruitSky. Play with%nl%&7friends (or solo!), build your%nl%&7private island, collect all the%nl%&7items and meet other players.%nl%&7" and "&7➥ &aClick to Connect%nl%&7%{_} ? 0% currently playing!":
            connect player to "skyblock"

        set {_} to size of all bungee players on "elytrapvp"
        make gui slot 13 with shiny elytra named "&aElytraPvP &8[&c&lMAINTENANCE!&8]" with lore "&8Persistent Game%nl%&7" and "&7Jump down and fly with%nl%&7elytras to instantly flight%nl%&7many other players. The%nl%&7most fast-placed combat%nl%&7on FruitSky. Upgrade your%nl%&7tools and gear and grind%nl%&7for mystic items.%nl%&7" and "&7➥ &cThis game is not available%nl%&7%{_} ? 0% currently playing!":
            connect player to "elytrapvp"

    open last gui to {_p}

command /test:
    trigger:
        mainGUI(player)

Expected behavior No crash, must open the gui and return the correct values of size of online players in the specified server.

Screenshots No screenshot but error in the message

Paper server information (in this order)

Proxy information (in this order)

Additional context Configs:

This chooses what communication method ZulfBungee uses.

pluginmessage requires no setup, but requires you to enter a connection name (see below).

socket requires more setup but allows for more flexible setups. (e.g. multiple proxy support in the future!)

Generally, if you don't know what this means, leave it as pluginmessage.

transport-type: "pluginmessage"

If your proxy cannot find the name of your server from its config, or if you want to define a custom one -

specify it here. This process is automatic if you are using sockets.

Make sure it matches the name that's defined in your proxy server software's config.

forced-connection-name: ""

This will toggle the display of detailed messages about what is going to the console.

When filing a bug report / checking for issues, this is extremely useful to know what exactly went wrong!

debug: false

- Socket Setup -

The IP of your proxy.

server-host: "hidden"

The IP this client will bind to.

This should usually be left as 0.0.0.0, or 127.0.0.1, but feel free to change this if you need to -

(i.e. you are on shared hosting / Pterodactyl)

client-host: "hidden"

The port which you defined in your proxy config.

server-port: 8000

The port which this client (this Spigot server) will bind to, so it can listen for the proxy.

client-port: 25572

If you don't mind what port it chooses to bind to (e.g. your proxy and client are both on the same machine)

you can set this to true.

choose-random-port: false


**Error**

12:27:41 ERROR: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-388 (MC: 1.18.2) --- 12:27:41 ERROR: The server has not responded for 10 seconds! Creating thread dump

12:27:41 ERROR: Server thread dump (Look for plugins here before reporting to Paper!): 12:27:41 ERROR: Ticking entity: minecraft:player, entity class: net.minecraft.server.level.EntityPlayer 12:27:41 ERROR: Entity status: removed: false, valid: true, alive: true, is passenger: false 12:27:41 ERROR: Entity UUID: 112fc60e-6659-48a7-838f-91c9d91bce70 12:27:41 ERROR: Position: world: 'hub' at location (-46.96045412684652, 73.0, 76.08852684114609)

12:27:41 ERROR: Entity AABB: AABB[-47.26045413876745, 73.0, 75.78852682922516] -> -46.66045411492559, 74.79999995231628, 76.38852685306702: Total packets processed on the main thread for all players: 357

12:27:41 ERROR: Current Thread: Server thread 12:27:41 ERROR: PID: 22 | Suspended: false | Native: false | State: BLOCKED

12:27:41 ERROR: Skript.jar//ch.njol.skript.SkriptEventHandler$PriorityListener$$Lambda$5591/0x00007fbf85055bc0.execute(Unknown Source)

12:27:41 ERROR: net.minecraft.network.protocol.PlayerConnectionUtils$$Lambda$6558/0x00007fbf85496810.run(Unknown Source)

12:27:41 ERROR: net.minecraft.server.MinecraftServer$$Lambda$4085/0x00007fbf84850b00.run(Unknown Source)

12:27:41 ERROR: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---

LeVraiTheGO commented 1 year ago

Also your example left on SkUnity works half of the time and network variables don't work image

EDIT: Even after downloading the latest version of zulfbungee, network variables don’t work

Zulfen commented 1 year ago

Hello! Currently working on fixing this. Will let you know when it's working.

Zulfen commented 1 year ago

This should be fixed in the latest pre-release.