Anonymous | Login | 2024-11-23 10:17 UTC |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0002681 | VCMI | Random Map Generator | public | 2017-05-26 15:40 | 2017-05-27 12:59 | ||||||||
Reporter | SXX | ||||||||||||
Assigned To | Warmonger | ||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||
Status | resolved | Resolution | fixed | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | 0.99 | ||||||||||||
Target Version | Fixed in Version | 1.next | |||||||||||
Summary | 0002681: RMG crash when used creatures with zero AIValue | ||||||||||||
Description | In 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. | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files | |||||||||||||
Notes | |
(0007047) 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. |
(0007049) 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. |
(0007052) Warmonger (administrator) 2017-05-27 09:11 |
Surely json should not allow 0 AI value. |
(0007053) 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. |
(0007054) Warmonger (administrator) 2017-05-27 12:59 |
Added some sanity checks in https://github.com/vcmi/vcmi/commit/346d2ac588b62e65a8aa8e140acf5adf9661a6b9 [^] 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 | => 1.next |
2017-05-27 12:59 | Warmonger | Resolution | open => fixed |
Copyright © 2000 - 2024 MantisBT Team |