MantisBT - VCMI
View Issue Details
0000960VCMIGUI - Battlespublic2012-05-18 10:532012-05-22 17:21
douggie_m 
Tow 
normalcrashalways
closedfixed 
PowerPCGNU/LinuxDebian Sid
 
0.89 
0000960: Server segfaults on the beginning of any battle
Segfault on each battle:

--------------------------------
Warning: empty path found...
Segmentation fault
Server finished
Lost connection to server, ending listening thread!
read: End of file
Something wrong, lost connection while game is still ongoing...
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what(): read: End of file
Aborted
--------------------------------
$ ps -A | grep vcmiserver
 2309 pts/4 00:00:01 vcmiserver
...
(gdb) attach 2309
...
(gdb) c
...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf6eff450 (LWP 2500)]
0x0f7fdc48 in BattleInfo::setupBattle (tile=..., terrain=3, terType=11,
    armies=0x104285b8, heroes=0x104285c0, creatureBank=false, town=0x0)
    at BattleState.cpp:1753
1753 creatureBank ? commanderBank[i] : commanderField[i]);
(gdb) bt
#0 0x0f7fdc48 in BattleInfo::setupBattle (tile=..., terrain=3, terType=11,
    armies=0x104285b8, heroes=0x104285c0, creatureBank=false, town=0x0)
    at BattleState.cpp:1753
#1 0x0f90fc90 in CGameState::setupBattle (this=0x10840e80, tile=...,
    armies=0x104285b8, heroes=0x104285c0, creatureBank=false, town=0x0)
    at CGameState.cpp:787
0000002 0x10172a50 in CGameHandler::setupBattle (this=0x108408e0, tile=...,
    armies=0x104285b8, heroes=0x104285c0, creatureBank=false, town=0x0)
    at CGameHandler.cpp:1464
0000003 0x101697a4 in CGameHandler::startBattle(CArmedInstance const**, int3, CGHeroInstance const**, bool, boost::function<void (BattleResult*)>, CGTownInstance const*) (this=0x108408e0, armies=0x104285b8, tile=...,
    heroes=0x104285c0, creatureBank=false, cb=..., town=0x0)
    at CGameHandler.cpp:372
0000004 0x10295774 in boost::_mfi::mf6<void, CGameHandler, CArmedInstance const**, int3, CGHeroInstance const**, bool, boost::function<void (BattleResult*)>, CGTownInstance const*>::operator()(CGameHandler*, CArmedInstance const**, int3, CGHeroInstance const**, bool, boost::function<void (BattleResult*)>, CGTownInstance const*) const (this=0x10958bd4, p=0x108408e0, a1=0x104285b8,
    a2=..., a3=0x104285c0, a4=false, a5=..., a6=0x0)
    at /usr/include/boost/bind/mem_fn_template.hpp:732
0000005 0x10295334 in boost::_bi::list7<boost::_bi::value<CGameHandler*>, boost::_bi::value<CArmedInstance const**>, boost::_bi::value<int3>, boost::_bi::value<CGHeroInstance const**>, boost::_bi::value<bool>, boost::_bi::value<boost::function<void (BattleResult*)> >, boost::_bi::value<CGTownInstance const*> >::operator()<boost::_mfi::mf6<void, CGameHandler, CArmedInstance const**, int3, CGHeroInstance const**, bool, boost::function<void (BattleResult*)>, CGTownInstance const*>, boost::_bi::list0>(boost::_bi::type<void>, boost::_mfi::mf6<void, CGameHandler, CArmedInstance const**, int3, CGHeroInstance const**, bool, boost::function<void (BattleResult*)>, CGTownInstance const*>&, boost::_bi::list0&, int) (this=0x10958bdc, f=..., a=...)
    at /usr/include/boost/bind/bind.hpp:670
0000006 0x10295144 in boost::_bi::bind_t<void, boost::_mfi::mf6<void, CGameHandler, CArmedInstance const**, int3, CGHeroInstance const**, bool, boost::function<void (BattleResult*)>, CGTownInstance const*>, boost::_bi::list7<boost::_bi::value<CGameHandler*>, boost::_bi::value<CArmedInstance const**>, boost::_bi::value<int3>, boost::_bi::value<CGHeroInstance const**>, boost::_bi::value<bool>, boost::_bi::value<boost::function<void (BattleResult*)> >, boost::_bi::value<CGTownInstance const*> > >::operator()() (this=0x10958bd4)
    at /usr/include/boost/bind/bind_template.hpp:20
0000007 0x10292858 in boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf6<void, CGameHandler, CArmedInstance const**, int3, CGHeroInstance const**, bool, boost::function<void (BattleResult*)>, CGTownInstance const*>, boost::_bi::list7<boost::_bi::value<CGameHandler*>, boost::_bi::value<CArmedInstance const**>, boost::_bi::value<int3>, boost::_bi::value<CGHeroInstance const**>, boost::_bi::value<bool>, boost::_bi::value<boost::function<void (BattleResult*)> >, boost::_bi::value<CGTownInstance const*> > > >::run() (
    this=0x10958ad0) at /usr/include/boost/thread/detail/thread.hpp:62
0000008 0x0f25d40c in ?? () from /usr/lib/libboost_thread.so.1.49.0
0000009 0x0f21c7b0 in start_thread (arg=<optimized out>) at pthread_create.c:306
0000010 0x0ed3fb10 in clone ()
    at ../sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S:123
--------------------------------
Always reproducible. Just begin any map, and start any battle.
It is not present in 0.88 release tarball.
As Ivan said, it ``Looks like commanders issue.''
No tags attached.
png Screenshot - 05212012 - 12:35:05 PM.png (1,169,025) 2012-05-21 16:36
https://bugs.vcmi.eu/file_download.php?file_id=942&type=bug
Issue History
2012-05-18 10:53douggie_mNew Issue
2012-05-18 11:25IvanNote Added: 0002492
2012-05-21 16:35douggie_mNote Added: 0002516
2012-05-21 16:36douggie_mFile Added: Screenshot - 05212012 - 12:35:05 PM.png
2012-05-21 16:37douggie_mNote Edited: 0002516bug_revision_view_page.php?bugnote_id=2516#r1653
2012-05-21 22:30TowNote Added: 0002517
2012-05-21 22:30TowStatusnew => closed
2012-05-21 22:30TowAssigned To => Tow
2012-05-21 22:30TowResolutionopen => no change required
2012-05-22 16:43douggie_mNote Added: 0002521
2012-05-22 16:43douggie_mStatusclosed => feedback
2012-05-22 16:43douggie_mResolutionno change required => reopened
2012-05-22 16:45douggie_mNote Edited: 0002521bug_revision_view_page.php?bugnote_id=2521#r1655
2012-05-22 17:21WarmongerNote Added: 0002524
2012-05-22 17:21WarmongerStatusfeedback => closed
2012-05-22 17:21WarmongerResolutionreopened => fixed
2012-05-22 17:21WarmongerFixed in Version => 0.89

Notes
(0002492)
Ivan   
2012-05-18 11:25   
As I said - update configuration files.
Your files in vcmi data directory at /usr/(local/)share/vcmi/config are from 0.88
Copy or create symlink to current files which are at /path/to/source/config directory
(0002516)
douggie_m   
2012-05-21 16:35   
(edited on: 2012-05-21 16:37)
I tried to

# rm -rf /usr/share/vcmi/config
# cp -r ~username/Development/VCMI/vcmi-svn/config /usr/share/vcmi/

and the issue has been magically resolved.

If such case of segfaulting is okay, the issue may be closed.

(0002517)
Tow   
2012-05-21 22:30   
Thanks for feedback, closing.
(0002521)
douggie_m   
2012-05-22 16:43   
(edited on: 2012-05-22 16:45)
I will just post how to make /usr/share/vcmi/config to be included in the installation tarball, okay?

make install DESTDIR=`pwd`/__dest
cd __dest
mkdir -p ./usr/share/vcmi && cp -r ../config ./usr/share/vcmi/

Also, maybe it does worth it to include stuff like that inside Makefile's install target.

UPD: By the way, how to close the bug again? Or is this possible only for moderators?

(0002524)
Warmonger   
2012-05-22 17:21   
Unfortunatelly. That's why we have so many reports still open :P