MantisBT - VCMI
View Issue Details
0001813VCMIMechanics - Objectspublic2014-06-28 19:532023-04-12 16:59
0001813: Repeated re-entering of teleporter using space bar cause freeze
If you go into a monolith and press the "space bar", and a little to hold him, the game is blocked
No tags attached.
related to 0001066resolved Tow Pressing arrow key to move hero until he/she meets an object to pick may lead to freeze 
related to 0001808closed Ivan hotkeys. taking the resources of the sea 
related to 0000558assigned Chocimier Altar of Sacrifice: Mechanics + GUI issues 
related to 0002220closed  Game crashes after pressing space bar in order to revisit a building or re-use portal 
has duplicate 0002065closed SXX Rapidly repeated entering monolith/subterranean gates cause client freeze 
has duplicate 0002391new  Pressing spacebar somethimes cause crash or freeze. 
has duplicate 0002619closed AVS ocasional game freeze 
related to 0002149assigned SXX in Autoskipe-mode have block if go in events 
Issue History
2014-06-28 19:53PovelitelNew Issue
2014-06-28 19:53PovelitelStatusnew => assigned
2014-06-28 19:53PovelitelAssigned To => Warmonger
2015-02-10 22:23SXXRelationship addedhas duplicate 0002065
2015-02-10 22:31SXXNote Added: 0005443
2015-02-10 22:38FayNote Added: 0005444
2015-02-10 22:55SXXNote Added: 0005446
2015-02-10 22:55SXXNote Edited: 0005446bug_revision_view_page.php?bugnote_id=5446#r2815
2015-02-14 18:23WarmongerAssigned ToWarmonger =>
2015-02-14 18:23WarmongerStatusassigned => new
2015-02-18 18:43FayNote Added: 0005541
2015-02-18 18:57PovelitelNote Added: 0005542
2015-02-18 19:03FayNote Added: 0005543
2015-03-10 19:00SXXSummarymonolith two way => Repeated re-entering of teleporter using space bar cause freeze
2015-03-10 19:00SXXSeverityblock => major
2015-03-11 12:18WarmongerNote Added: 0005613
2015-11-28 19:29SXXNote Added: 0006128
2015-11-28 19:30SXXNote Edited: 0006128bug_revision_view_page.php?bugnote_id=6128#r3045
2015-12-24 14:13SXXStatusnew => confirmed
2015-12-24 14:13SXXRelationship addedrelated to 0001066
2015-12-24 14:14SXXRelationship addedrelated to 0001808
2016-01-21 00:21SXXRelationship addedhas duplicate 0002391
2016-09-12 03:28SXXRelationship addedrelated to 0002149
2016-09-12 03:30SXXRelationship addedrelated to 0000558
2016-09-12 03:38SXXRelationship addedrelated to 0002220
2016-12-04 12:57AVSRelationship addedhas duplicate 0002619
2023-04-12 16:59IvanStatusconfirmed => acknowledged

2015-02-10 22:31   
A bit more info about that in my dupe: 0002065
2015-02-10 22:38   
I checked the logs; just to have it somewhere:
I get "Tiles are not neighboring!", "Got false in applying... that request must have been fishy!" in server log and no "System message: ..." with the same message in the client when the freeze happens.
2015-02-10 22:55   
@Fay It's likely with Monolith. Correct?

Because with subterranean gates I don't have anything useful in server logs at all except normal log like:
01:54:30.364993 DEBUG global [7ffff21c9700] - Hero Josephine visits Subterranean Gate(103:0)
01:54:30.620428 DEBUG global [7ffff21c9700] - Hero Josephine visits Subterranean Gate(103:0)
01:54:30.647011 DEBUG global [7ffff21c9700] - Hero Josephine visits Subterranean Gate(103:0)

2015-02-18 18:43   
I just noticed that there is a "//TODO! possible freeze" comment with explanation in space key handling in CAdvmapInterface, so that's probably the what's happening here ( [^] ).

On the other hand, do we really need to handle "holding space" case in adv map? We could just simply wait for key-up event instead of handling all of those requests. I don't remember any case where holding space would be useful.
2015-02-18 18:57   
"I don't remember any case where holding space would be useful."

My English is very bad. But if I understand correctly, you are saying that the space is useless? That's not it. The space is very useful! Especially in online games. When can I become an object to see how he is well guarded, and then decide whether or not to attack. And you can attack without losing muvpointy.

By the way in the game now can not see what kind of protection in the objects ((
2015-02-18 19:03   
I meant holding space so that the event is triggered multiple times. Like in this bug description. :)
2015-03-11 12:18   
Freeze should not occur no matter what keys players press.
2015-11-28 19:29   
(edited on: 2015-11-28 19:30)
This one is tricky and this problem also related to issue when arrow key buttons may cause freeze. Problem is that client may sent move request before client answer TeleportDialog and this break it.

Correct way to solve this one is to setup lock until movement is done, but it's tricky as explained in client/windows/CAdvmapInterface.cpp:1095
//TODO!!!!!!! possible freeze, when GS mutex is locked and network thread can't apply package
//this thread leaves scope and tries to lock pim while holding gs,
//network thread tries to lock gs (appluy cl) while holding pim
//this thread should first lock pim, however gs locking/unlocking is done inside cb