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

Blank line appears in program output #683

Open
tjguk opened this Issue Oct 21, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@tjguk
Copy link
Contributor

tjguk commented Oct 21, 2018

(This was spotted by a Year 8 group I was teaching who took the trouble to make sure it could be reproduced and in the same place).

Take the code in https://gist.github.com/tjguk/61bd3e38c56fb5e1467381e5a9aa117e and run it in Mu. Between number 57 & 58 a blank line appears. It always appears and it always appears there. If I change the program to run without fizzing or buzzing, no blank line appears. Which leads me to think it's a buffer-length thing.

I've only tried on Win10 / Mu 1.0.1 from the installer

image

@tjguk

This comment has been minimized.

Copy link
Contributor Author

tjguk commented Oct 21, 2018

Relevant logs attached though I'm not seeing anything especially useful

mu-logs.txt

@tim-mccurrach

This comment has been minimized.

Copy link
Contributor

tim-mccurrach commented Oct 22, 2018

I'm not 100% sure, I can't run the code cos not with laptop at the moment, but this looks like it might be related to issue #674.

I think that the '\r\n' that's appended to whatever is printing, gets split across the 256 byte chunk in read_std_out and you end up with ... \r and \n... giving two new lines instead of one. I'm nearly done with a pull request to fix this, that I'll probably submit this evening - just got to write tests :)

@tjguk

This comment has been minimized.

Copy link
Contributor Author

tjguk commented Oct 22, 2018

Thanks @tim-mccurrach that certainly sounds plausible and along the lines of what I expected. I'll look out for your PR whenever and test it against our code.

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