Code review comment for lp:~widelands-dev/widelands/bug-1783878_editor_random_map_tribe

Klaus Halfmann (klaus-halfmann) wrote :

Checked out and compiled the branch, reproduced the bug on trunk.
(SEGV on unknown address 0x0000000000f0 ...)

This version loads the map without any hazzles.

* Bug: when creating a new Random Map (after loading one)
  the number of players is stuck at 2
  and cannot be increased unless in is decreased

* Bug(?): Creating a new Random map (after wokaround above) and then opeing the player
   dialog fails with an Assertion
   WidelandsMapLoader::load_map_complete() for 'Radom42' took 216ms
============== Generating Map ==============
ID: bw6g-v7c3-gxc2-sans-t4ys-muda
Random number: 42
Dimensions: 80 x 80
Players: 3
World: greenland
Resources: high
Land: 0,50 Water: 0,20 Wasteland: 0,10
Using Island Mode

WARNING: Could not find a suitable place for player 2
WARNING: Could not find a suitable place for player 3
atlanteans trainingsites: We have used up 100% on 2 sites, there are 0 without
barbarians trainingsites: We have used up 100% on 2 sites, there are 0 without
empire trainingsites: We have used up 100% on 3 sites, there are 0 without
frisians trainingsites: We have used up 100% on 2 sites, there are 0 without
Assertion failed: (p <= get_nrplayers()), function get_scenario_player_tribe, file .../bug-1783878_editor_random_map_tribe/src/logic/map.cc, line 411.
Abort trap: 6

Can be reproduced by recreating the map via the ID: bw6g-v7c3-gxc2-sans-t4ys-muda

Code looks ok for me, otherwise.

review: Needs Fixing

« Back to merge proposal