MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001141VCMIModspublic2012-10-09 11:562013-01-19 20:37
Reporterq4a 
Assigned ToWarmonger 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
Platformx86OSWindowsOS VersionXP SP3
Product Version 
Target VersionFixed in Version 
Summary0001141: Removing hero id=155 (or any) from trunk\config\heroes.json lead to crash
DescriptionI'd like to remove some heroes from heroes.json, but if i remove any, for example, i got crash =(
Looks lite, that crash happens in CHeroHandler.cpp's function CHeroHandler::initHeroClasses().
Variable heroes.size() always = 156 and cycle trying to read nonexistent record.
Steps To ReproduceRemove hero id=155 (or any) from trunk\config\heroes.json and run vcmi
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0003174)
Warmonger (administrator)
2012-10-09 12:12

Size of original config file is hardcoded for a reason. Also, there is no way to handle missing heroes in original maps (for example in campaigns, prisons).
(0003175)
q4a (reporter)
2012-10-09 12:22

Ok, now i saw in trunk\lib\GameConstants.h:
const int ARTIFACTS_QUANTITY=171;
const int HEROES_QUANTITY=156;
...

and that's ok. Original number of heroes can't be modified.
I just think, that heroes.size()=156 because of id number from heroes.json.

Issue can be closed.
(0003286)
AlexVinS (developer)
2013-01-19 20:37

closed by request of reporter

- Issue History
Date Modified Username Field Change
2012-10-09 11:56 q4a New Issue
2012-10-09 12:12 Warmonger Note Added: 0003174
2012-10-09 12:12 Warmonger Assigned To => Warmonger
2012-10-09 12:12 Warmonger Status new => acknowledged
2012-10-09 12:22 q4a Note Added: 0003175
2013-01-19 20:37 AlexVinS Note Added: 0003286
2013-01-19 20:37 AlexVinS Status acknowledged => closed
2013-01-19 20:37 AlexVinS Resolution open => no change required

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean