AcmeProject/WildernessTp

Plugin completely breaks and locks up if used on SkyGrid world

Closed this issue · 19 comments

Title; It fails to find a safe location then completely locks up saying 7/6 and gets stuck finding a safe location instead of stopping when it can't, cannot be disabled by PlugMan and requires a server restart.
Try again, rinse, repeat. This is the only decent-looking random plugin, the others are either too buggy, slow or drop the player into the void. I have restarted many times, and the same thing happens, it refuses to work.

Also, even after uninstalling the 7/6 title message is permanently stuck on the top of my screen... How do I fix it so it's not stuck there forever?

Could you kindly provide your plugin version as well as your spigot/paper build?

But this seems like it may be related to #63 ?

Config too

Default config doesn't work. I also tried making a few edits and they also didn't work. https://pastebin.com/QpwW4v8s

[08:49:45 INFO]: This server is running Paper version git-Paper-348 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
[08:49:45 INFO]: Checking version, please wait...
[08:49:45 INFO]: Previous version: git-Paper-20 (MC: 1.15)
[08:49:45 INFO]: You are 26 version(s) behind
[08:49:47 INFO]: Wild version 2.19-2db6004
[08:49:47 INFO]: Website: https://www.spigotmc.org/resources/wilderness-tp.22853/
[08:49:47 INFO]: Authors: LaxWasHere and RoboMWM

The plugin refuses to reload if a TP request is pending and since it gets stuck I have to restart for every test. It would be cool if there was a way to cancel the requests, as I wasn't able to find a way.

Removing cave air and not void air from the list seems to SOMETIMES let it work, but the problem is now it's ignoring the random worlds (which only has 'world' in it because I only want RTP to ever go there), it's now always to the Nether, no matter what!

It also always says 'No suitable locations found' even when it finds one.

ok now I'm confused.
Let's focus on one issue at a time.

If you're talking about it not finding a suitable location, then post with debug logs to #63

If it's the bossbar not being removed then let's focus on that.

Either way I'd like to see some debug logs because that'd would give me a hint of where it's locking up (be it for the bossbar, not finding a location, or both).

That was part of the main issue and happens with the main issue here, but yeah, I can split that to a different support entry if you want.
So, I did some testing with debug logs on to show you what happens on a failed teleport, and what happens on a successful teleport, as both are bugged. Also, I found out if I remove the Nether from the random pool it adds it back, and I hadn't redownloaded the config which is why I was confused. The Nether's default chance is 42, when I had the overworld at one, hence the issue. I simply just put the Nether at 0 instead and now the "always Nether" part is solved.

On the rare occasion I get a successful teleport, it does this:
Briefly says 13/12, claims to have failed to find a suitable location in chat, but then I am briefly teleported anyways.
Debug logs: https://pastebin.com/NShggHiG

Here's what happens on a failed teleport, when the plugin locks up:
13/12 attempts stuck on top, boss bar will not go away unless I get this plugin or another plugin to clear it. Player is not teleported, however the check does not end and WildTP is now stuck in the state where most commands are disabled because it's trying to find a location, and requires a restart to un-stuck it.
Debug log: https://pastebin.com/gfziA0cU

Note: I got these from using the 'debug' option in the config and looking at my console and latest.log output. If this is not what you wanted, please let me know!

I haven't been able to reproduce the nether world "being re-added," I wonder if this has to do with modifying the config while the server is running(?)

Anyways, idk if you're saying this is related to #63 or not, but since you didn't post there I'm going to assume it's not.

So for the first log, which btw, you can inline in the comments here:

[19:22:23 INFO]: [WildTP] Cooldown check requested for 390d0a39-5541-4e8e-8f07-115bb41684c4
[19:22:23 INFO]: [WildTP] Player has bypass perms
[19:22:23 INFO]: [WildTP] Player: [Founder] Roadhog360 entered a portal
[19:22:23 INFO]: [WildTP] Cooldown check requested for 390d0a39-5541-4e8e-8f07-115bb41684c4
[19:22:23 INFO]: [WildTP] Player has bypass perms
[19:22:23 INFO]: [WildTP] Wild teleport called for Roadhog360 for world world
[19:22:23 INFO]: [WildTP] Cooldown check requested for 390d0a39-5541-4e8e-8f07-115bb41684c4
[19:22:23 INFO]: [WildTP] Player has bypass perms
[19:22:24 INFO]: [WildTP] No suitable locations found
[19:22:32 INFO]: [SkyGrid] Initialising new SkyGridPopulator instance for world world (NORMAL)
[19:22:32 INFO]: [WildTP] am chekin
[19:22:32 INFO]: [WildTP] Location{world=CraftWorld{name=world},x=2516.0,y=124.0,z=768.0,pitch=0.0,yaw=0.0}
[19:22:32 INFO]: [WildTP] Calling preTeleportEvent
[19:22:32 INFO]: [WildTP] Called preWildTeleportEvent
[19:22:32 INFO]: [WildTP] preping 2 port 2 Location{world=CraftWorld{name=world},x=2516.0,y=125.0,z=768.0,pitch=0.0,yaw=0.0}
[19:22:32 INFO]: [WildTP] microwave stop
[19:22:32 INFO]: [WildTP] Teleporting Roadhog360Location{world=CraftWorld{name=world},x=2516.0,y=125.0,z=768.0,pitch=0.0,yaw=0.0}
[19:22:35 INFO]: [WildTP] Roadhog360 Teleported to Location{world=CraftWorld{name=world},x=2516.5,y=125.5,z=768.5,pitch=0.0,yaw=326.44003}

So you used a portal - and it seems that it called the teleport twice (the first one failed and the second one waited until the SkyGrid plugin generated chunks... which is interesting - I wonder if your results are similar if you use a normal vanilla world? And are you sure those are all the logs - I'd imagine it tries to check multiple locations and print those "unsuitable locations" but it didn't print any for that first one...?

The second one looks a lot more representative of what I'd expect to see...

[19:25:26] [Server thread/INFO]: [WildTP] Cooldown check requested for 390d0a39-5541-4e8e-8f07-115bb41684c4
[19:25:26] [Server thread/INFO]: [WildTP] Player has bypass perms
[19:25:26] [Server thread/INFO]: [WildTP] Player: [Founder] Roadhog360 entered a portal
[19:25:26] [Server thread/INFO]: [WildTP] Cooldown check requested for 390d0a39-5541-4e8e-8f07-115bb41684c4
[19:25:26] [Server thread/INFO]: [WildTP] Player has bypass perms
[19:25:26] [Server thread/INFO]: [WildTP] Wild teleport called for Roadhog360 for world world
[19:25:26] [Server thread/INFO]: [WildTP] Cooldown check requested for 390d0a39-5541-4e8e-8f07-115bb41684c4
[19:25:26] [Server thread/INFO]: [WildTP] Player has bypass perms
[19:25:26] [Server thread/INFO]: [WildTP] am chekin
[19:25:26] [Server thread/INFO]: [WildTP] Location{world=CraftWorld{name=world},x=-375.0,y=112.0,z=-120.0,pitch=0.0,yaw=0.0}
[19:25:26] [Server thread/INFO]: [WildTP] Location unsafe: Location{world=CraftWorld{name=world},x=-375.0,y=112.0,z=-120.0,pitch=0.0,yaw=0.0}
[19:25:26] [Server thread/INFO]: [WildTP] unsuitable location, trying again.
[19:25:27] [Server thread/INFO]: [WildTP] No suitable locations found
[19:25:41] [Server thread/INFO]: [WildTP] am chekin
[19:25:41] [Server thread/INFO]: [WildTP] Location{world=CraftWorld{name=world},x=-2164.0,y=-1.0,z=-2583.0,pitch=0.0,yaw=0.0}
[19:25:41] [Server thread/INFO]: [WildTP] Location unsafe: Location{world=CraftWorld{name=world},x=-2164.0,y=-1.0,z=-2583.0,pitch=0.0,yaw=0.0}
[19:25:41] [Server thread/INFO]: [WildTP] unsuitable location, trying again.
[19:26:02] [Server thread/INFO]: [WildTP] am chekin
[19:26:02] [Server thread/INFO]: [WildTP] Location{world=CraftWorld{name=world},x=-2127.0,y=-1.0,z=3731.0,pitch=0.0,yaw=0.0}
[19:26:02] [Server thread/INFO]: [WildTP] Location unsafe: Location{world=CraftWorld{name=world},x=-2127.0,y=-1.0,z=3731.0,pitch=0.0,yaw=0.0}
[19:26:02] [Server thread/INFO]: [WildTP] unsuitable location, trying again.
[19:26:02] [Server thread/INFO]: [WildTP] am chekin
[19:26:02] [Server thread/INFO]: [WildTP] Location{world=CraftWorld{name=world},x=632.0,y=-1.0,z=-1323.0,pitch=0.0,yaw=0.0}
[19:26:02] [Server thread/INFO]: [WildTP] Location unsafe: Location{world=CraftWorld{name=world},x=632.0,y=-1.0,z=-1323.0,pitch=0.0,yaw=0.0}
[19:26:02] [Server thread/INFO]: [WildTP] unsuitable location, trying again.
[19:26:03] [Server thread/INFO]: [WildTP] am chekin
[19:26:03] [Server thread/INFO]: [WildTP] Location{world=CraftWorld{name=world},x=1702.0,y=-1.0,z=-2352.0,pitch=0.0,yaw=0.0}
[19:26:03] [Server thread/INFO]: [WildTP] Location unsafe: Location{world=CraftWorld{name=world},x=1702.0,y=-1.0,z=-2352.0,pitch=0.0,yaw=0.0}
[19:26:03] [Server thread/INFO]: [WildTP] unsuitable location, trying again.
[19:26:03] [Server thread/INFO]: [WildTP] am chekin
[19:26:03] [Server thread/INFO]: [WildTP] Location{world=CraftWorld{name=world},x=3060.0,y=-1.0,z=-2211.0,pitch=0.0,yaw=0.0}
[19:26:03] [Server thread/INFO]: [WildTP] Location unsafe: Location{world=CraftWorld{name=world},x=3060.0,y=-1.0,z=-2211.0,pitch=0.0,yaw=0.0}
[19:26:03] [Server thread/INFO]: [WildTP] unsuitable location, trying again.
[19:26:03] [Server thread/INFO]: [WildTP] am chekin
[19:26:03] [Server thread/INFO]: [WildTP] Location{world=CraftWorld{name=world},x=1165.0,y=-1.0,z=2184.0,pitch=0.0,yaw=0.0}
[19:26:03] [Server thread/INFO]: [WildTP] Location unsafe: Location{world=CraftWorld{name=world},x=1165.0,y=-1.0,z=2184.0,pitch=0.0,yaw=0.0}
[19:26:03] [Server thread/INFO]: [WildTP] unsuitable location, trying again.
[19:26:04] [Server thread/INFO]: [WildTP] am chekin
[19:26:04] [Server thread/INFO]: [WildTP] Location{world=CraftWorld{name=world},x=1442.0,y=-1.0,z=4234.0,pitch=0.0,yaw=0.0}
[19:26:04] [Server thread/INFO]: [WildTP] Location unsafe: Location{world=CraftWorld{name=world},x=1442.0,y=-1.0,z=4234.0,pitch=0.0,yaw=0.0}
[19:26:04] [Server thread/INFO]: [WildTP] unsuitable location, trying again.
[19:26:04] [Server thread/INFO]: [WildTP] am chekin
[19:26:04] [Server thread/INFO]: [WildTP] Location{world=CraftWorld{name=world},x=-4693.0,y=-1.0,z=-3572.0,pitch=0.0,yaw=0.0}
[19:26:04] [Server thread/INFO]: [WildTP] Location unsafe: Location{world=CraftWorld{name=world},x=-4693.0,y=-1.0,z=-3572.0,pitch=0.0,yaw=0.0}
[19:26:04] [Server thread/INFO]: [WildTP] unsuitable location, trying again.
[19:26:04] [Server thread/INFO]: [WildTP] am chekin
[19:26:04] [Server thread/INFO]: [WildTP] Location{world=CraftWorld{name=world},x=-294.0,y=-1.0,z=-2303.0,pitch=0.0,yaw=0.0}
[19:26:04] [Server thread/INFO]: [WildTP] Location unsafe: Location{world=CraftWorld{name=world},x=-294.0,y=-1.0,z=-2303.0,pitch=0.0,yaw=0.0}
[19:26:04] [Server thread/INFO]: [WildTP] unsuitable location, trying again.
[19:26:05] [Server thread/INFO]: [WildTP] am chekin
[19:26:05] [Server thread/INFO]: [WildTP] Location{world=CraftWorld{name=world},x=35.0,y=-1.0,z=-2982.0,pitch=0.0,yaw=0.0}
[19:26:05] [Server thread/INFO]: [WildTP] Location unsafe: Location{world=CraftWorld{name=world},x=35.0,y=-1.0,z=-2982.0,pitch=0.0,yaw=0.0}
[19:26:05] [Server thread/INFO]: [WildTP] unsuitable location, trying again.
[19:26:05] [Server thread/INFO]: [WildTP] am chekin
[19:26:05] [Server thread/INFO]: [WildTP] Location{world=CraftWorld{name=world},x=3361.0,y=-1.0,z=2282.0,pitch=0.0,yaw=0.0}
[19:26:05] [Server thread/INFO]: [WildTP] Location unsafe: Location{world=CraftWorld{name=world},x=3361.0,y=-1.0,z=2282.0,pitch=0.0,yaw=0.0}
[19:26:05] [Server thread/INFO]: [WildTP] unsuitable location, trying again.
[19:26:06] [Server thread/INFO]: [WildTP] am chekin
[19:26:06] [Server thread/INFO]: [WildTP] Location{world=CraftWorld{name=world},x=1984.0,y=-1.0,z=-1791.0,pitch=0.0,yaw=0.0}
[19:26:06] [Server thread/INFO]: [WildTP] Location unsafe: Location{world=CraftWorld{name=world},x=1984.0,y=-1.0,z=-1791.0,pitch=0.0,yaw=0.0}
[19:26:06] [Server thread/INFO]: [WildTP] unsuitable location, trying again.

So this is useful, seems if it fails, I don't properly end task and it somehow retains the teleporting instance. So this one I can look into fixing, thanks!

And also interesting - it fails with "No suitable locations found" for the "first" attempt like the prior log - does this behavior happen when you use the command?

I'd have to look to see if the same thing happens with a command. I'll report back here. But yeah, despite the first attempt successfully teleporting, it prints in chat in red that no location was found even though it clearly teleported me.
Also, the reason why I used PasteBin is because last time I posted a huge log like this on someone else's GitHub I got yelled at for making a large post. :(

Yea some other people are really picky about how they want logs. My general rule is - if it's probably around over 200-300 lines long, then yea prolly should be in something like a gist (which I prefer instead of pastebin). It also helps if you wrap it in a code block - that makes it look much nicer (like I did above) than just a raw paste into a comment.

```
this is how you make a code block in (GitHub-flavored) markdown.
```

So uh, looks like my refactor kinda didn't take into consideration that the async task I spawned is outside of the task that does the retries... I really don't know what happened when I pulled that PR but now I'm confused why some of these things exist now lol. So I guess I'll just keep making commits and releases until this gets fixed like some other plugins out there xd

See if this works (or maybe it just breaks somewhere else) https://ci.appveyor.com/project/RoboMWM39862/wildernesstp/builds/33896620/artifacts

That build seems to work way better, the counter actually works correctly now and only outputs the failure message after the bar's filled up, and of course the bar will go away when it's done counting, never to be stuck on my screen again! A successful teleport now works 100% right with no issues. Thanks for this one!
However, there's still one issue. If it fails to find a safe location after all checks, /wild will still think there's a teleport request, returning "A WildTP request is already pending", so if an RTP fails, nobody else can ever RTP again until a restart. And of course, the portal I made doesn't do anything either, probably because it also thinks a request is pending.

O dang nice! Ok, so ya I have to look into this whole cooldown/warmup stuff, which was what was heavily altered when I pulled those 2 giant PRs... thanks for the feedback!

Well, now that the plugin is almost perfectly functional for me, I'd like to be able to provide some feedback and my thoughts. Would I use the Spigot discussion page or open new issue tickets for ideas and improvements that could be made?

tickets are better if you have ideas/improvements you'd want to follow up on.

so if an RTP fails, nobody else can ever RTP again until a restart.

Checking the logic here, it looks like this only prints if that specific player attempts to do it again. Others should be able to RTP? It also looks like if the player was to logout/login they'd be able to invoke /rtp again.

Yeah, it seems to let me try again without relogging. I think that's about it. Thanks for fixing it up.

Nice, thanks!