Skip to content

Fast Serial Port reading makes the IDE cpu usage really high and crashes after some time #397

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

Closed
alessandromrc opened this issue Jun 4, 2021 · 4 comments
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself topic: serial monitor Related to the Serial Monitor type: imperfection Perceived defect in any part of project

Comments

@alessandromrc
Copy link

Describe the bug
The bug is really annoying because it makes the IDE crash while you're reading a lot of data.

To Reproduce
Upload a sketch that prints a lot of data,
Open the serial monitor,
Check the CPU usage of the IDE and after some time it will crash

Expected behavior
I expect that the CPU usage won't be really high and that there's something like a garbage collector.

Screenshots

Screenshot 2021-06-04 110754

Desktop

  • OS: Windows
  • Version: 2.0.0-beta.7
@SuperBGLazer
Copy link

I had the same issue. If I leave the serial monitor running in the background, it sometimes crashes my computer. This issue could be solved by adding an adjustable line limit to the serial monitor.

@cmaglie cmaglie removed the type: bug label Sep 16, 2021
@rsora rsora added type: imperfection Perceived defect in any part of project topic: serial monitor Related to the Serial Monitor labels Sep 22, 2021
@per1234 per1234 added the topic: code Related to content of the project itself label Oct 25, 2021
@per1234
Copy link
Contributor

per1234 commented Oct 28, 2021

Hi @alessandromrc and @SuperBGLazer. Thanks for your report! There was some recent work to improve the performance and efficiency of the Serial Monitor. That work is in the Arduino IDE 2.0.0-beta.12 release. I find a significant reduction of CPU load when comparing Arduino IDE 2.0.0-beta.12 against the 2.0.0-beta.7 version @alessandromrc was using.

Please give the latest version of Arduino IDE 2.x a try and let us know whether the issue is resolved for you.

@per1234 per1234 added the status: waiting for information More information must be provided before work can proceed label Oct 28, 2021
@alessandromrc
Copy link
Author

Hi @per1234, I can see that the efficiency of the serial monitor is really better but sometimes it loses messages and also it sometimes shows wrong data. I'm using the latest IDE version.

@per1234
Copy link
Contributor

per1234 commented Oct 31, 2021

I can see that the efficiency of the serial monitor is really better

I'm very glad to hear this!

but sometimes it loses messages and also it sometimes shows wrong data.

Thanks for reporting that. Please open dedicated issues for these.

There are some known issues with the Serial Monitor, listed here:
https://github.com/arduino/arduino-ide/issues?q=is%3Aissue+is%3Aopen+label%3A%22topic%3A+serial+monitor%22+label%3A%22type%3A+imperfection%22

I didn't spot one that matched with your "loses messages". There are a couple that might match to your "sometimes shows wrong data" though, so give that list a quick look in case the issue was already reported.

@per1234 per1234 closed this as completed Oct 31, 2021
@per1234 per1234 added conclusion: resolved Issue was resolved and removed status: waiting for information More information must be provided before work can proceed labels Oct 31, 2021
@per1234 per1234 self-assigned this Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself topic: serial monitor Related to the Serial Monitor type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

6 participants