pioneerspacesim / pioneer

A game of lonely space adventure
https://pioneerspacesim.net
1.58k stars 364 forks source link

NPC ships stuck at orbital starport #5830

Open maxso-216 opened 1 month ago

maxso-216 commented 1 month ago

Observed behaviour

Multiple NPC ships stuck at the orbital starport and create huge lag. Also, it is not possible to land in the spaceport.

Screenshot from 2024-04-26 23-52-29

Screenshot from 2024-04-26 23-52-45

The collision effect is also offset-ed, but I believe this is another bug that is fixed in newer version.

Expected behaviour

No NPC ships should be stucked.

Steps to reproduce

As it is happened randomly(?), I do not know exact steps to reproduce.

My pioneer version (and OS):

20240203 (via flatpak), Ubuntu 23.10

My output.txt (required) and game save (optional, but recommended)

output.txt

save file : https://shota.nu/ss/ybf8tjpd.gz

impaktor commented 1 month ago

I believe this was fixed in the 3.14 release, by multiple NPS ship fixes: https://github.com/pioneerspacesim/pioneer/releases/tag/20240314

@Gliese852 I assume we can close this?

Gliese852 commented 1 month ago

@impaktor I'm not sure, I don't think I've encountered such a problem, need to check.

impaktor commented 1 month ago

@maxso-216 Please use the latest release (3.14), to load your old saves, you might have to hold down Ctrl to force load them, the first time.

maxso-216 commented 1 month ago

@impaktor I tried with latest release and recover the save file. Seems like the situation still exists.

Screenshot from 2024-04-27 20-44-03

Haven't tried going to other systems and see if same thing happen again, maybe report later.

maxso-216 commented 1 month ago

@impaktor I build from source code and play for 2 hours, and same thing happen again. Its very lag that I can't fly close to it.

Screenshot from 2024-04-28 00-30-16

save file:https://shota.nu/r5akwxcl.gz

output.txt

impaktor commented 1 month ago

@maxso-216 Yeah, if this still happens in new systems in 2024.3.14 release or master it makes it very much more interesting.

I assume you've spent a long time in the same system for this problem to emerge, e.g. doing many inter-planetary missions?

maxso-216 commented 1 month ago

@impaktor I don't travel the same system for a long time. In fact, I travel different systems and doing missions. The bug happen as I travel to another system and try to dock to an orbital starport to find some missions to do. As the game getting laggy when the ship approaching the starport, I know the bug happens again.

Interestingly, the bug happens quite randomly as I don't encounter same thing when approaching orbital starport in previous system. Maybe long gameplay time cause the bug?

impaktor commented 1 month ago

@maxso-216 If you want to gain further understanding of the bug, pull up the debug window (Ctrl+i) and check the "Trade Ships"-tab, and see if you notice a pattern for when the bug is there vs. when it's not there.

maxso-216 commented 1 month ago

@impaktor After some observations, I have come up with a threom.

The bug is caused when an orbital star-port refuses to allow anyone to dock for no reason.

Screenshot from 2024-04-29 09-59-44

As shown above, my ship's autopilot stuck at this position and refuses to dock. Even entering the station manually doesn't work. Its pretty odd that I have landing permission. So, I stay at far position and observe for hours.

Screenshot from 2024-04-29 10-24-08

So, few hours pass and a NPC starship come. It stuck at this position. Worth my waiting. I have checked the debug menu but it shows nothing special.

Thus, I wait for another NPC ship to arrive. However this time, they collide and unstuck(?), somehow they manage to dock, so as my ship, which is different from what I except. However, I believe this is the root cause of the bug, as with large number of ship simulating when traveling to different systems, the problematic star-port will cause a jam, resulting this bug. Maybe I was wrong, but this is the best guessing I can come up with.