MantisBT - VCMI
View Issue Details
0002292VCMIOtherpublic2015-10-08 19:312022-04-12 09:17
SXX 
SXX 
normalminoralways
closedfixed 
0.98d 
0.98f 
0002292: When run under Qt Creator debugger some log entries being sent via sentMessage
There is tricky problem that unlikely fault of VCMI, but still related so I post it here. When game run in debugger all logs are dumped into output, but for some reason code that handle input consider it as something user sent and try to sent it in chat "client/CMT.cpp:790".

This become a problem because messages are sent from player interfaces, but when server process AI player turn those are identified "fishy" that cause recursion messages being sent.
No tags attached.
Issue History
2015-10-08 19:31SXXNew Issue
2015-11-08 18:13SXXAssigned To => SXX
2015-11-08 18:13SXXStatusnew => assigned
2015-11-08 19:28SXXNote Added: 0006074
2015-11-08 19:28SXXStatusassigned => resolved
2015-11-08 19:28SXXFixed in Version => 0.98f
2015-11-08 19:28SXXResolutionopen => fixed
2015-11-08 21:16WarmongerNote Added: 0006075
2015-11-08 21:36SXXNote Added: 0006076
2015-11-08 21:37SXXNote Edited: 0006076bug_revision_view_page.php?bugnote_id=6076#r3024
2015-11-08 21:44SXXNote Added: 0006077
2022-04-12 09:17PovelitelStatusresolved => closed

Notes
(0006074)
SXX   
2015-11-08 19:28   
So processCommand is basically problem that cause all "green text" include what appear in battle on Windows too. Though on Windows issue mainly with "532" line.

Considering it's all extremely old debug stuff I'm going comment it out because likely nobody uses it. I don't think any of these functions are useful because chat work in-game now and you can't enter cheats from console anyway.

Of course normal commands to client going to work as fine.

Commit:
https://github.com/vcmi/vcmi/commit/a49950e958d896c02f20cb2332ee748a1a0ca356 [^]
(0006075)
Warmonger   
2015-11-08 21:16   
What do you mean that you can't enter cheats from console? The VCMI Client console certainly allows that.
(0006076)
SXX   
2015-11-08 21:36   
(edited on: 2015-11-08 21:37)
I mean from "stdin", not in-game chat input. It's what you get when you try to send command from stdin:
Cannot realize cheat, no hero selected!
Player 0 sends a message: vcmiistari
System message: Server encountered a problem: Cannot realize cheat, no hero selected!

So it's clearly wasn't working and I'm decide to just comment it altogether in processCommand instead of adding some filtering, etc.

(0006077)
SXX   
2015-11-08 21:44   
Anyway if this functionality (sending cheats from "stdin") needed then it's need to be fixed and check for input need to be added (substr(0,4) == 'vcmi') so it's not going to accept logs from console.