Project

General

Profile

Actions

Bug #1695

open

SIGSEGV from NULL punit->goto_tile

Added by John Robertson 10 days ago. Updated 4 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Server
Target version:
-
Start date:
09/29/2025
Due date:
% Done:

0%

Estimated time:

Description

[3.3.90.5-dev]
Occasionally, especially in a long game, goto units get stuck in "G" goto mode, but going nowhere. This seems to be some downstream fallout. This fix does not address how the pointer gets set to null, just guards against the use of a NULL pointer.


Files

1695.patch (1.23 KB) 1695.patch John Robertson, 09/29/2025 04:03 AM
Actions #1

Updated by John Robertson 10 days ago

Actions #2

Updated by John Robertson 10 days ago

In case it ends up helpful, here is the back trace of the stack:

#0  invasion_funct (ait=ait@entry=0x555555b09260 <ai_types>, punit=punit@entry=0x5556123c2bd0, dest=dest@entry=true, radius=radius@entry=0, which=0) at ../../../ai/default/daiunit.c:1037

#1  find_something_to_kill (ait=ait@entry=0x555555b09260 <ai_types>, pplayer=pplayer@entry=0x55560c4871f0, 
    punit=punit@entry=0x55556137b4c0, pdest_tile=pdest_tile@entry=0x7fffffffd570, ppath=ppath@entry=0x7fffffffd578, 
    pferrymap=pferrymap@entry=0x0, pferryboat=0x7fffffffd580, pboattype=0x0, pmove_time=0x0) at ../../../ai/default/daiunit.c:1251

#2  dai_military_attack (ait=ait@entry=0x555555b09260 <ai_types>, pplayer=pplayer@entry=0x55560c4871f0, 
    punit=punit@entry=0x55556137b4c0) at ../../../ai/default/daiunit.c:1797

#3  dai_manage_military (ait=0x555555b09260 <ai_types>, nmap=<optimized out>, pplayer=0x55560c4871f0, 
    punit=0x55556137b4c0) at ../../../ai/default/daiunit.c:2590

#4  dai_manage_units (ait=ait@entry=0x555555b09260 <ai_types>, pplayer=pplayer@entry=0x55560c4871f0)
    at ../../../ai/default/daiunit.c:2917

#5  dai_do_first_activities (ait=0x555555b09260 <ai_types>, pplayer=pplayer@entry=0x55560c4871f0)
    at ../../../ai/default/daihand.c:757

#6  cai_do_first_activities (pplayer=0x55560c4871f0) at ../../../ai/classic/classicai.c:450
#7  ai_start_phase () at ../../server/srv_main.c:1144
#8  begin_phase (is_new_phase=<optimized out>) at ../../server/srv_main.c:1398
#9  srv_running () at ../../server/srv_main.c:2948
#10 srv_main () at ../../server/srv_main.c:3604
#11 main (argc=<optimized out>, argv=0x7fffffffdb88) at ../../server/srv_entrypoint.c:362

Actions #3

Updated by Marko Lindqvist 8 days ago

Do you have a savegame where this can be easily reproduced?

Actions #4

Updated by John Robertson 4 days ago

regrets, I have recently deleted it. I will change my habit and start attaching them.
(It probably has around 10K units, that I am playing around with.)

Actions #5

Updated by John Robertson 4 days ago

If I find this symptom in set I am working with now, I will upload it.

Actions

Also available in: Atom PDF