Giter VIP home page Giter VIP logo

Comments (14)

BLuFeNiX avatar BLuFeNiX commented on September 27, 2024

Hello @zaphiredfox,

I have not tested this plugin with newer versions of Minecraft, nor newer versions of Java. I think most recently I tried it with Java 8. So, it's quite likely that something needs to be updated. I will try to take a look at it this week and see if I can put in a quick fix.

In the mean time, could you do a few tests for me?

  1. Stop the server, delete the waypoints.db file, and start the server again.
  2. Try running the server with Java 8. I am actually thrilled that Minecraft 1.17 will require Java 16, but 1.16.5 should still work with Java 8.

Depending on how that pans out, I'll have some clues to get started on this faster.

Thanks!

from teleportationrunes.

zaphiredfox avatar zaphiredfox commented on September 27, 2024

Thanks for responding. We've been crossing our fingers hoping for a favorable response.

We only moved to Java 16 and Paper 1.16.5 a few days ago, it was on Java 8 and Spigot 1.16.5 prior to that and I had tested the plugin on that version as well with the exact same errors (the warning on start is new though). I was contemplating attempting to fix the errors myself, even downloaded your source, but my programming experience with Java is very minimal still, I know a few languages but Java isn't one of them. I just completed your other test though, stopped the server, deleted the 'waypoints.db' file as requested, and tried again. No change, same errors so that didn't do anything.

If you can get this working, I'd be happy to send you a Ko-Fi donation as thanks!

from teleportationrunes.

BLuFeNiX avatar BLuFeNiX commented on September 27, 2024

@zaphiredfox Thanks for testing that. I haven't forgotten about this issue and will look at it as soon as I can.

from teleportationrunes.

BLuFeNiX avatar BLuFeNiX commented on September 27, 2024

@zaphiredfox I believe I have fixed the issue. Version 2.0.1 is now available, and I have tested it with Java 16. Please try it and let me know if it works for you!

from teleportationrunes.

zaphiredfox avatar zaphiredfox commented on September 27, 2024

@BLuFeNiX Thanks! Still getting the IllegalStateException error though...

[14:49:30 ERROR]: Could not pass event PlayerInteractEvent to TeleportationRunes v2.0.1
java.lang.IllegalStateException: Current state = RESET, new state = FLUSHED
        at java.nio.charset.CharsetDecoder.throwIllegalStateException(CharsetDecoder.java:996) ~[?:?]
        at java.nio.charset.CharsetDecoder.flush(CharsetDecoder.java:679) ~[?:?]
        at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:808) ~[?:?]
        at java.nio.charset.Charset.decode(Charset.java:811) ~[?:?]
        at org.sqlite.core.NativeDB.utf8ByteBufferToString(NativeDB.java:507) ~[patched_1.16.5.jar:git-Paper-777]
        at org.sqlite.core.NativeDB.column_name(NativeDB.java:239) ~[patched_1.16.5.jar:git-Paper-777]
        at org.sqlite.core.DB.column_names(DB.java:733) ~[patched_1.16.5.jar:git-Paper-777]
        at org.sqlite.jdbc3.JDBC3Statement.getResultSet(JDBC3Statement.java:131) ~[patched_1.16.5.jar:git-Paper-777]
        at org.sqlite.jdbc3.JDBC3Statement.executeQuery(JDBC3Statement.java:73) ~[patched_1.16.5.jar:git-Paper-777]
        at net.blufenix.common.SimpleDatabase.rawQuery(SimpleDatabase.java:108) ~[?:?]
        at net.blufenix.common.SimpleDatabase.query(SimpleDatabase.java:90) ~[?:?]
        at net.blufenix.teleportationrunes.WaypointDB.getWaypointFromLocation(WaypointDB.java:98) ~[?:?]
        at net.blufenix.teleportationrunes.Waypoint.fromLocation(Waypoint.java:46) ~[?:?]
        at net.blufenix.teleportationrunes.TeleportationRunes.handleScrollOfWarpAction(TeleportationRunes.java:164) ~[?:?]
        at net.blufenix.teleportationrunes.TeleportationRunes.onPlayerInteractEvent(TeleportationRunes.java:125) ~[?:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor42.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Paper-777]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Paper-777]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Paper-777]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[patched_1.16.5.jar:git-Paper-777]
        at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:549) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.PlayerInteractManager.a(PlayerInteractManager.java:499) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:1714) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.PacketPlayInUseItem.a(PacketPlayInUseItem.java:32) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.PacketPlayInUseItem.a(PacketPlayInUseItem.java:10) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:35) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1266) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1259) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1220) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1134) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-777]
        at java.lang.Thread.run(Thread.java:831) [?:?]

Also getting this one now...

[14:40:00 ERROR]: Could not pass event PlayerInteractEvent to TeleportationRunes v2.0.1
java.lang.NullPointerException: Cannot read field "loc" because the return value of "net.blufenix.teleportationrunes.WaypointDB.getWaypointFromSignature(net.blufenix.teleportationrunes.Signature)" is null
        at net.blufenix.teleportationrunes.Waypoint.fromLocation(Waypoint.java:52) ~[?:?]
        at net.blufenix.teleportationrunes.TeleportationRunes.handleScrollOfWarpAction(TeleportationRunes.java:164) ~[?:?]
        at net.blufenix.teleportationrunes.TeleportationRunes.onPlayerInteractEvent(TeleportationRunes.java:125) ~[?:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor42.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Paper-777]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Paper-777]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Paper-777]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[patched_1.16.5.jar:git-Paper-777]
        at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:549) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.PlayerInteractManager.a(PlayerInteractManager.java:499) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:1714) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.PacketPlayInUseItem.a(PacketPlayInUseItem.java:32) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.PacketPlayInUseItem.a(PacketPlayInUseItem.java:10) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:35) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1266) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1259) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1220) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1134) ~[patched_1.16.5.jar:git-Paper-777]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-777]
        at java.lang.Thread.run(Thread.java:831) [?:?]

from teleportationrunes.

BLuFeNiX avatar BLuFeNiX commented on September 27, 2024

@zaphiredfox I am unable to reproduce these issues. I have tested Paper 1.16.5 (build 779) and 1.17 (build 69), both using OpenJDK 16, on Arch Linux. In both cases, I can attune and use scrolls with no problem.

Try deleting waypoints.db again, and if that doesn't work then we'll need to do some more rigorous debugging. You can also try disabling all your other plugins to see if that fixes the issue, and then enable them one by one until the issue comes back. You also could send me a full backup of your minecraft server, and I can try to reproduce the issue on my end.

from teleportationrunes.

zaphiredfox avatar zaphiredfox commented on September 27, 2024

@BLuFeNiX No good. I removed ALL plugins and completely deleted the TeleportationRunes plugin folder as well so it could recreate it. In addition the the above errors, I also got a fatal error that crashed the server when trying to activate the waypoint.

Here's the first few lines from the console at startup... to give you a good idea of what I'm running...

System Info: Java 16 (OpenJDK 64-Bit Server VM 16+36-1) Host: FreeBSD 11.4-RELEASE (amd64)
Loading libraries, please wait...
[22:58:59 INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[22:59:00 INFO]: Reloading ResourceManager: Default, bukkit
[22:59:01 INFO]: Loaded 7 recipes
[22:59:03 INFO]: Starting minecraft server version 1.16.5
[22:59:03 INFO]: Loading properties
[22:59:03 INFO]: This server is running Paper version git-Paper-779 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
[22:59:03 INFO]: Debug logging is disabled
[22:59:03 INFO]: Server Ping Player Sample Count: 12
[22:59:03 INFO]: Using 6 threads for Netty based IO
[22:59:03 INFO]: Default game type: SURVIVAL
[22:59:03 INFO]: Generating keypair
[22:59:03 INFO]: Starting Minecraft server on *:25565
[22:59:03 INFO]: Using default channel type
[22:59:10 WARN]: Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!
[22:59:17 WARN]: Legacy plugin dynmap v3.1-457 does not specify an api-version.
[22:59:17 INFO]: [DragonDropElytra] Loading DragonDropElytra v1.13_1.0.4
[22:59:17 INFO]: [LuckPerms] Loading LuckPerms v5.3.3
[22:59:17 INFO]: [SpigotPing] Loading SpigotPing v2.6
[22:59:17 INFO]: [HaroTorch-V2] Loading HaroTorch-V2 v2.4.0
[22:59:17 INFO]: [MoreMobHeads] Loading MoreMobHeads v1.14_1.0.19
[22:59:17 INFO]: [TeleportationRunes] Loading TeleportationRunes v2.0.1
[22:59:17 INFO]: [dynmap] Loading dynmap v3.1-457

I've tried researching the error messages myself and the only thing I can find has something to do something not being thread safe. I'm sure you have a better idea than I though.

I'm willing to turn on any debugging that may help, send you a copy of our base server config (minus plugins, world, and player data), or even get you shell access if it comes to that. The server rarely has anyone on after 9pm my time (Alaska) and I'm usually up late so feel free to message me on Discord if you want to try some live troubleshooting.

from teleportationrunes.

BLuFeNiX avatar BLuFeNiX commented on September 27, 2024

@zaphiredfox Alright, you say it was still broken without any other plugins installed. So, let's make the smallest reproducible example possible. Can you create a new server from scratch on that same machine?

I'm sure you already know how to do this, but just to make sure we're on the same page:

  1. Create a new folder, and put only the papermc.jar in it.
  2. Run the papermc jar and let the world generate.
  3. Add the TeleportationRunes runes plugin and restart the server

This way we'll have no configuration changes, no other plugins, etc. If the error happens again, please upload the full server log and I'll take a look. If that doesn't shed any light, I'll send you a debug build and we'll try it again :)

from teleportationrunes.

zaphiredfox avatar zaphiredfox commented on September 27, 2024

Done. No change. Log attached. Full test folder zipped if you want me to upload that too (147MB).

latest.log

Interestingly, attempting to activate the waypoint does NOT generate an error... the first time it is attempted. The "waypoint activated" message displays in chat, however the matching teleporter doesn't seem to function nor did activating the waypoint consume the book. Attempting to activate again DOES generate an error and attempting to attune a scroll generates an error every time.

from teleportationrunes.

BLuFeNiX avatar BLuFeNiX commented on September 27, 2024

@zaphiredfox Alright, I'm installing FreeBSD 11.4 into a VM now to see if I can reproduce it on my end. I did find some really interesting related bugs in the PaperMC project, here:

PaperMC/Paper#5789
PaperMC/Paper#5790

TL;DR: Paper devs think it's a plugin bug. So, I'm going to do some digging and see if I can figure it out. Maybe I'll solve that other fellow's problem as well.

Edit: bug reproduces in my VM :)

from teleportationrunes.

BLuFeNiX avatar BLuFeNiX commented on September 27, 2024

@zaphiredfox

After several hours of debugging, I have come to the conclusion that this is a bug in the FreeBSD implementation of either the JVM, or the JDBC database driver itself. I simply cannot get SQLite to work (on FreeBSD 11.4 with Java 16; other configurations remain untested). I even tried including various versions of org.xerial:sqlite-jdbc in my plugin so as not to rely on whatever org.sqlite.JDBC implementation was available from the OS.

I was actually able to cause some fatal crashes of the entire JVM during my testing, and I will try to report those to the Java project maintainer once I gather enough information. The core issue appears to be that an SQLite query causes all the heap memory to be consumed.

After learning this, I swapped out the backend from SQLite to HSQLDB, and managed to get a working build running on FreeBSD. Since HSQLDB uses JDBC, it remains unclear exactly where the buggy code exists.

So, here's a pre-release build!
https://github.com/BLuFeNiX/TeleportationRunes/releases/tag/v2.0.2-freebsd-dev

Make sure to delete waypoints.db first. Also, you can add debug: true to the config.yml if you want/need to see more log output.

ex:

TeleportationRunes:
  enabled: true
  costFormula: (distance / 25)
  enableRotation: false
  debug: true

Good luck!

from teleportationrunes.

zaphiredfox avatar zaphiredfox commented on September 27, 2024

Hey, it works!!! Huzzah!!! No errors so far either. I'll do a more exhaustive test tomorrow evening, including breaking the pads and whatnot, but so far so good. Sender works, scrolls work. Well done! I'll close this issue after I've completed a bit more testing.

from teleportationrunes.

BLuFeNiX avatar BLuFeNiX commented on September 27, 2024

Fantastic! Thanks for testing it!

from teleportationrunes.

zaphiredfox avatar zaphiredfox commented on September 27, 2024

Alright, everything seems to be working solid. Been messing with it for a few hours now making and breaking pads, scrolls, etc and putting it all to use. All working good! I did find a few minor consistency bugs, but nothing game breaking, and I've put those into a new thread since they are unrelated to this one.

from teleportationrunes.

Related Issues (19)

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.