View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002681VCMIRandom Map Generatorpublic2017-05-26 15:402017-05-27 12:59
Assigned ToWarmonger 
PlatformOSOS Version
Product Version0.99 
Target VersionFixed in 
Summary0002681: RMG crash when used creatures with zero AIValue
DescriptionIn CRmgTemplateZone::addAllPossibleObjects there is "creatureToCount" lamba that using float for "creaturesAmount" and if AIValue is zero then it's going to become +infinity which of course cause crash on rounding.

This particularly occurs with WoG mod enabled. So this have to be fixed OR we should just forbid to add creatures with zero AIValue and trigger error on loading.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
SXX (administrator)
2017-05-26 16:11

Warmonger since RMG is your code it's up to you to decide how to handle that, but probably we should require AIValue for all loaded creatures.
SXX (administrator)
2017-05-26 19:23

So just to be clear I suppose I stuck into that one due to some other resource loading priority problem on Linux and WoG actually have AIValue somewhere in assets and just not in JSON. Would still prefer if this one fixed.
Warmonger (administrator)
2017-05-27 09:11

Surely json should not allow 0 AI value.
Warmonger (administrator)
2017-05-27 12:47

Now interesting part: CRTRAITS.txt contains NOT_USED CREATURES, which indeed have 0 value. They should never show up, though.
Warmonger (administrator)
2017-05-27 12:59

Added some sanity checks in [^]

Can't really test, this should never occur in a game without bugged mods.

- Issue History
Date Modified Username Field Change
2017-05-26 15:40 SXX New Issue
2017-05-26 15:40 SXX Status new => assigned
2017-05-26 15:40 SXX Assigned To => Warmonger
2017-05-26 16:11 SXX Note Added: 0007047
2017-05-26 19:23 SXX Note Added: 0007049
2017-05-27 09:11 Warmonger Note Added: 0007052
2017-05-27 12:47 Warmonger Note Added: 0007053
2017-05-27 12:59 Warmonger Note Added: 0007054
2017-05-27 12:59 Warmonger Status assigned => resolved
2017-05-27 12:59 Warmonger Fixed in Version =>
2017-05-27 12:59 Warmonger Resolution open => fixed

Site | Forums | Wiki | Slack | GitHub

Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean