Help thread

I have a question about the logs (server, VCMI_Server & VCMI_Client) and the console: what is each of them logging? And I’m not looking for a detailed technical answer. I just want to know, depending on the nature of my bug, if it’s best if I always attach both logs and a screenshot of the console to my reports, or are there cases (bug/crash types) when one or the other would be really redundant?


[size=75]On a separate note, I have to say SourceForge is a bit frustrating at times - particularly when you realize you’ve made a mistake and you can’t re-edit your comment. :stuck_out_tongue: :mrgreen: [/size]

Server handles game mechanics, while client presents the game state and accepts user input.
Server and client communicate by sending packages via network. Now when they both are on the same machine local loopback is used but it should be simple to separate them.

Client is logging types of received packages and progress in applying them. Every package is applied in 3 steps: present beginning effect (rarely used), updating game state data, presenting ending effect.

For example, when hero walks on teleporting monolith, “TryMoveHero” package is sent to client. It says something like “hero with id 111 is teleported from tile (11,1,1) to (22,1,1)”.
In the first step client hides hero graphic. In the second phase, hero position in the game data is updated. And, finally, hero graphic is shown (in the new place).
Crashes most often occurs while applying package from server. By checking logs we can say what package caused the problem and (more or less) which part of applying is problematic.

Server analogically logs types of packages received from client. Additionally it’s logs what it’s sending to client (so it’s partially duplicating client log).

Apart from that, all console output, error messages and some other diagnostic info is put to the log files.

server_log is redundant and all its info is present in VCMI_Server_log (it would be server console output if it had console).

Screenshots sometimes are useful, because they may give some information not present in the log. For example, consider 0.72#71 crash. Client log says that crash occurred during third phase of applying “BattleStart” package. But it’s really huge operation - creating battle interface window and all its components.
However, screenshot gives us little additional information: crash occurred after background and bottom bar was shown and before hexes or creatures appeared.

But the best possible thing, is clear description, how to reproduce issue (if possible). Then I can cause crash (problem) in my VCMI with debugger attached and easily analyse issue.

Thanks for the explanation. :slight_smile: