MantisBT - VCMI
View Issue Details
0000848VCMIMechanics - Adventure Mappublic2012-01-13 12:032014-05-30 17:40
Ivan 
Tow 
normalcrashsometimes
closedfixed 
 
0.88 
0000848: Chance to crash on new month (probably on double-growth month)
Reproduced on map "Carpe Diem" 3-4 times out of 7-8.
Server have notable chance to crash on new month. Most possibly due to double-growth - got normal growth on all non-crashed cases.
No tags attached.
related to 0000768closed Tow Invisible spawning monsters are still here 
related to 0000759closed Tow Game crashes on week of double growth 
has duplicate 0000774closed Tow crash on autosave 
Issue History
2012-01-13 12:03IvanNew Issue
2012-01-13 16:15WarmongerRelationship addedrelated to 0000768
2012-01-13 16:17WarmongerRelationship addedrelated to 0000759
2012-02-20 20:59TowNote Added: 0002204
2012-02-20 20:59TowAssigned To => Tow
2012-02-20 20:59TowStatusnew => feedback
2012-02-20 22:49IvanNote Added: 0002207
2012-02-20 22:49IvanStatusfeedback => assigned
2012-02-20 23:05TowNote Added: 0002208
2012-02-20 23:05TowStatusassigned => feedback
2012-02-21 11:36IvanNote Added: 0002209
2012-02-21 11:36IvanStatusfeedback => assigned
2012-02-21 11:36IvanStatusassigned => resolved
2012-02-21 11:36IvanFixed in Version => 0.89
2012-02-21 11:36IvanResolutionopen => fixed
2012-02-21 15:49TowRelationship addedhas duplicate 0000774
2014-05-30 17:40beegeeStatusresolved => closed

Notes
(0002204)
Tow   
2012-02-20 20:59   
I'm not able to reproduce the issue. I've tried waiting for the new month on Carpe Diem map and forcing double growth month but it worked correctly.

If it's still appearing, could please provide a savegame that can be used to reproduce and/or more info about the crash (like stacktrace)?
(0002207)
Ivan   
2012-02-20 22:49   
Still happens, crash on server:
(gdb) bt
#0 0x000000000057e3be in int3::operator= (this=0x11b0adc, val=...) at /home/ivan/src/vcmi/src/server/../lib/int3.h:21
#1 0x00000000005cca4a in std::swap<int3> (__a=..., __b=...) at /usr/include/c++/4.6/bits/move.h:128
0000002 0x00000000005bbc1d in std::__iter_swap<true>::iter_swap<__gnu_cxx::__normal_iterator<int3*, std::vector<int3, std::allocator<int3> > >, __gnu_cxx::__normal_iterator<int3*, std::vector<int3, std::allocator<int3> > > > (__a=..., __b=...)
    at /usr/include/c++/4.6/bits/stl_algobase.h:102
0000003 0x00000000005a5ac6 in std::iter_swap<__gnu_cxx::__normal_iterator<int3*, std::vector<int3, std::allocator<int3> > >, __gnu_cxx::__normal_iterator<int3*, std::vector<int3, std::allocator<int3> > > > (__a=..., __b=...)
    at /usr/include/c++/4.6/bits/stl_algobase.h:139
0000004 0x0000000000592acc in std::random_shuffle<__gnu_cxx::__normal_iterator<int3*, std::vector<int3, std::allocator<int3> > >, long (*&)(long)>(__gnu_cxx::__normal_iterator<int3*, std::vector<int3, std::allocator<int3> > >, __gnu_cxx::__normal_iterator<int3*, std::vector<int3, std::allocator<int3> > >, long (*&&&)(long)) (__first=..., __last=...,
    __rand=@0x927f30) at /usr/include/c++/4.6/bits/stl_algo.h:5108
0000005 0x000000000057a640 in CGameHandler::spawnWanderingMonsters (this=0x7fffb4ee4e00, creatureID=4)
    at /home/ivan/src/vcmi/src/server/CGameHandler.cpp:5611
0000006 0x000000000055afd0 in CGameHandler::newTurn (this=0x7fffb4ee4e00)
    at /home/ivan/src/vcmi/src/server/CGameHandler.cpp:1103
0000007 0x000000000055bff9 in CGameHandler::run (this=0x7fffb4ee4e00, resume=false)
    at /home/ivan/src/vcmi/src/server/CGameHandler.cpp:1244
0000008 0x000000000060f3ca in CVCMIServer::loadGame (this=0x7fffb4ee51f0)
    at /home/ivan/src/vcmi/src/server/CVCMIServer.cpp:509
0000009 0x000000000060ed2e in CVCMIServer::start (this=0x7fffb4ee51f0)
    at /home/ivan/src/vcmi/src/server/CVCMIServer.cpp:443
0000010 0x000000000060f629 in main (argc=2, argv=0x7fffb4ee5368) at /home/ivan/src/vcmi/src/server/CVCMIServer.cpp:538
(0002208)
Tow   
2012-02-20 23:05   
Thank you, that helped. :)
The function under p_myrandom was apparently incorrect. Does r2549 fix the issue?
(0002209)
Ivan   
2012-02-21 11:36   
Looks to be fixed - no crash, new wandering monsters spawned correctly.