Tíquete #47825

mapgen : check if there is at least one lake before regenerate_lakes

: 2023-04-10 03:17 Última Atualização: 2023-04-12 02:40

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
2

Details

S3_1

with landmass85 , on a tiny map i had this error

3: Creating a map of size 30 x 40 = 1200 tiles (1000 requested).
../../../server/generator/mapgen_utils.c:349:37: runtime error: variable length array bound evaluates to non-positive value 0
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../server/generator/mapgen_utils.c:349:37 in 
Game saved as Sz1-Ai010-Lm85-230409_184441-T00001-auto.sav.xz

There i no lake on the map, and the error is about regenerate_lakes :-)

This did not prevented the map generation but it is better to fix it, see attached (trivial) patch for S3_1 , and also main i did not checked other branches, but i guess it will apply flawlessly.

Ticket History (3/8 Histories)

2023-04-10 03:17 Updated by: alain_bkr
  • New Ticket "mapgen : check if there is at least one lake before regenerate_lakes" created
2023-04-10 03:36 Updated by: cazfi
Comentário

If S2_6 is affected, there's no "world_object" in it. Would be nice to have this in 2.6.9 (in case you're not following freeciv-dev: we are about to release that in two weeks)

2023-04-10 07:38 Updated by: alain_bkr
Comentário

here is the patch for 2.6

(btw i subscribed to dev mailing list and read archive)

2023-04-10 11:16 Updated by: cazfi
  • Dono Update from (Nenhum) to cazfi
  • Resolução Update from Nenhum to Accepted
  • Marco Update from (Nenhum) to 3.0.8 (fechado)
2023-04-12 02:40 Updated by: cazfi
Comentário

I think this was your first contribution with the commit having you as the author (as git knows it).

Once OpenHUB process freeciv data next time (frequency of that has fluctuated a lot during the years - sometimes it happens almost daily, but couple of months is normal too), it should show you as a new contributor, and if you wish, you can claim those contributions to your personal account.

https://www.openhub.net/p/freeciv/contributors/summary

2023-04-12 02:40 Updated by: cazfi
  • Estado Update from Aberto to Fechado
  • Resolução Update from Accepted to Fixed

Attachment File List

Editar

Please login to add comment to this ticket » Login