Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suddenly no print() output in the console #1287

Closed
ScyDev opened this issue Jan 21, 2015 · 20 comments
Closed

Suddenly no print() output in the console #1287

ScyDev opened this issue Jan 21, 2015 · 20 comments

Comments

@ScyDev
Copy link
Contributor

ScyDev commented Jan 21, 2015

Happens when printing inside a loop. If it's an endless loop or just very many iterations, all the print() calls inside the loop will never show.
Every print() should be flushed to the output as soon as it is issued.

All you get is:

** Debug Process Started **
** Debug Process Stopped **

@reduz
Copy link
Member

reduz commented Jan 21, 2015

yeah prints go via tcp connection and it most likely clogs and disconnects.
Maybe it should have a limit of characters/second and not send more than
that (add something like [too many chars])

On Wed, Jan 21, 2015 at 9:36 AM, ScyDev notifications@github.com wrote:

Happens when printing inside a loop. If it's an endless loop or just very
many iterations, all the print() calls inside the loop will never show.
Every print() should be flushed to the output as soon as it is issued.

All you get is:

** Debug Process Started **
** Debug Process Stopped **


Reply to this email directly or view it on GitHub
#1287.

@reduz
Copy link
Member

reduz commented Jan 21, 2015

if you run from commandline debugger (godot -d) you will be able to see the
whole output

On Wed, Jan 21, 2015 at 9:59 AM, Juan Linietsky reduzio@gmail.com wrote:

yeah prints go via tcp connection and it most likely clogs and
disconnects. Maybe it should have a limit of characters/second and not send
more than that (add something like [too many chars])

On Wed, Jan 21, 2015 at 9:36 AM, ScyDev notifications@github.com wrote:

Happens when printing inside a loop. If it's an endless loop or just very
many iterations, all the print() calls inside the loop will never show.
Every print() should be flushed to the output as soon as it is issued.

All you get is:

** Debug Process Started **
** Debug Process Stopped **


Reply to this email directly or view it on GitHub
#1287.

@ScyDev
Copy link
Contributor Author

ScyDev commented Jan 21, 2015

Ok, starting from commandline with -d works.

But still, this is a bug that needs fixing, right?

@reduz
Copy link
Member

reduz commented Jan 21, 2015

yeah will keep this open until fixed

On Wed, Jan 21, 2015 at 2:29 PM, ScyDev notifications@github.com wrote:

Ok, starting from commandline with -d works.

But still, this is a bug that needs fixing, right?


Reply to this email directly or view it on GitHub
#1287 (comment).

@akien-mga
Copy link
Member

Has this been fixed in the current master branch? I think I've already seen a "too many chars" output when printing a lot of stuff, but I'd have to check.

@bojidar-bg
Copy link
Contributor

I think this is fixed, since I had the same problem once, but no more 😄 Still, better to wait for confirmation from @ScyDev or @reduz .

@akien-mga
Copy link
Member

Closing as fixed, will reopen if it's not the case.

@blurymind
Copy link

running 2.1.4rc - I have this bug

@bojidar-bg
Copy link
Contributor

Ah, actually, rereading the OP's post:

If it's an endless loop or just very many iterations, all the print() calls inside the loop will never show.

I don't think that's fixed yet.

@blurymind
Copy link

blurymind commented Sep 2, 2017

running 2.1.4

Try this:

func _fixed_process(delta):
	print("this wont print in godot's output debugger, but will print in cdm line--regression from 2.1.2 ")

It's broken in 2.1.4 - stable
It worked in 2.1.2 - stable

@xdee
Copy link

xdee commented Sep 15, 2017

Changing "Editor Setting -> Network Host -> Debug Host" to localhost(127.0.0.1) solved the issue in 2.1.4 stable. (Windows 10 x64)

@akien-mga
Copy link
Member

Changing "Editor Setting -> Network Host -> Debug Host" to localhost(127.0.0.1) solved the issue in 2.1.4 stable. (Windows 10 x64)

CC @Faless.

@Faless
Copy link
Collaborator

Faless commented Sep 17, 2017

Yeah, I was suspecting this actually, apparently link-local ipv6 addresses (i.e. fe80::/64) does not work. Not sure why. I think we could just remove them as an option.
Also, the editor should pick 127.0.0.1 by default (assuming no one disables ipv4) and not the first one returned by the OS.
I'll work on a PR and we can discuss it further there

@groud
Copy link
Member

groud commented Sep 29, 2017

Is that one fixed then ?

@odragora
Copy link

odragora commented Oct 5, 2017

Is that one fixed then ?

No. I had nothing in editor output console.
There were "Remote Debugger: Connection failed with status '1'" messages in Godot console window instead.

Changing "Editor Setting -> Network Host -> Debug Host" to localhost(127.0.0.1) solved the issue in 2.1.4 stable.

That worked for me.
Windows 10 x64, Godot 2.1.4 stable.

@sicienss
Copy link

sicienss commented Apr 13, 2018

PROBLEM

Suddenly I can no longer print to the console in Godot 3.0.2 stable.

I can print in a new project, but not my old one.

Even when I delete all files and singletons in my project except for a simple Node2D with a script

extends Node2D

func _ready():
    print("test")

I get no output except the normal "Debugger Process Started" message. I don't even see the normal "OpenGL ES 3.0 Renderer..." message.

I have seen a few questions online about this problem for Godot 2.0, and the answers involve changing the debug_port from project settings to 127.0.0.1. My remote host is already set to 127.0.0.1, with remote port 6007.

OTHER INFO

I'm on MacOS Sierra 10.12.6.

I don't think this is an overflow issue since I am trying to print a single line.

When I start Godot, I click to allow Godot to accept incoming network connections. I also checked that Godot can accept connections from my Privacy Settings.

When I run -sudo lsof -i:6007 from Terminal to see what's using the port, I get a pattern like this

COMMAND PID           USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
Godot   802 <user>   54u  IPv6 0x7fcb9f131c856...      0t0  TCP localhost:6007->localhost:<port> (CLOSE_WAIT)
...
Godot   802 <user>   99u  IPv6 0x7fcb9f131f3b775f      0t0  TCP *:6007 (LISTEN)
Godot   802 <user>   54u  IPv6 0x7fcb9f131c856...      0t0  TCP localhost:6007->localhost:<port> (ESTABLISHED)
Godot   802 <user>   54u  IPv6 0x7fcb9f131c856...      0t0  TCP localhost:<port>->localhost:6007 (ESTABLISHED)
...
Godot   802 <user>   54u  IPv6 0x7fcb9f131c856...      0t0  TCP localhost:6007->localhost:<port> (CLOSE_WAIT)

Not sure what to make of this...

This may not be related, but when I run my code, I get the following warning:

Remote Debugger: Connection failed with status: '2', retrying in 1 msec.

The debugger seems to be working in that it still kills the run on errors.

I also asked about this on the Godot QA forum.

@sicienss
Copy link

sicienss commented Apr 14, 2018

I solved the above problem I was having.

When I consulted the project.godot file in my project folder, I noticed there was a line

run/disable_stdout=true

This line was disabling the standard output, preventing printing to the console. I changed it to false and everything worked hunky-dory.

Not sure how this setting got changed.

@ghost
Copy link

ghost commented Apr 14, 2018

image

@sicienss
Copy link

sicienss commented Apr 14, 2018

@Noshyaar, how'd I miss that? Thanks!

@akien-mga
Copy link
Member

Moved to #22184 for better visibility and clarity.

@akien-mga akien-mga removed this from the 2.1 milestone Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants