Skip to content
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

Game sends ships to unreachable port causiong an exception #6445

Open
hessenfarmer opened this issue May 1, 2024 · 9 comments
Open

Game sends ships to unreachable port causiong an exception #6445

hessenfarmer opened this issue May 1, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@hessenfarmer
Copy link
Contributor

hessenfarmer commented May 1, 2024

Describe the bug
see https://www.widelands.org/forum/topic/5978/
if a port is unreachable and a ship gets send to it the game throws an exception.

To reproduce
Steps to reproduce the behavior:

  1. load the attached savegame
  2. wait for the crash

see attached screenshot as well

Expected behavior
maps should not allow a port space in this place
ships should not be sent to such a port.

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot 2024-05-01 211829

Savegames

2024-04-27T23.12.16.wgf.zip

Version:

  • OS: all
    widelands latest.

Additional context
Add any other context about the problem here.

@hessenfarmer hessenfarmer added the bug Something isn't working label May 1, 2024
@bunnybot
Copy link

bunnybot commented May 1, 2024

Mirrored on Codeberg as #CB4807.

@bunnybot
Copy link

bunnybot commented May 1, 2024

frankystoneMirrored from Codeberg
On Wed May 01 21:43:43 CEST 2024, frankystone wrote:


That port in the screenshot shouldn't be reachable at all, because water needs to have a distance of two nodes to be navigable by ships.
Where you can build bridges, a ship can't navigate, regardless if a bridge/road is there or not.

@bunnybot
Copy link

bunnybot commented May 1, 2024

NordfrieseMirrored from Codeberg
On Wed May 01 21:44:37 CEST 2024, Benedikt Straub (Nordfriese) wrote:


Not entirely sure about the description. Placing a road cannot interfere with ship movement since ships can only move onto nodes that are entirely surrounded by 6 water triangles, and no road or bridge can be built there.

Maybe the savegame is from v1.1? There was a bug in v1.1 where ships could in some cases move over land, so it might be that due to this bug the two oceans in the screenshot would have been one fleet then but are two separate fleets now.

@bunnybot
Copy link

bunnybot commented May 1, 2024

hessenfarmerMirrored from Codeberg
On Wed May 01 21:57:20 CEST 2024, Stephan Lutz (hessenfarmer) wrote:


According to the forum post this is an autosave from 1.2, However I might ask whether he continued a game from 1.1

@bunnybot
Copy link

bunnybot commented May 1, 2024

hessenfarmerMirrored from Codeberg
On Wed May 01 22:02:22 CEST 2024, Stephan Lutz (hessenfarmer) wrote:


well I am not sure. How near do we need to get to the port dock to reach it. This may be a corner case as the port dock is just at the point surrounded by 6 water triangles left to the southern bridge.

@bunnybot
Copy link

bunnybot commented May 1, 2024

hessenfarmerMirrored from Codeberg
On Wed May 01 22:41:19 CEST 2024, Stephan Lutz (hessenfarmer) wrote:


in the forum the player comnfirmed the whole game was played with 1.2.

@hessenfarmer
Copy link
Contributor Author

I uploaded the wrong savegame. I have coreccted it now in the original post

@hessenfarmer
Copy link
Contributor Author

While fixing the broken game in Multiplayer I found that the real bug is two fold.

  1. I'd rate the misplaced port space in the map a bug. As no port should be allowed there, as the "ocean" or fleet space of this port is only 1 field where only the port dock can go.
  2. that the ships get send to this port seems to be a bug as well.

@hessenfarmer hessenfarmer changed the title game throws exception if port is made unreachable by placing a road which crosses the last path to the port. Game sends ships to unreachable port causiong an exception May 2, 2024
@hessenfarmer hessenfarmer changed the title Game sends ships to unreachable port causiong an exception Game sends ships to unreachable port causing an exception May 2, 2024
@bunnybot bunnybot changed the title Game sends ships to unreachable port causing an exception Game sends ships to unreachable port causiong an exception May 2, 2024
@frankystone
Copy link
Contributor

Hm, with a deeper look at the map there might be more problematic portspaces. At those positions (coordinates in white) it may depend on the place of the portdock if the port is reachable or not:

port_portdock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants