MantisBT - VCMI
View Issue Details
0002482VCMIRandom Map Generatorpublic2016-09-18 10:172018-03-05 14:07
SXX 
AVS 
normalcrashalways
resolvedfixed 
0.98g 
1.next 
0002482: Crash on second+ usage of RMG due to client memory corruption
Few days ago me ans @AVS found very interesting crash with RMG that can be reproduced each simple time with clang and GCC builds. Just run RNG once, exit to menu and then on 2nd, 3rd (rarely more) run it's will crash in ObjectTemplate::isBlockedAt.

I think we find out that valgrind show memory corruption there, but in the end didn't find what actually cause it.
No tags attached.
Issue History
2016-09-18 10:17SXXNew Issue
2016-09-18 10:17SXXStatusnew => assigned
2016-09-18 10:17SXXAssigned To => SXX
2016-09-18 10:18SXXSeverityminor => crash
2018-03-04 03:53SXXNote Added: 0007467
2018-03-05 14:04AVSAssigned ToSXX => AVS
2018-03-05 14:07AVSNote Added: 0007479
2018-03-05 14:07AVSStatusassigned => resolved
2018-03-05 14:07AVSFixed in Version => 1.next
2018-03-05 14:07AVSResolutionopen => fixed

Notes
(0007467)
SXX   
2018-03-04 03:53   
Yesterday Alex found that corruption occur in CMapGenerator:
zones = tmpl->getZones(); 


Problem is that map template passed as mutable to generator and then after game on such map is finished and gamestate destroyed some of data inside template get corrupted.

So on second generation with same template there no data for map objects.
(0007479)
AVS   
2018-03-05 14:07   
Should be fixed in 26aad172