cyberbotics/webots

stdout failed to redirect to the console

nchygy opened this issue · 2 comments

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.

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.