MantisBT - VCMI
View Issue Details
0001817VCMIRandom Map Generatorpublic2014-06-28 20:322022-04-12 09:17
AlienX 
Warmonger 
normalmajoralways
closedfixed 
PCWin 7x64
0.95c 
0.97 
0001817: crash when clicking "1" button in RMG setup
VCMI crashes (Windows APPCRASH) when you click "1" button in "Human or Computer players" or "Computer only players" section when setting up random map generator.
Click "1" button in random map generator setup.
At the moment of crash console says:
Assertion failed: (value >=2 && value <=PlayerColor::PLAYER_LIMIT_I) || value == RANDOM_SIZE, file rmg\CMapGenOptions.cpp, line 68
No tags attached.
Issue History
2014-06-28 20:32AlienXNew Issue
2014-11-14 10:44WarmongerNote Added: 0005098
2014-11-14 10:44WarmongerStatusnew => resolved
2014-11-14 10:44WarmongerFixed in Version => 0.97b
2014-11-14 10:44WarmongerResolutionopen => fixed
2014-11-14 10:44WarmongerAssigned To => Warmonger
2014-11-14 11:02WarmongerFixed in Version0.97b => 0.97
2014-12-22 10:10SXXNote Added: 0005248
2015-01-25 10:57SXXNote Added: 0005394
2015-01-26 06:27SXXNote Edited: 0005394bug_revision_view_page.php?bugnote_id=5394#r2798
2022-04-12 09:17PovelitelStatusresolved => closed

Notes
(0005098)
Warmonger   
2014-11-14 10:44   
Already fixed in 0.97.
(0005248)
SXX   
2014-12-22 10:10   
Just want to note, that if "Human of Computer players" set to random (it's this way by default) then click on any number in "Computer only players" still cause crash.

There also several other ways to make it crash so looks like this code require some attention.
(0005394)
SXX   
2015-01-25 10:57   
(edited on: 2015-01-26 06:27)
So at moment crash occur as described above because assert check don't pass in CMapGenOptions::CPlayerSettings::setColor when client attempt to reset players.