-
Notifications
You must be signed in to change notification settings - Fork 63
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
Combined trains break apart after server restarting #486
Comments
Where the trains revert, is that near to the spawn area of the server, and is the spawn kept loaded? Do the trains have keepchunksloaded on? |
Some of them near the spawn area, but not very close(maybe about 100-200 blocks away?) And yes, each train has enabled keepchunksloaded to ensure it can running on a circle line. |
And /train startuplog doesnt show any errors at startup when this happens? Its going to be difficult to figure out when/what causes it. Not easy to reproduce on my end anyways |
Yes, nothing goes wrong in the log:
This issue occurs every time the server starts. I have updated all plugins and server core but the problem is not resolved. |
I suspect this error occurs during the save or restore phase. Because if you don't reboot the server, then everything will be fine. |
Can you stop the server and upload the latest.log generated at that point? Its possible the server did not properly shut down (and save). So it should show the plugins disabling and worlds saving before the server shuts off. |
Sure, there's the log:
I cannot find anything wrong in there, have you got any idea? |
The only thing I find strange is that the bluemap plugin is kicked into action while traincarts is loading trains/chunks. Its a far-off guess, but can you see what happens if you restart without bluemap running? If the same problem still occurs? If it does its an annoying bug to track down, Ill have to send some custom builds that adds some debugging information |
Okay, I will try it. Thanks a lot! |
I disabled the Bluemap, but it didn't work. The train was still torn apart. |
Went over the track walking code again, so I need to narrow down what to look for. Do you know precisely where trains disconnect? If not, I can send a test build that logs the coordinates carts have when they disconnect. If you do, does this happen while the cart is on a curved piece of vanilla track? |
Ive added a debug mode to hopefully more easily identify why trains split. Update to this build: https://ci.mg-dev.eu/job/TrainCarts/1481/ Boot server with it once, stop again. Then edit config.yml and set logTrainSplitting: true. It will then log all the splits that occur shortly after the server restart, and at normal runtime. Where, why and what cart(s) |
Cool, it catched!
|
Interesting, its derailed. Means for some reason it cannot detect any rails at the position of the cart. Can you check for some of the positions listed, whether its above or inside a rails block? For example: x=-205.67551907028096 y=53.05266560209267 z=37.41207232763191 If thats above rails then theres a bug at startup reading block data for some reason |
Ill probably send a test build later today (in 5 hours or so) that logs all the positions of minecarts when they are first loaded in, and their position every tick until the train loads in, to see if such a drift is occurring. |
Okay, thanks for your work! |
This build logs the position of all minecarts that are unloaded (pending loading) and when the minecart loads in and is converted to a traincarts minecart. You can send the startup log up to and including all split logs, might be pretty spammy |
I think upload a file can make you read easier? |
As I cant see the blocks involved, is there a rails at?: |
Its kinda difficult to calculate all of this, so its easier if you check. Can you /tp to exactly x=-216.8159 z=-160.684 and look all the way down? Where is this at? I think the initial spawn coordinate is indeed on the rails still, im uncertain about the second after it split off |
That does not seem like youre looking all the way down. Pitch angle is only 68 / 90. I need to know exactly where it is at so pixels line up with the coordinates. |
Not the right coordinates exactly. Use |
It seems some miscalculation happened somewhere in the physics to cause it to move there, because that movement change makes no sense. It was on that straight piece of track, and not much later its off the rails. I'll need to add some more logging to debug this |
Sure, happy to help. |
plugin.zip |
So its part of the physics routine unfortunately, which is a whole lot of code to cover. Ill take out a few likely places and add some logging for it, will be tricky |
After you send the logging, Ill pick out a single train that had issues, and list a series of coordinates. Youll have to see like previously if they are still above rails or not. So /tp @p x y z to those coordinates, and look all the way down, and verify whether or not its still above the rails or not. |
Ive managed to reproduce the problem by creating a jagged track far away from spawn and having a train go around in circles on it. |
I think I may have found the problem. https://ci.mg-dev.eu/job/TrainCarts/1484/ |
I've tested it several times and it seems pretty good so far. |
Well, looks like it shows again... |
You're running with latest dev snapshot from jenkins of traincarts? There have been a lot of changes |
No, I'm running with the latest Release version |
Then id start with testing out https://ci.mg-dev.eu/view/all/job/TrainCarts/1542/ It has important changes when it comes to persistence, such as saving and restoring launch actions, active signs and more. Too many changes to really compare it with last release as all of that is basically a rewrite. Let me know if it still happens, then I can look more deeply into it with the current codebase |
Okay, thank you. I'll try this new build. |
English is not my native language; please excuse typing errors.
Info
Please provide the following information:
/train version
): 1.20.2-v1 (build: 1464)/train version
): v1.20.2-v1 (build: 1634)/version
): git-Paper-280 (MC: 1.20.2)Bug
Description
Combination trains running on loop lines will malfunction after a server restart. For example, carts will disconnect from each other and became a new train.
Before restart:
After restart:
You can see that some train got new children.
Steps to reproduce
Just restart the server and do nothing.
The text was updated successfully, but these errors were encountered: