Ticket #41851

S2_6 assertion 'packet->size == ppl' failed.

Open Date: 2021-03-25 02:41 Last Update: 2021-04-11 15:28

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
8

Details

S2_6 autogame fails with

0: in package_city() [../../src/server/citytools.c::2342]: assertion 'packet->size == ppl' failed.

(gdb) bt

#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",

function=0x5555558a01f8 <FUNCTION.16> "package_city", line=2342,
assertion=0x55555589f9ae "packet->size == ppl", message=0x5555559141f4 "nologmsg:%s")
at ../../src/utility/log.c:524

#2 0x00005555555ff7b1 in package_city (pcity=0x555555e99930, packet=0x7fffffffd210,

dipl_invest=false) at ../../src/server/citytools.c:2342

#3 0x00005555555ff120 in send_city_info_at_tile (pviewer=0x555555f0c650,

dest=0x555555f0d700, pcity=0x555555e99930, ptile=0x555556c79138)
at ../../src/server/citytools.c:2229

#4 0x00005555555ff006 in send_city_info (dest=0x555555f0c650, pcity=0x555555e99930)

at ../../src/server/citytools.c:2180

#5 0x00005555556012b1 in sync_cities () at ../../src/server/citytools.c:2943

#6 0x000055555561f19f in give_citymap_from_player_to_player (pcity=0x555555e99930,

pfrom=0x555555f0c650, pdest=0x5555579de450) at ../../src/server/maphand.c:412

#7 0x00005555555fafb1 in transfer_city (ptaker=0x5555579de450, pcity=0x555555e99930,

kill_outside=3, transfer_unit_verbose=true, resolve_stack=true, raze=true,
build_free=true) at ../../src/server/citytools.c:1139

#8 0x0000555555627724 in kill_player (pplayer=0x555555f0c650)

at ../../src/server/plrhand.c:160

#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)

at ../../src/server/civserver.c:476

Ticket History (3/14 Histories)

2021-03-25 02:41 Updated by: cazfi
  • New Ticket "S2_6 assertion 'packet->size == ppl' failed." created
2021-03-25 05:49 Updated by: cazfi
Comment

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.

2021-03-25 06:33 Updated by: cazfi
  • Resolution Update from None to Accepted
  • Milestone Update from (None) to 2.6.5
  • Component Update from (None) to Server
Comment

- Ported to S3_0 - master (this patch has the new assert) - S2_6 without the new assert attached

2021-04-07 20:04 Updated by: cazfi
  • Resolution Update from Accepted to None
Comment

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.

2021-04-09 00:08 Updated by: cazfi
  • Resolution Update from None to Accepted
Comment

- 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

2021-04-11 15:28 Updated by: cazfi
  • Status Update from Open to Closed
  • Owner Update from (None) to cazfi
  • Resolution Update from Accepted to Fixed

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login