Pages: [1]   Go Down
Author Topic: Arduino chews 100% cpu  (Read 552 times)
0 Members and 1 Guest are viewing this topic.
Brisbane, Australia
Offline Offline
God Member
*****
Karma: 1
Posts: 593
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've noticed that Arduino will chew 100% cpu occasionally.

I think I've narrowed it down to if you turn on Serial Monitor and then unplug the Arduino then it will chew 100% cpu.
It must enter a loop continually trying to access the serial port.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 124
Posts: 6634
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I think I've narrowed it down to if you turn on Serial Monitor and then unplug the Arduino then it will chew 100% cpu.

Same thing happened on my Mac once.  I think the answer is "don't do that!"  :-)
Logged

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 6
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I noticed that Windows XP (or maybe just the .NET runtime) might have a problem with virtual serial ports.

I programmed a smal VB 2005 (.NET) app. that listens to the COM port Arduino i sending on, and if i disconnect the Arduino board (i.e. remove the port as seen from Windows) without first closing the port in my app. it freze up.

One time Windows froze compleatly and one time the app. froze but i havent been able to verify this in a consistent way, so it's probably an error that comes when the port is in a specifik state. What do i know :-)

As lon as i always close the COM port first, i have no problem.
Logged

Brisbane, Australia
Offline Offline
God Member
*****
Karma: 1
Posts: 593
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
One time Windows froze compleatly and one time the app.
Thats completely standard Windows behavior. ;D

This is more than likely a *nix specific bug.

I tried poking through the code a little and I couldnt find any relevant parts so a dev will have to look at this.
Logged

Pages: [1]   Go Up
Jump to: