S2_6 assertion 'packet->size == ppl' failed.
S2_6 autogame fails with
0: in package_city() [../../src/server/citytools.c::2342]: assertion 'packet->size == ppl' failed.
#0 raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00005555558474ab in fc_assert_fail (file=0x55555589ea02 "../../src/server/citytools.c",
#2 0x00005555555ff7b1 in package_city (pcity=0x555555e99930, packet=0x7fffffffd210,
#3 0x00005555555ff120 in send_city_info_at_tile (pviewer=0x555555f0c650,
#4 0x00005555555ff006 in send_city_info (dest=0x555555f0c650, pcity=0x555555e99930)
#5 0x00005555556012b1 in sync_cities () at ../../src/server/citytools.c:2943
#6 0x000055555561f19f in give_citymap_from_player_to_player (pcity=0x555555e99930,
#7 0x00005555555fafb1 in transfer_city (ptaker=0x5555579de450, pcity=0x555555e99930,
#8 0x0000555555627724 in kill_player (pplayer=0x555555f0c650)
#9 0x000055555559739d in kill_dying_players () at ../../src/server/srv_main.c:1008
#10 0x00005555555974e0 in ai_start_phase () at ../../src/server/srv_main.c:1027
#11 0x00005555555984b0 in begin_phase (is_new_phase=true) at ../../src/server/srv_main.c:1215
#12 0x000055555559d4f4 in srv_running () at ../../src/server/srv_main.c:2749
#13 0x000055555559f227 in srv_main () at ../../src/server/srv_main.c:3382
#14 0x0000555555590222 in main (argc=6, argv=0x7fffffffe468)
Attached patch makes assert not to fail. It's not a commit candidate - at least the addition of a new assert (which could start failing) should be removed before pushing this to mature S2_6.
- Ported to S3_0 - master (this patch has the new assert)
- S2_6 without the new assert attached
Current version of the patch only assumes that the city info will be sent after the arrange has been done. There is no guaranteed broadcast when the worker arrangement has been done, so the patch is wrong in the assumption. This patch needs to implement the broadcasting itself.
- New versions of the patches taking care of sending the city info once city has been arranged, if such a send was attempted during need_arrange