[Godot 2] Weird standard output behavior.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By woopdeedoo

This has happened before, but I didn’t know why, and now it’s happening again. For example, if I make a simple loop:

for i in range(5):
    print (i)

The output goes like this:

** Debug Process Started **    

** Debug Process Stopped ** 

Why does this happen?

EDIT: Actually, I do have a few messages showing up properly before this bug. So in my example above they’d get printed out between ** Debug Process Started ** and the horizontal 01234. However, these messages only show up properly the first time they get printed. So this tells me everything is fine in my code, up to a certain point where I must have done something that fudges the output.

Can you give me he whole exmaple, with the ** Debug Process Started ** and ** Debug Process Stopped** ? I could then test if i can reproduce that bug or if it’s fixed with version 3.0.2

coffeeDragon | 2018-05-24 14:10

My project size isn’t trivial, and that’s why I gave that small example just to illustrate it, hoping someone had seen this before and knows what’s going on.

I’m trying to find out if this is happening in any of my smaller projects, but meanwhile I remembered I have an older one, that my current one was based of off, and it was already happening there, and I have it in this repo here. If you test it, just press the Space bar to generate a new map and watch how the output window behaves each time you do that.

By the way, to be clear, that happens in the in-godot output window. The external stdout window shows everything fine (as far as I can tell). Here’s a screenshot of my current project’s.

(You can see in that screenshot that every time I generate a new map, the output creates an additional one-line output, but it also adds that new one-line output to the previous one-line outputs. Which is quite strange…)

I managed to get a similar effect on another project by having an output overflow on two big nested loops (just by outputing the indices (i, j)), but then I noticed that in my current project (and the one in that repository) I don’t need to do that. Just re-generating a new map does it.

woopdeedoo | 2018-05-24 18:04