Ticket #43633

regression in commit 0784363f5f on master branch

Open Date: 2022-01-16 01:12 Last Update: 2022-01-16 21:32

9 - Highest
5 - Medium


I'm using repo from https://github.com/freeciv/freeciv.git. Commit 0784363f5f on master branch introduced regression. Bisect result:

0784363f5f (HEAD -> bad) Draw integrating cardinal roads (rivers) correctly
8d5be08e64 (good) Split general parts from api_game_specenum to a new api_specenum

Trace from gdb

(gdb) where
#0  0x0000000000462164 in fill_sprite_array (t=<optimized out>, sprs=sprs@entry=0x7fffffffcc20, layer=layer@entry=LAYER_WATER, ptile=<optimized out>, ptile@entry=0x42f9e90, pedge=pedge@entr
y=0x0, pcorner=pcorner@entry=0x0, punit=0x13d4300, pcity=0x0, citymode=<optimized out>, putype=0x0) at tilespec.c:5669
#1  0x00000000004317e9 in put_one_element (pcanvas=pcanvas@entry=0x18b38f0, zoom=1, layer=layer@entry=LAYER_WATER, ptile=ptile@entry=0x42f9e90, pedge=pedge@entry=0x0, pcorner=pcorner@entry=
0x0, punit=punit@entry=0x13d4300, pcity=0x0, canvas_x=0xffffffc2, canvas_y=0xffffffe1, citymode=0x0, putype=0x0) at mapview_common.c:1327
#2  0x000000000043544e in put_one_tile (citymode=0x0, canvas_y=0xffffffe1, canvas_x=0xffffffc2, ptile=0x42f9e90, layer=LAYER_WATER, pcanvas=0x18b38f0) at mapview_common.c:1546
#3  update_map_canvas (canvas_x=canvas_x@entry=0x0, canvas_y=canvas_y@entry=0x0, width=0x60, height=0x30) at mapview_common.c:1742
#4  0x000000000043669a in base_set_mapview_origin (gui_x0=<optimized out>, gui_y0=<optimized out>) at mapview_common.c:907
#5  0x0000000000437187 in set_mapview_origin (gui_x0=<optimized out>, gui_x0@entry=-630.5, gui_y0=<optimized out>) at mapview_common.c:1030
#6  0x00000000004374c5 in center_tile_mapcanvas (ptile=ptile@entry=0x42f9e90) at mapview_common.c:1207
#7  0x0000000000421589 in auto_center_on_focus_unit () at control.c:435
#8  unit_focus_set (punit=<optimized out>) at control.c:544
#9  0x0000000000421899 in unit_focus_set (punit=0x13d4300) at control.c:505
#10 unit_focus_advance () at control.c:749
#11 0x0000000000421b4e in unit_focus_update () at control.c:798
#12 0x000000000041b2e3 in set_client_state (newstate=newstate@entry=C_S_RUNNING) at client_main.c:936
#13 0x000000000043df6e in handle_start_phase (phase=0x0) at packhand.c:1408
#14 0x0000000000446d5e in client_handle_packet (type=type@entry=PACKET_START_PHASE, packet=packet@entry=0x6bba850) at packhand_gen.c:279
#15 0x0000000000419d42 in client_packet_input (packet=packet@entry=0x6bba850, type=0x7e) at client_main.c:771
#16 0x0000000000420244 in input_from_server (fd=<optimized out>) at clinet.c:420
#17 0x0000000000415840 in get_net_input (source=<optimized out>, condition=<optimized out>, data=<optimized out>) at gui_main.c:2165
#18 0x00007ffff48fb130 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#19 0x00007ffff4950208 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#20 0x00007ffff48fa853 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#21 0x00007ffff521643d in gtk_main () at /lib64/libgtk-3.so.0
#22 0x0000000000417ee4 in ui_main (argc=<optimized out>, argc@entry=0x1, argv=<optimized out>, argv@entry=0x7fffffffdd78) at gui_main.c:1935
#23 0x000000000041a44d in client_main (argc=0x1, argv=0x7fffffffdd78) at client_main.c:685
#24 0x00007ffff46c9560 in __libc_start_call_main (main=main@entry=0x414fb0 <main>, argc=argc@entry=0x1, argv=argv@entry=0x7fffffffdd78) at ../sysdeps/nptl/libc_start_call_main.h:58
#25 0x00007ffff46c960c in __libc_start_main_impl (main=0x414fb0 <main>, argc=0x1, argv=0x7fffffffdd78, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdd68) at ../csu/libc-start.c:409
#26 0x0000000000414fe5 in _start ()

Ticket History (3/9 Histories)

2022-01-16 01:12 Updated by: jdanecki
  • New Ticket "regression in commit 0784363f5f on master branch" created
2022-01-16 01:59 Updated by: cazfi

I cannot download the savegame. Some problem with osdn?

The blamed commit has been applied to all branches, so it's possible that all branches are affected. It should be at least confirmed that S3_0 is not affected before 3.0.0-RC1 release.

2022-01-16 02:27 Updated by: cazfi
  • Milestone Update from (None) to 3.0.0 (closed)
  • Component Update from Gtk3.22-client to Client common

Figured the bug out by reading the source code and alio tileset .tilespec. Fix coming in a minute.

2022-01-16 02:46 Updated by: cazfi
  • Resolution Update from None to Accepted

To be committed also to S2_6.

2022-01-16 06:46 Updated by: jdanecki

I've applied proposed patch and if fixed the segfault. Thanks.

2022-01-16 21:30 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Priority Update from 5 - Medium to 9 - Highest

This actually affects also hexemplio (default tileset) -> makes most games unfinishable -> this should be treated as an emergency fix.

Will push ASAP.

2022-01-16 21:32 Updated by: cazfi
  • Status Update from Open to Closed

Attachment File List


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