URL:
  <http://gna.org/bugs/?21894>

                 Summary: Crash in is_my_zoc()
                 Project: Freeciv
            Submitted by: pepeto
            Submitted on: sam. 05 avril 2014 12:15:08 CEST
                Category: general
                Severity: 4 - Important
                Priority: 5 - Normal
                  Status: Ready For Test
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: trunk r24748
         Discussion Lock: Any
        Operating System: None
         Planned Release: 2.6.0

    _______________________________________________________

Details:

When trying a simple city attack, I experimented a segfault in is_my_zoc(). It
looks like this has been added with the implementation of patch #4597.

Attached test savegame and a fix which works for me.


Program received signal SIGSEGV, Segmentation fault.
0x000000000061af38 in is_my_zoc (pplayer=0x175c850, ptile0=<optimized out>)
    at unit.c:1710
1710        if (terrain_has_flag(tile_terrain(ptile), TER_NO_ZOC)) {
(gdb) bt full
#0  0x000000000061af38 in is_my_zoc (pplayer=0x175c850, ptile0=<optimized
out>)
    at unit.c:1710
        _dummy_x = <optimized out>
        ptiledummy_y = 27
        ptile_index = <optimized out>
        ptile_start = <optimized out>
        dummy_y = <optimized out>
        ptile_dummy_x = 49
        _start_dummy_x = 48
        _startdummy_y = 28
        ptile = 0x18eea38
        __FUNCTION__ = "is_my_zoc"
#1  0x000000000063a51d in pf_normal_node_init (pfnm=0x271ed20, node=0x2743760,

    ptile=0x18f04b0) at path_finding.c:300
[...]
(gdb) print *ptile
$2 = {index = 2155, continent = 0, extras = {
    vec = "\000\000\000\000\000\000\000"}, resource_valid = false, 
  resource = 0x0, terrain = 0x0, units = 0x193e5a0, worked = 0x0, owner = 0x0,

  extras_owner = 0x0, claimer = 0x0, label = 0x0, spec_sprite = 0x0}





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: sam. 05 avril 2014 12:15:08 CEST  Name: is_my_zoc.diff  Size: 626 o  
By: pepeto

<http://gna.org/bugs/download.php?file_id=20480>
-------------------------------------------------------
Date: sam. 05 avril 2014 12:15:08 CEST  Name:
freeciv-T0000-Y-4000-manual.sav.gz  Size: 23 ko   By: pepeto

<http://gna.org/bugs/download.php?file_id=20481>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?21894>

_______________________________________________
  Message posté via/par Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to