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

stdout failed to redirect to the console #6549

Open
nchygy opened this issue May 22, 2024 · 1 comment
Open

stdout failed to redirect to the console #6549

nchygy opened this issue May 22, 2024 · 1 comment

Comments

@nchygy
Copy link

nchygy commented May 22, 2024

Describe the Bug
A clear and concise description of what the bug is.
I add 3 standard output codes to the sample controller from the sample " pioneer3at.wbt ", which has been saved as another new project.
codes are:
printf("000000000000000stdoutIs normal");
fprintf(stderr, "0000Error message\n");
fprintf(stderr, "ErrorOutputIsNormal.\n");
Only "0000Error message" "ErrorOutputIsNormal." can be found in the console. That means only stderr is correctly redirect.

Steps to Reproduce

  1. Choose "save all necessary file to another location" when make change to the sample word "pioneer3at.wbt" and webots asking you to do that.
  2. Please add the three codes before the loop as you can find in the screen shots and run pioneer3at.wbt then check the console

Expected behavior
printf should work normally.

Screenshots
If applicable, add screenshots to help explain your problem.
ErrorPic

System

  • Operating System: [Windows 11]
  • Graphics Card: [NVIDIA GeForce RTX 2050 11 GB]

Additional context
Add any other context about the problem here.

@lukicdarkoo
Copy link
Member

printf("000000000000000stdoutIs normal");

@nchygy I believe you are missing \n at the end of the line. Webots will redirect output only once it reaches the line terminator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants