Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #797698

closed

Buoy vision turns tiles already seen by a city into unusable fog of war.

Added by Lexxie L over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Server
Sprint/Milestone:
Start date:
2019-01-13
Due date:
% Done:

0%

Estimated time:
2.00 h

Description

Buoys help take tiles out of fog of war. But if a buoy affects a tile already seen and worked by a city, it suppresses vision on that tile and makes the city unable to work it. Making a buoy on the coast near a city then results in the city being unable to use half of its tiles, and it might starve it off.

https://gyazo.com/1bb7367f3ed3fa831a432dae57aee283


Files


Related issues

Related to Freeciv - Bug #854482: handle_city() CMA: Plymouth has changed multiple times.Rejected

Actions
Actions #1

Updated by Marko Lindqvist over 4 years ago

  • Tracker changed from Task to Bug
  • Priority changed from High to Normal

Screenshot is from freeciv-web, so this might be freeciv-web specific issue.

Actions #2

Updated by Máximo Castañeda over 4 years ago

Reproduced with 2.6.0 GKT-3.0 client, Fedora 28 rpm: freeciv-2.6.0-2.fc28.x86_64.

/set size 3
/set landmass 25
/set techlevel 100
/set gold 50000
/start

Build a city on the coast
Build a transport
Move it to the sea with your engineers
Build a buoy
Move your units out of the zone
See your tiles fogged

When you reload the game they are visible again. Next turn your view is reduced and the one afterwards everything is fogged again around the buoy, except the buoy's flag.

On game starting after reloading it, two error messages are repeated a lot of times in the client (in the window that disappears), nothing special in the server, even with debug 3.

in map_change_seen() [maphand.c::904]: assertion 'plrtile->seen_count[V_INVIS] + !game.info.fogofwar <= plrtile->seen_count[V_MAIN]' failed.
in map_change_seen() [maphand.c::894]: assertion '0 <= change[v] || -change[v] <= plrtile->seen_count[v]' failed.
Actions #3

Updated by Máximo Castañeda over 4 years ago

git bisect points to b74c41379c659066aaaf5e27e704c71a91362c4e. Whether the bug is there or just surfaces it, I don't know.

Actions #4

Updated by Marko Lindqvist over 4 years ago

I couldn't reproduce with current S2_6 HEAD.

Actions #5

Updated by Máximo Castañeda over 4 years ago

Tried again, with fddec02b63370ad8aa99e696f58f4548206f0e71. Fails for me.

I failed to detail all the steps:
...
Build a buoy
Move your units out of the zone
End turn and see your visibility reduced
End another turn and see yet more FoW.

If you were already changing turns and still worked for you, these are my build flags (though I don't know how they could be related to this kind of problem):

./autogen.sh --disable-nls --no-configure-run --disable-ruledit --disable-freeciv-manual
configure --prefix="${MY_BUILDS_DIR}/buoy" --enable-gitrev --enable-client=gtk3 --disable-nls --disable-ruledit --enable-fcmp=no --enable-mapimg=no --disable-sdl-mixer --enable-freeciv-manual=no

Actions #6

Updated by Máximo Castañeda over 4 years ago

I'd say this is a duplicate of #781551. Same assertions (only one is referenced in the other report, but both appear), there are buoys, and visibility is reduced after turn change.

Actions #7

Updated by Marko Lindqvist over 4 years ago

I did play several turns forward with no FoW problems. I did take some shortcuts with editor compared to your reproducing instructions first, though, but now that I tried to follow them as accurately as possible I still can't reproduce a problem.

Do you have a savegame where from this should be more trivial to reproduce (just ending a turn?)

Actions #8

Updated by Máximo Castañeda over 4 years ago

The one attached in my first comment should do the trick. Ending turn reduces visibility and another turn reduces it further taking even the city into obscurity.

Actions #9

Updated by Marko Lindqvist over 4 years ago

Ok, got it reproduced from that savegame. It might be relevant that the buoy tile is also worked by the city. Or that it's adjacent to a city and within ones borders (in earlier attempts I usually built buoy one tile further (in hex topology).

First backtrace from the failing asserts suggests that the real vision count gets messed up when autosettlers do virtual changes (in this case: pillaging buoy) to see what their overall effect would be.

Actions #10

Updated by Marko Lindqvist over 4 years ago

Marko Lindqvist wrote:

First backtrace from the failing asserts suggests that the real vision count gets messed up when autosettlers do virtual changes (in this case: pillaging buoy) to see what their overall effect would be.

Actually it considers Transforming the ocean tile to land, which would indirectly cause destruction of the buoy.

Actions #11

Updated by Marko Lindqvist over 4 years ago

Actions #13

Updated by Lexxie L over 4 years ago

1. It doesn't sound like it's relevant, but just in case ... the ocean tile where the buoy was put had originally been swamp. Buoy was built on it after transformation.

2. Turn change would create erratic behaviours. For example, you could move a unit on a seen tile, and the tile you move onto with the unit becomes fogged, and seemingly random tiles nearby might toggle fogged or unfogged in chaotic unpredicted ways.

So it's definitely something about how it calculates visible tiles and some kind of bad logic there is toggling

Actions #14

Updated by Marko Lindqvist over 4 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist
Actions #15

Updated by Jacob Nevins over 3 years ago

  • Related to Bug #854482: handle_city() CMA: Plymouth has changed multiple times. added

Also available in: Atom PDF