MantisBT - VCMI
View Issue Details
0002020VCMIGUI - Adventure Mappublic2015-01-02 15:032022-04-12 09:17
KroArtem 
SXX 
highmajorhave not tried
closedfixed 
x86_64Ubuntu14.10
0.97b 
0.98g 
0002020: Crash during _my_ hero moving
vcmi marked 0.97c by Warmonger
I was going to move but instead of "running" from point "A" to point "B" my hero did one step, I've repeated command, it did another step, then after coming to the destination the game crashed.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffda449700 (LWP 10341)]
0x00000000004c7add in CTerrainRect::whichTileIsIt (
    this=this@entry=0x7fffd0d6d598, x=@0x7fffda448c50: 470,
    y=@0x7fffda448c60: 331)
    at /build/buildd/vcmi-0.97+git20141227.3838~ubuntu14.10.1/client/windows/CAdvmapInterface.cpp:285
285 /build/buildd/vcmi-0.97+git20141227.3838~ubuntu14.10.1/client/windows/CAdvmapInterface.cpp: Нет такого файла или каталога.
(gdb) bt
#0 0x00000000004c7add in CTerrainRect::whichTileIsIt (
    this=this@entry=0x7fffd0d6d598, x=@0x7fffda448c50: 470,
    y=@0x7fffda448c60: 331)
    at /build/buildd/vcmi-0.97+git20141227.3838~ubuntu14.10.1/client/windows/CAdvmapInterface.cpp:285
#1 0x00000000004ceacd in CTerrainRect::mouseMoved (this=0x7fffd0d6d598,
    sEvent=...)
    at /build/buildd/vcmi-0.97+git20141227.3838~ubuntu14.10.1/client/windows/CAdvmapInterface.cpp:104
0000002 0x0000000000493985 in CGuiHandler::handleMoveInterested (
    this=this@entry=0x93dc40 <GH>, motion=...)
    at /build/buildd/vcmi-0.97+git20141227.3838~ubuntu14.10.1/client/gui/CGuiHandler.cpp:389
0000003 0x0000000000493b0b in CGuiHandler::handleMouseMotion (
    this=this@entry=0x93dc40 <GH>, sEvent=sEvent@entry=0x7fffda448d30)
    at /build/buildd/vcmi-0.97+git20141227.3838~ubuntu14.10.1/client/gui/CGuiHandler.cpp:370
0000004 0x00000000004944a9 in CGuiHandler::fakeMouseMove (this=0x93dc40 <GH>)
    at /build/buildd/vcmi-0.97+git20141227.3838~ubuntu14.10.1/client/gui/CGuiHandler.cpp:409
0000005 0x00000000005e74c7 in CPlayerInterface::doMoveHero (this=0x7fffd0d6e010, h=
    0x7fffd0618d40, path=...)
    at /build/buildd/vcmi-0.97+git20141227.3838~ubuntu14.10.1/client/CPlayerInte---Type <return> to continue, or q <return> to quit---
rface.cpp:2684
0000006 0x00000000005f5c91 in operator()<const CGHeroInstance*&, CGPath&, void> (
    __object=0x7fffd0d6e010, this=0x5e605b8)
    at /usr/include/c++/4.9/functional:569
0000007 __call<void, 0ul, 1ul, 2ul> (__args=<optimized out>, this=0x5e605b8)
    at /usr/include/c++/4.9/functional:1264
0000008 operator()<, void> (this=0x5e605b8) at /usr/include/c++/4.9/functional:1323
0000009 boost::detail::thread_data<std::_Bind<std::_Mem_fn<void (CPlayerInterface::*)(CGHeroInstance const*, CGPath)> (CPlayerInterface*, CGHeroInstance const*, CGPath)> >::run() (this=0x5e60400)
    at /usr/include/boost/thread/detail/thread.hpp:117
0000010 0x00007ffff6ce6d3a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.55.0
0000011 0x00007ffff6ac50a5 in start_thread (arg=0x7fffda449700)
    at pthread_create.c:309
0000012 0x00007ffff3da788d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb)
No tags attached.
duplicate of 0001955closed SXX When running with GDB many rapid clicks / move commands cause client crash 
has duplicate 0002348closed SXX Hotseat: crash on CTerrainRect::whichTileIsIt 
png Снимок экрана от 2015-01-02 17:57:59.png (831,172) 2015-01-02 15:03
https://bugs.vcmi.eu/file_download.php?file_id=2057&type=bug
png
Issue History
2015-01-02 15:03KroArtemNew Issue
2015-01-02 15:03KroArtemStatusnew => assigned
2015-01-02 15:03KroArtemAssigned To => Warmonger
2015-01-02 15:03KroArtemFile Added: Снимок экрана от 2015-01-02 17:57:59.png
2015-01-02 19:38WarmongerNote Added: 0005305
2015-01-02 19:42KroArtemNote Added: 0005306
2015-01-05 00:21SXXNote Added: 0005346
2015-01-06 20:05KroArtemNote Added: 0005352
2015-12-15 08:58SXXRelationship addedhas duplicate 0002348
2015-12-24 13:22SXXRelationship addedduplicate of 0001955
2016-01-09 12:43SXXNote Added: 0006267
2016-01-09 12:43SXXStatusassigned => resolved
2016-01-09 12:43SXXFixed in Version => 0.98g
2016-01-09 12:43SXXResolutionopen => fixed
2016-01-09 12:43SXXAssigned ToWarmonger => SXX
2016-01-10 15:19SXXCategoryMechanics - Adventure Map => GUI - Adventure Map
2022-04-12 09:17PovelitelStatusresolved => closed

Notes
(0005305)
Warmonger   
2015-01-02 19:38   
Savegame plase.
(0005306)
KroArtem   
2015-01-02 19:42   
Sorry, but it wasn't reproducible in one place or after several steps (at least I didn't manage to understand what steps can lead to this crash) so I don't have a savegame for this particular case, but will attach in case it'll happen again.
(0005346)
SXX   
2015-01-05 00:21   
Mine 0001955 and Povelitel's report 0001987 possible related to this one.
For me crash occur if I start to click rapidly.
(0005352)
KroArtem   
2015-01-06 20:05   
A bit more detailed stacktrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd97ef700 (LWP 14899)]
0x00000000004c8470 in CTerrainRect::whichTileIsIt (
    this=this@entry=0x7fffc442b6d0, x=<optimized out>, y=@0x7fffd97eed28: 242)
    at /home/kroartem/SVN/vcmi/client/windows/CAdvmapInterface.cpp:285
285 ret.x = adventureInt->position.x + ((GH.current->motion.x-CGI->mh->offsetX-pos.x)/32);
(gdb) bt
#0 0x00000000004c8470 in CTerrainRect::whichTileIsIt (
    this=this@entry=0x7fffc442b6d0, x=<optimized out>, y=@0x7fffd97eed28: 242)
    at /home/kroartem/SVN/vcmi/client/windows/CAdvmapInterface.cpp:285
#1 0x00000000004cf4ab in CTerrainRect::mouseMoved (this=0x7fffc442b6d0,
    sEvent=...)
    at /home/kroartem/SVN/vcmi/client/windows/CAdvmapInterface.cpp:104
0000002 0x0000000000493f45 in CGuiHandler::handleMoveInterested (
    this=this@entry=0x941cc0 <GH>, motion=...)
    at /home/kroartem/SVN/vcmi/client/gui/CGuiHandler.cpp:389
0000003 0x00000000004940cb in CGuiHandler::handleMouseMotion (
    this=this@entry=0x941cc0 <GH>, sEvent=sEvent@entry=0x7fffd97eed10)
    at /home/kroartem/SVN/vcmi/client/gui/CGuiHandler.cpp:370
0000004 0x0000000000494b3f in CGuiHandler::fakeMouseMove (this=0x941cc0 <GH>)
    at /home/kroartem/SVN/vcmi/client/gui/CGuiHandler.cpp:409
0000005 0x00000000005e8277 in CPlayerInterface::doMoveHero (this=0x7fffc442afe0, h=
    0x7fffcf143370, path=...)
    at /home/kroartem/SVN/vcmi/client/CPlayerInterface.cpp:2684
0000006 0x00000000005f6be1 in operator()<const CGHeroInstance*&, CGPath&, void> (
    __object=0x7fffc442afe0, this=0x343bac8)
    at /usr/include/c++/4.9/functional:569
0000007 __call<void, 0ul, 1ul, 2ul> (__args=<optimized out>, this=0x343bac8)
    at /usr/include/c++/4.9/functional:1264
0000008 operator()<, void> (this=0x343bac8) at /usr/include/c++/4.9/functional:1323
---Type <return> to continue, or q <return> to quit---
0000009 boost::detail::thread_data<std::_Bind<std::_Mem_fn<void (CPlayerInterface::*)(CGHeroInstance const*, CGPath)> (CPlayerInterface*, CGHeroInstance const*, CGPath)> >::run() (this=0x343b910)
    at /usr/include/boost/thread/detail/thread.hpp:117
0000010 0x00007ffff6cc3d3a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.55.0
0000011 0x00007ffff6aa20a5 in start_thread (arg=0x7fffd97ef700)
    at pthread_create.c:309
0000012 0x00007ffff3d1088d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(0006267)
SXX   
2016-01-09 12:43   
Fixed:
https://github.com/vcmi/vcmi/commit/46e3d849af7bc198032deaea4e650c45af01de4f [^]