Follow-up Comment #6, bug #20792 (project freeciv):

On loading the savefile we get


in map_init_topology() [map.c::312]: assertion 'MAP_WIDTH <=
MAP_MAX_LINEAR_SIZE' failed.
Please report this message at http://gna.org/projects/freeciv/
in map_init_topology() [map.c::313]: assertion 'MAP_HEIGHT <=
MAP_MAX_LINEAR_SIZE' failed.
Please report this message at http://gna.org/projects/freeciv/


Relevant map parameters in the savefile are as follows:


"mapsize","XYSIZE","XYSIZE"
"xsize",500,500
"ysize",250,250
"topology","WRAPX|ISO","WRAPX|ISO"


MAP_MAX_LINEAR_SIZE is 512, but MAP_WIDTH and MAP_HEIGHT are defined as
follows:


#define MAP_WIDTH  
  (MAP_IS_ISOMETRIC ? (map.xsize + map.ysize / 2) : map.xsize)
#define MAP_HEIGHT 
  (MAP_IS_ISOMETRIC ? (map.xsize + map.ysize / 2) : map.ysize)


Hence the map size assertion failures (which are reproducible with the default
ruleset, unsurprisingly).

There's clearly a bug here -- the assertion failure and the checks on setting
xsize/ysize are inconsistent -- but I don't know which is correct.

Also don't know yet whether this is the root cause of the same_pos() assertion
failure and segfault. It doesn't seem inconceivable. If not, then it should
become a new ticket.

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


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

Reply via email to