Debug messages size limit

Hello,

when outputting debug messages in the console, it seems that there is a size limit per frame after frame around 70/75. I’m currently participating to the Unleash the Geek challenge and I output my internal representation of the map in the log (so this is quite big). It usually looks like this:

DEBUG     0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 
DEBUG  0 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  1 .  .  .  .  .Z .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  2 .  .  .  .Z BC .Z .Z .  .  .  .Z .  .Z .Z .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  3 .  .  .  .  .Z .Z TC .Z .  .Z TC RZ BC TC .Z .  .Z .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  4 .  .  .  .  .  .  .Z .  .  .  .Z R  .Z .Z .  .Z TC .Z .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  5 .  .  .  .  .  .  .  .  .  .  .Z .  .  .  .Z .  .Z .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  6 .  .  .  .  .  .  .  .  .  .Z BC .Z .  .Z TC .Z .  .Z .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  7 .  .  .  .  .  .  .  .  .  .  .Z .  .  .  .Z .  .Z BC .Z .  .  .  .  .  .  .  .  .  .  .  
DEBUG  8 .  .  .  .  .  .  .  .  .  .  .  .  .  .Z TC .Z .  .Z .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  9 .  .  .  .  .  .  .Z .  .  .  .  .  .  .  .Z .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG 10 .  .  .  .  .  .Z TC .Z .  .  .  .  .Z .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG 11 .  .  .  .  .Z .  .Z .  .  .  .Z .Z BC .Z .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG 12 .  .  .  .Z BC .Z .  .  .  .Z BC .Z .Z .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG 13 .  .  .  .  .Z .  .  .  .  .  .Z .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG 14 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  
INFO 0 Brain PROCESS
INFO 0 eval win WaitDeadEvaluator
INFO 0 Brain.GoalWait PROCESS
INFO 1 Brain PROCESS
INFO 1 eval win WaitDeadEvaluator
INFO 1 Brain.GoalWait PROCESS
INFO 2 Brain PROCESS
INFO 2 eval win DigForOreEvaluator
INFO 2 Brain.GoalMoveAndDig PROCESS
INFO 2 Brain.GoalMoveAndDig.GoalMoveToSlot PROCESS
INFO 2 Brain.GoalMoveAndDig.GoalMoveToSlot.GoalMove PROCESS
INFO 2 Brain.GoalMoveAndDig.GoalMoveToSlot.GoalMove PROCESS
INFO 2 Brain.GoalMoveAndDig.GoalMoveToSlot.GoalMove ACTIVATE
INFO 3 Brain PROCESS
INFO 3 eval win BringOreToBaseEvaluator
INFO 3 Brain.GoalMoveToBase PROCESS
INFO 4 Brain PROCESS
INFO 4 eval win DigForOreEvaluator
INFO 4 Brain.GoalMoveAndDig PROCESS
INFO 4 Brain.GoalMoveAndDig.GoalMoveToSlot PROCESS
INFO 4 Brain.GoalMoveAndDig.GoalMoveToSlot.GoalMove PROCESS
INFO 4 Brain.GoalMoveAndDig.GoalDig PROCESS
INFO 4 Brain.GoalMoveAndDig.GoalDig ACTIVATE
INFO frame time: 25ms

And after frame 75 it looks like this:

DEBUG     0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 
DEBUG  0 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  1 .  .  .  .  .Z .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  2 .  .  .  .Z BC .Z .Z .  .  .  .Z .  .Z .Z .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  3 .  .  .  .  .Z .Z TC .Z .  .Z TC RZ BC TC .Z .  .Z .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  4 .  .  .  .  .  .  .Z .  .  .  .Z R  .Z .Z .  .Z TC .Z .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  5 .  .  .  .  .  .  .  .  .  .  .Z .  .  .  .Z .  .Z .  .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  6 .  .  .  .  .  .  .  .  .  .Z BC .Z .  .Z TC .Z .  .Z .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  7 .  .  .  .  .  .  .  .  .  .  .Z .  .  .  .Z .  .Z BC .Z .  .  .  .  .  .  .  .  .  .  .  
DEBUG  8 .  .  .  .  .  .  .  .  .  .  .  .  .  .Z TC .Z .  .Z .  .  .  .  .  .  .  .  .  .  .  .  
DEBUG  9 .  .  .  .  .  ...

It seems that there is a size limit around 1024 characters. This makes debugging really painful when there is an issue in your code after frame 75. For info I had the same issue on other CG games as well so this is not specific to Unleesh the geek.

Would it be possible to increase this limit ? Around 4096 chars would be nice.

Cheers,
Patrice.

Hello Patrice,

Long time! :heart:

So, there is a limit of 4096 per frame and a global limit too of 4096 * 50 for the whole game. Once you pass this limit, you’re only allowed 1024 per turn.

I know this is frustrating but we’re storing it with the game, so in the end, it can cost a lot.

Cheers,
Thibaud

2 Likes

Hey Thibaud !

indeed long time :slight_smile: For next Amadeus UTG you should come here, would be fun :wink:

Thanks for your answer, knowing how it works internally I can adapt and start logging only around the frames I need to debug so it’s ok.

Just a question, why is it stored on your side ? since this is shown only in the IDE, it could be just returned to the IDE without storing it on your side no ? (and maybe on your side store only the in/out for replay purpose).

cheers,
Pat.

Actually, the standard error is displayed in a replay (only yours). And there is a bug that you can see it only if you’re player 2

As Thibaud said it’s returned in the replay when you’re logged in. And it’s very useful for replay analysis.

Another solution is to use reCurse’s bitstream solution to encode all the state in a very short string (although I’m not using it myself):