bugFreeciv - Bugs: bug #21625, Mapgenerator crash if no category...

 
 
Show feedback again

bug #21625: Mapgenerator crash if no category Irrigation or Mine extra

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Sun 09 Feb 2014 06:13:08 AM UTC  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: None
Planned Release: 2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 22 Feb 2014 04:02:36 AM UTC, SVN revision 24537:

Fixed a crash on startpos generation when ruleset is missing either of
EC_IRRIGATION or EC_MINE extra for some land terrain.
- Startpos evaluation changed to consider Irrigation and Mine activity only
when it will add an extra, not when it causes terrain transformation.
- tile_irrigate() and tile_mine() check against NULL target extra

See bug #21625

(Browse SVN revision 24537)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 19 Feb 2014 05:00:33 AM UTC, comment #1:

Patch attached:

- Startpos evaluation considers Irrigation and Mine activity only if it will add an extra. 1) Terrain transformations are considered too much work in the beginning of the game for getting startpos improved. 2) Ruleset must have such an extra
- tile_irrigate() and tile_mine() check against NULL target extra, especially as I think they can still legally end up there.

(file #20114)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 09 Feb 2014 06:13:08 AM UTC, original submission:

Noticed while fixing another bug:

Startpos selection code in mapgenerator tries to place Irrigation and Mine to virtual tile to see how such an improvement would help player. It doesn't check that there actually is suitable extra in the ruleset, but happily passes NULL extra to tile_apply_activity() -> tile_mine() / tile_irrigate().

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #20114:  StartposExtras.patch added by cazfi (4kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 22 Feb 2014 04:11:05 AM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Wed 19 Feb 2014 05:00:33 AM UTCcazfiAttached File-=>Added StartposExtras.patch, #20114
      StatusIn Progress=>Ready For Test
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup