posit-dev / positron

Positron, a next-generation data science IDE
Other
2.41k stars 71 forks source link

Repeated output with pauses + newlines loses text #4519

Open hadley opened 2 weeks ago

hadley commented 2 weeks ago

System details:

Positron and OS details:

Positron Version: 2024.07.0 (Universal) build 125 Code - OSS Version: 1.91.0 Commit: cae4905332a0f41a6233e196b48a6679b832000a Date: 2024-08-01T00:27:06.019Z (3 wks ago) Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0

Interpreter details:

R 4.4.0

Describe the issue:

Sometimes printed output is silently lost from the console.

Steps to reproduce the issue:

tokens <- c("", "Why", " do", " programmers", " prefer", " dark", " mode", 
"?\n\n", "Because", " light", " attracts", " bugs", "!")

# Always ok
for(token in tokens) {cat(token)}

# Sometimes misses on one or words in the second paragraph
for(token in tokens) {cat(token); Sys.sleep(0.01)}

Expected or desired behavior:

Output shouldn't go missing 😄

Were there any error messages in the UI, Output panel, or Developer Tools console?

hadley commented 2 weeks ago

Just updated positron and I still see the problem:

Positron Version: 2024.08.0 (Universal) build 48 Code - OSS Version: 1.91.0 Commit: ed616b36655fb24d116108bdd833f1321704315b Date: 2024-08-19T04:26:51.868Z (1 wk ago) Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0

juliasilge commented 2 weeks ago

Do we think this may be another example of problems arising from our current approach to #1762? It is a for() loop where things are getting dropped, however, and not literal lines of code.

DavisVaughan commented 2 weeks ago

This is likely a unique bug we haven't seen before