MantisBT - VCMI
View Issue Details
0001955VCMIGUI - Adventure Mappublic2014-11-19 01:572022-04-12 11:04
SXX 
SXX 
normalcrashalways
closedfixed 
PCUbuntu Linux14.04
0.97 
0.98g 
0001955: When running with GDB many rapid clicks / move commands cause client crash
This can be only reproduced with debugger attached. As far as I understand this might happen because game spawn new thread for each pathfinding action and GDB likely increase delay between it's spawn and exit.

Though this might indicate there is unsafe code that under certain conditions can cause crash without debugger so I decide to report it.
  - Load game executable with GDB on Linux as "gdb vcmiclient".
  - In gdb console type "r" to run game.
  - Go to single player and start on any map. Though map to have enough hero movement.
  - Use all hero movement points as you like.
  - Now choose any pathable tile around.
  - Start to rapidly give move commands on it.
  - You should see new threads spawn/exit in console:
[New Thread 0x7fffe216d700 (LWP 6026)]
[Thread 0x7fffe216d700 (LWP 6026) exited]
[New Thread 0x7fffe216d700 (LWP 6028)]
[Thread 0x7fffe216d700 (LWP 6028) exited]


  - At some speed of clicks client will crash.
Current version from ppa:vcmi/ppa: 0.97+git20141118.3792~ubuntu14.04.1
As before all mods except "VCMI essential files" are disabled.
No tags attached.
has duplicate 0002348closed SXX Hotseat: crash on CTerrainRect::whichTileIsIt 
has duplicate 0002020closed SXX Crash during _my_ hero moving 
has duplicate 0002249closed SXX After doubleclick on map object game crashed 
txt vcmiclient_gdb_crash.txt (2,648) 2014-11-19 01:57
https://bugs.vcmi.eu/file_download.php?file_id=1979&type=bug
txt server_log.txt (2,745) 2014-11-19 01:58
https://bugs.vcmi.eu/file_download.php?file_id=1980&type=bug
txt VCMI_Client_log.txt (669,218) 2014-11-19 01:58
https://bugs.vcmi.eu/file_download.php?file_id=1981&type=bug
txt VCMI_Server_log.txt (201,066) 2014-11-19 01:58
https://bugs.vcmi.eu/file_download.php?file_id=1982&type=bug
Issue History
2014-11-19 01:57SXXNew Issue
2014-11-19 01:57SXXFile Added: vcmiclient_gdb_crash.txt
2014-11-19 01:58SXXFile Added: server_log.txt
2014-11-19 01:58SXXFile Added: VCMI_Client_log.txt
2014-11-19 01:58SXXFile Added: VCMI_Server_log.txt
2014-11-22 19:08SXXProduct Version => 0.97
2015-12-24 13:22SXXRelationship addedhas duplicate 0002348
2015-12-24 13:22SXXRelationship addedhas duplicate 0002020
2016-01-09 12:41SXXNote Added: 0006266
2016-01-09 12:41SXXStatusnew => resolved
2016-01-09 12:41SXXFixed in Version => 0.98g
2016-01-09 12:41SXXResolutionopen => fixed
2016-01-09 12:41SXXAssigned To => SXX
2016-01-10 15:19SXXCategoryMechanics - Adventure Map => GUI - Adventure Map
2016-09-12 03:42SXXRelationship addedhas duplicate 0002249
2022-04-12 11:04PovelitelStatusresolved => closed

Notes
(0006266)
SXX   
2016-01-09 12:41   
Fixed:
https://github.com/vcmi/vcmi/commit/46e3d849af7bc198032deaea4e650c45af01de4f [^]

Mouse handling code still need improvement, but it's shouldn't crash.