Skip to content

OSX Serial Monitor crashes the IDE #8250

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

Open
gitcnd opened this issue Nov 29, 2018 · 15 comments
Open

OSX Serial Monitor crashes the IDE #8250

gitcnd opened this issue Nov 29, 2018 · 15 comments
Labels
Component: IDE Serial monitor Tools > Serial Monitor OS: OSX Specific to the Mac OS X (macOS) version of the Arduino IDE Type: Bug

Comments

@gitcnd
Copy link

gitcnd commented Nov 29, 2018

If the monitor is left open while lots is printing, Arduino IDE needs to be force-quit.

This is almost certainly a memory leak or some other kind of memory management mistake that needs to be fixed.

@per1234 per1234 added the Component: IDE Serial monitor Tools > Serial Monitor label Nov 29, 2018
@facchinm facchinm added the OS: OSX Specific to the Mac OS X (macOS) version of the Arduino IDE label Nov 29, 2018
@facchinm
Copy link
Member

Hi @gitcnd ,
which version of the IDE are you using? OSX version too would be useful.

@facchinm facchinm added the Waiting for feedback More information must be provided before we can proceed label Nov 29, 2018
@gitcnd
Copy link
Author

gitcnd commented Nov 29, 2018

1.8.7 on 10.13.6

I could probably fix this myself - and I do happen to want to add a feature (ability for the Serial-Plotter to also write data to a log file).

If you're busy with other stuff and just want to point me at where to start on both the above, I can probably send over some diffs of a fix.

@PaulStoffregen
Copy link
Contributor

Maybe related to the long-presumed fixed #2233 issue? That difficult issue was really 2 related problems, using too much CPU time to keep up with real-time data, and allocating too much memory. New features like timestamps have been added. Maybe they're increasing the CPU load?

Any chance you could tell us which board you're using and maybe even share the code which sends too much data?

@gitcnd
Copy link
Author

gitcnd commented Nov 29, 2018

Arduino Nano with the elcheapo serial chip (CH340G I think?)

Loads of things break the IDE - the latest was a simple loop doing a println() on a pair of ints at pretty-much the fastest speed it can do. After about 3 or 4 mins - force-quit is the only escape. Exactly the same problem on a second mac I own with an older OSX and and older IDE (maybe worse even - hosed the whole OS yesterday, and I had to reboot).

I connect at 115200 baud.

Funny you mention the timestamps - they don't work (does absolutely nothing when I select that). Maybe there's a clue?

@gitcnd
Copy link
Author

gitcnd commented Nov 29, 2018

p.s. having a feature to log to disk is desperately needed in both the monitor and the plotter...

@per1234
Copy link
Collaborator

per1234 commented Nov 29, 2018

Funny you mention the timestamps - they don't work (does absolutely nothing when I select that). Maybe there's a clue?

There's a known bug with the Serial Monitor timestamp feature in Arduino IDE 1.8.7: #8055
That has been fixed since the 1.8.7 release.

It's best to test with the hourly build of the Arduino IDE to make sure the bug hasn't already been fixed:
https://www.arduino.cc/en/Main/Software#hourly

@per1234
Copy link
Collaborator

per1234 commented Mar 26, 2019

@gitcnd did you ever get a chance to test with the hourly build of the Arduino IDE? If so, does the bug still occur?

@ldalep
Copy link

ldalep commented Apr 7, 2019

I have used every build since 1.8.8 and the monitor still hangs the IDE - I have projects I run overnight and if you really want to see it crash quickly hide the monitor.

@per1234
Copy link
Collaborator

per1234 commented Apr 7, 2019

@ldalep Thanks for your input!

I have used every build since 1.8.8
Does that mean you tried the latest hourly build of the Arduino IDE and the beta build too?

Are you using OS X/macOS?

@ldalep
Copy link

ldalep commented Apr 7, 2019 via email

@per1234 per1234 removed the Waiting for feedback More information must be provided before we can proceed label Apr 7, 2019
@dl9rdz
Copy link

dl9rdz commented Dec 11, 2019

Same problem here, with Arduino 1.8.10 on macOS Sierra.

IDE and Console completely irresponsive, and top shows excessively high CPU load of Arduino process, while memory usage is moderate (500MB after startup, 700MB when crash happens).

Im my case the software on serial console (on an ESP32) is producing about 30-40 lines of log messages per second, and the problem starts after running for about 20-25 minutes. Problem rises gradually after about 20 minutes, i.e. first the console is slow and e.g., clicking close will still close the console window (after a delay of some seconds). Just shortly after that, its completely frozen. Total amount of data sent via serial console is maybe 3-4 MB, so most likely way below the 8M limit where TextAreaFIFO starts dropping old data.

@prampec
Copy link

prampec commented Feb 4, 2020

Same problem with macOS Catalina 10.15.3, and Arduino 1.8.11

  • Serial detection works (however openning the tools menu always takes about 5secs).
  • Upload also works.
  • Serial monitor/serial plotter crashes the gui, that brings up the send-to-apple report window.
    Tested with FTDI breakout adapter.
    (Serial monitor works with PlatformIO on the same setup.)

@crapougnax
Copy link

Same here with macOS Catalina 10.15.3 and Arduino 1.8.11 or 1.8.12.

@shamal69
Copy link

Same here with macOS Catalina 10.15.5 and Arduino 1.8.12.

@GottemHams
Copy link

Seems the issue still occurs, I'm using macOS Mojave 10.14.6 and Arduino 1.8.16. It (almost?) always happens when the serial monitor is open and I try to flash a sketch. Sometimes this fails (with varying errors) and for some reason the serial monitor is then sometimes continuously receiving a lot of garbage (likely due to the initial baud rate of the board being different than what I set in the sketch), which seems to cause the hang.

I would use an hourly build but it seems the most recent one is from April, while the release build is from September. :>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE Serial monitor Tools > Serial Monitor OS: OSX Specific to the Mac OS X (macOS) version of the Arduino IDE Type: Bug
Projects
None yet
Development

No branches or pull requests

10 participants