Project

General

Profile

Actions

Bug #1642

open

wrapped goto with a naval battle group SIGSEGV (Segmentation fault).

Added by John Robertson 7 days ago. Updated 7 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Qt-client
Target version:
-
Start date:
07/31/2025
Due date:
% Done:

0%

Estimated time:

Description

(latest dev / qt-client)
  1. Select five naval ships to be part of the same battle group.
  2. with the battle group selected issue a 'goto' command and mouse select across a world-wrapping route.
  3. BOOM

I think the packet is built incorrectly, causing the `goto_maps` variable to be NULL.

First the following asserts are given:

1: in send_packet_unit_orders_100() [../../common/packets_gen.c::36549]: assertion '!dout.too_short' failed.
1: Please report this message at https://redmine.freeciv.org/projects/freeciv
1: in send_packet_unit_orders_100() [../../common/packets_gen.c::36549]: assertion '!dout.too_short' failed.
1: Please report this message at https://redmine.freeciv.org/projects/freeciv
1: in send_packet_unit_orders_100() [../../common/packets_gen.c::36549]: assertion '!dout.too_short' failed.
1: Please report this message at https://redmine.freeciv.org/projects/freeciv

Then the SIGSEGV is thrown (with gdb print command to show call parameters):

Thread 1 "freeciv-qt" received signal SIGSEGV, Segmentation fault.
send_goto_route () at ../../client/goto.c:1897
1897      goto_map_unit_iterate(goto_maps, goto_map, punit) {
(gdb) p goto_maps
$1 = (struct goto_map_list *) 0x0
(gdb) p goto_map
$2 = (struct goto_map *) 0x20
(gdb) p punit
$3 = <optimized out>

Actions

Also available in: Atom PDF