MantisBT - VCMI
View Issue Details
0001008VCMIAI - Adventure Mappublic2012-06-15 19:422014-05-30 17:41
greg3ll 
Tow 
highcrashalways
closedfixed 
pc x64win7 sp1
0.89 
0.9 
0001008: Crash while ending turn
The game crashing while changing turn.
I've get that crashes many times, but i couldn't reproduce them until now.
just load my save game and do nothing, just end turn TWO times. i checked this issue on two versions: official 0.89 and on r2757.
No tags attached.
has duplicate 0001011closed Tow The computer goes into an infinite loop 
7z err.7z (175,049) 2012-06-15 19:42
https://bugs.vcmi.eu/file_download.php?file_id=973&type=bug
Issue History
2012-06-15 19:42greg3llNew Issue
2012-06-15 19:42greg3llStatusnew => assigned
2012-06-15 19:42greg3llAssigned To => Tow
2012-06-15 19:42greg3llFile Added: err.7z
2012-06-15 21:53douggie_mNote Added: 0002696
2012-06-15 22:00douggie_mNote Added: 0002698
2012-06-18 17:28KeloraenNote Added: 0002748
2012-06-18 17:32douggie_mNote Added: 0002749
2012-06-23 15:54IvanRelationship addedhas duplicate 0001011
2012-06-30 23:51TowNote Added: 0002781
2012-06-30 23:51TowStatusassigned => resolved
2012-06-30 23:51TowFixed in Version => 0.9
2012-06-30 23:51TowResolutionopen => fixed
2014-05-30 17:41beegeeStatusresolved => closed

Notes
(0002696)
douggie_m   
2012-06-15 21:53   
Hmm... I got it too — http://bugs.vcmi.eu/view.php?id=1001#c2695 [^]
Thanks for endian-little saved game too.
(0002698)
douggie_m   
2012-06-15 22:00   
Backtrace from my side:

----------------------------------------
Opening VCAI
Loaded VCAI
Opening VCAI
Loaded VCAI
Opening VCAI
Loaded VCAI
Opening StupidAI
Loaded Stupid AI 0.1
CStupidAI [0x10e7bc60]: created
CStupidAI [0x10e7bc60]: init called, saving ptr to IBattleCallback
[New Thread 0xf35ff450 (LWP 20224)]
[New Thread 0xec3ff450 (LWP 20225)]
Player 4 starting turn
        Striving to goal of type WIN
                Considering goal WIN
                Decomposing goal of type WIN
                Considering goal CONQUER
                Decomposing goal of type CONQUER

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xec3ff450 (LWP 20225)]
0x0f9057e0 in ArmyDescriptor::getStrength() const () from /usr/lib/vcmi/libvcmi.so.0
(gdb) bt
#0 0x0f9057e0 in ArmyDescriptor::getStrength() const () from /usr/lib/vcmi/libvcmi.so.0
#1 0x0c113d30 in evaluateDanger(CGObjectInstance const*) () from /usr/lib/vcmi/AI/libVCAI.so
0000002 0x0c1138fc in evaluateDanger(int3 const&, CGHeroInstance const*) () from /usr/lib/vcmi/AI/libVCAI.so
0000003 0x0c11acd8 in isSafeToVisit(CGHeroInstance const*, int3 const&) () from /usr/lib/vcmi/AI/libVCAI.so
0000004 0x0c129504 in CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}::operator()(CGObjectInstance const*) const ()
   from /usr/lib/vcmi/AI/libVCAI.so
0000005 0x0c13a65c in __gnu_cxx::__normal_iterator<CGObjectInstance const**, std::vector<CGObjectInstance const*, std::allocator<CGObjectInstance const*> > > std::__find_if<__gnu_cxx::__normal_iterator<CGObjectInstance const**, std::vector<CGObjectInstance const*, std::allocator<CGObjectInstance const*> > >, CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}>(CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}, CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}, CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}, std::random_access_iterator_tag) ()
   from /usr/lib/vcmi/AI/libVCAI.so
0000006 0x0c135a1c in __gnu_cxx::__normal_iterator<CGObjectInstance const**, std::vector<CGObjectInstance const*, std::allocator<CGObjectInstance const*> > > std::find_if<__gnu_cxx::__normal_iterator<CGObjectInstance const**, std::vector<CGObjectInstance const*, std::allocator<CGObjectInstance const*> > >, CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}>(CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}, CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}, CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}) () from /usr/lib/vcmi/AI/libVCAI.so
0000007 0x0c131b40 in __gnu_cxx::__normal_iterator<CGObjectInstance const**, std::vector<CGObjectInstance const*, std::allocator<CGObjectInstance const*> > > std::remove_if<__gnu_cxx::__normal_iterator<CGObjectInstance const**, std::vector<CGObjectInstance const*, std::allocator<CGObjectInstance const*> > >, CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}>(CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}, CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}, CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}) () from /usr/lib/vcmi/AI/libVCAI.so
0000008 0x0c12f474 in boost::range_iterator<std::vector<CGObjectInstance const*, std::allocator<CGObjectInstance const*> > >::type boost::range::remove_if<std::vector<CGObjectInstance const*, std::allocator<CGObjectInstance const*> >, CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}>(boost::range_iterator&, CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}) () from /usr/lib/vcmi/AI/libVCAI.so
0000009 0x0c12dac4 in void erase_if<std::vector<CGObjectInstance const*, std::allocator<CGObjectInstance const*> >, CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}>(std::vector<CGObjectInstance const*, std::allocator<CGObjectInstance const*> >&, CGoal::whatToDoToAchieve()::{lambda(CGObjectInstance const*)0000009}) () from /usr/lib/vcmi/AI/libVCAI.so
0000010 0x0c128174 in CGoal::whatToDoToAchieve() () from /usr/lib/vcmi/AI/libVCAI.so
0000011 0x0c121414 in VCAI::striveToGoal(CGoal const&) () from /usr/lib/vcmi/AI/libVCAI.so
0000012 0x0c11858c in VCAI::makeTurnInternal() () from /usr/lib/vcmi/AI/libVCAI.so
0000013 0x0c117e10 in VCAI::makeTurn() () from /usr/lib/vcmi/AI/libVCAI.so
0000014 0x0c1c6e68 in boost::_mfi::mf0<void, VCAI>::operator()(VCAI*) const () from /usr/lib/vcmi/AI/libVCAI.so
0000015 0x0c1c6d24 in void boost::_bi::list1<boost::_bi::value<VCAI*> >::operator()<boost::_mfi::mf0<void, VCAI>, boost::_bi::list0>(boost::_bi::type<void>, boost::_mfi::mf0<void, VCAI>&, boost::_bi::list0&, int) () from /usr/lib/vcmi/AI/libVCAI.so
0000016 0x0c1c6c8c in boost::_bi::bind_t<void, boost::_mfi::mf0<void, VCAI>, boost::_bi::list1<boost::_bi::value<VCAI*> > >::operator()() ()
   from /usr/lib/vcmi/AI/libVCAI.so
0000017 0x0c1c510c in boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void, VCAI>, boost::_bi::list1<boost::_bi::value<VCAI*> > > >::run()
    () from /usr/lib/vcmi/AI/libVCAI.so
0000018 0x0e47340c in ?? () from /usr/lib/libboost_thread.so.1.49.0
0000019 0x0ddfa7b0 in start_thread (arg=<optimized out>) at pthread_create.c:306
0000020 0x0df20930 in clone () at ../sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S:123
----------------------------------------
(0002748)
Keloraen   
2012-06-18 17:28   
I have the same problem. The game crashes after second pressing "End turn".
(0002749)
douggie_m   
2012-06-18 17:32   
> The game crashes after second pressing "End turn".

Hmm... It does crash on *first* end turn, see backtrace above.
(0002781)
Tow   
2012-06-30 23:51   
Should be fixed in r2767.