FAIR ../server/generator/mapgen.c::3102]: assertion 'pftile2 != NULL' failed.
assertion '!fair_map_tile_border(pisland, pftile, sea_around_island)' failed.
It seems to say it cannot generate island.
I think the landmass=65 is too high and/or aifill=26 is too high for mapsize=16
landmass=65 => There will be only one land with lakes and it is not possible to generate 2 islands , and even more impossible 26 islands.
It is like a 2D percolation problem of water inside material (is there a path from one border to the opposite one ?) Percolation occurs near 53 % if remember correctly.
First idea for a quick fix :
"set generator FAIR" implies :
Maybe just half the given landmass parameter to transform 15-85 range to 15-42.5 (if someone says 85 he wants lots of land ...)
a tiny patch, just in order to exit , instead of continuing after the first assertion failure which gives GB of logs , and still no map.
it just replaces fc_assert by fc_assert_exit in the 2 mentionned lines.
Before the patch, when the generator fall in this case, it generated tons of logs (gigbytes)
The patch add an exit when this case occur.
I scripted a systematical test of the FAIR generator ,
Loop on all the possible topologies, topology WRAPX|WRAPY|ISO|HEX topology WRAPX|WRAPY|HEX topology WRAPX|WRAPY|ISO topology WRAPX|WRAPY topology WRAPX|ISO|HEX topology WRAPX|HEX topology WRAPX|ISO topology WRAPX topology WRAPY|ISO|HEX topology WRAPY|HEX topology WRAPY|ISO topology WRAPY topology ISO|HEX topology HEX topology ISO topology "" loop on map size 4 64 256 1024 and 2048 loop on different number of AI 3 9 27 81 150 generate a fair map
1/ The patch works : I had no more crazy loops and huge logs, just exit depending on the parameters.
2/ Verification in progress, it may take some time. WRAPY seems to cause trouble more often than others settings. It may be a "normal thing" due to the way the fair generator works , and happens when the conditions are met.
The patch works nicely , i had several exit, but no more loops of error messages.
With FAIR generator, WRAPY does not seem to work without WRAPX
I had some problems with huge maps (1024 or 2048) , or huge number of players , but this seems rather normal
Reply To alain_bkr
The patch works nicely , i had several exit, but no more loops of error messages.
This still needs to be reworked to a solution that can be pushed in to the repository. Can't use fc_assert_exit()
- Server should not die completely, but to return to map generation loop at srv_ready() where it might retry with another seed
- Solution should not rely on asserts being enabled -> we want also non-debug builds to work
I guess one can replace 'assert_exit' by 'if ... exit'
i am sorry, the current workflow ala 90's , with old tools and is just too annoying and inefficient.
I ll spend my effort on a github fork, with nice workflow, integrated bugreport, reactive people, documentation ...
good luck
3.0.6+ , compiled with clang14
I scripted randoms tests
I got this error at map generation time
Nicely the script saves the loaded random parameters before start, so i have a saved game to reproduce the error
I attached the generated .serv file (note the end save / start) , and the saved "game" which gives the error 100% of time here. it was launched with