-
Notifications
You must be signed in to change notification settings - Fork 132
Serial monitor uses 100% of one CPU if there is not device plugged #701
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
Comments
I will have a look |
I tried to reproduce this here and I did not see this happen. |
@Altair31 I assume you are on Windows because of your COM port definition, but is my assumption right? And which version of Windows is that? The serial communication partially relies on the OS facilities so that might play a role... |
@rlogiacco Your assumption is correct. My version is not the latest (but the previous one) as each times I update, I cannot work on my projects (but this should be another ticket). |
If I remember correctly the plugin name was already Sloeber in the previous version 😄 I'm using a Win 10 64 bit with Oracle JDK 1.8, Eclipse Neon 3 and Sloeber V4 with 6 serial lines all streaming data and my CPU is under 10%: disconnecting the lines doesn't produce the CPU rise you are experiencing. Which model of ESP8266 do you have? I'm asking because most ESP8266 don't have a TTL to USB converter, so rather than focusing on the MCU I would try to focus on the USB chip... I would suggest to:
|
Sounds like you have a really old version of Sloeber. I strongly advice to upgrade as many issues have been fixed and plenty of improvements have been made. As an independent open source project we value your submission, but we ask for support, either by helping us out coding (yeah, we do understand it does require time) or a Patreon contribution (starting from as low as 1$ a month): this allows us to support people who support us back! |
@Altair31 Is it ok to close this issue? |
I'm having the same issue with 4.1, which is latest stable version of sloeber. It's quite annoying because high cpu usage caused by sloeber makes my laptop fan to kick into higher gear :-( . There are two separate issues i was able to detect. First one is related to serial console. To replicate it, upload any sketch with serial console output, then in serial monitor view connect to serial port and finally disconnect USB cable. This causes one CPU core to work overtime. Here is backtrace showing where CPU time is being spent. "jssc.SerialNativeInterface.waitEvents(long)" After removing serial port from monitor view CPU usage goes down a bit, but still doesn't go down to zero, even when I don't interact with sloeber UI in any way and it's window is minimized. A little bit of profiling discovered, that sloeber is spending a lot of time doing some network checking . I'm not sure what's the purpose of that ... "javax.jmdns.impl.NetworkTopologyDiscoveryImpl.getInetAddresses()" I've pasted sloeber configuration to https://pastebin.com/X1ABMCKi . |
@jantje Sorry I didn't had time to test. |
@bergmannm @ALL |
I've looked at how to fix high CPU usage after USB disconnecting. The issue is caused by unfinished error handling in jssc - see FIXME at line 1113 in https://github.com/scream3r/java-simple-serial-connector/blob/2.8.0/src/java/jssc/SerialPort.java . The only way to fix it is to make a few changes in jssc. I've a bit experience in Java development, so I can easily fix the source code, but I'm not sure how to manage the rest. JSSC development seems to be no longer active, submitted pull request are not being processed since 2014. What's the correct procedure in such case? Should I fork it, rename the package to avoid any conflicts and somehow try to release it under different name? |
JSSC seems dead since 2014 indeed. Even Arduino proposed changes which are not accepted. |
I guess forking and fixing it. The code seems simple with a few C++ native
libraries that do not seem all too big.
…On Sun, Jun 11, 2017 at 9:19 PM, jantje ***@***.***> wrote:
JSSC seems dead since 2014 indeed. Even Arduino proposed changes which are
not accepted.
Not sure how to handle this.
@wimjongman <https://github.com/wimjongman> @rlogiacco
<https://github.com/rlogiacco>
Any input on how to handle this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#701 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALC6R5MZSmVronRvMMOCeHCLUWxxixwks5sDD2kgaJpZM4M0Ol2>
.
|
I think that the best idea should be to fork Arduino fork and send them a pull request with your fix |
It is not really a Arduino fork. Cmagly made a pull request. |
I don't know, maybe I'm looking at it the wrong way, but it seems to me, that https://github.com/aploese/spsw is based on completely different project than jssc. See commit aploese/spsw@77ece77 where he deleted all jssc codebase and imported different project from https://svn.code.sf.net/p/atmodem4j/code . I'm not sure if using different library is good idea, because proper testing in several different operating systems is quite time consuming and at least for me impossible, because I don't have a mac, linux only in virtual machine. |
I didn't look at the content. I only looked at the activity. I do not feel qualified to judge the content :-s |
Is there still interest in a fix for this issue? |
@bergmannm what changes do You need to fix usb? |
Hi, |
Why V4 does not work for You?
12.12.2017 10:57 AM "Altair31" <[email protected]> napisał(a):
… Hi,
In fact I had to change my HDD and I'm not able to use Sloeber anymore
since V3 is not available anymore and V4 does not works at all.
So now I switched to PlatformIO that has less footprint on my Eclipse IDE.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#701 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHOU6fCh4nju5-9wGrvExdAKnmarS9xks5s_k4ggaJpZM4M0Ol2>
.
|
I'm now on Ubuntu and my jvm refuse to download the esp8266 build chain due to unknown CA (toolchain is hosted on GitHub). |
Update ca-certificates...
12.12.2017 12:40 PM "Altair31" <[email protected]> napisał(a):
… I'm now on Ubuntu and my jvm refuse to download the esp8266 build chain
due to unknown CA (toolchain is hosted on GitHub).
So I decided to stop fighting...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#701 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHOU9AYG8lfaAdQiTlaUYb1vJEwBL_aks5s_mYagaJpZM4M0Ol2>
.
|
@Altair31 As you seem to have used platformio and Sloeber I would be interested in some comparison experiences from you. (Though V3 and V4.2 are seriously different)
V3 is still downloadable from the website. |
@uzi18 Be sure I tried to solve this problem but without success. When I said V3 is no more available, I should have told V3 update repository is no more available. I personally prefer to use plugins than a full Eclipse environment. |
The V3 update site should still be available at http://www.baeyens.it/eclipse/V3/. I didn't check but there has never been a intent to remove it. I don't understand your comments about platformio further than: it fits more with what I do at work and it has this issue as well. |
In my opinion platformio has got more disk space overhead and don't support
32bit system.
Overtime eclipse/sloeber also allocate lots of memory, indexer after some
time forgets everything and marks files with red cross (not sure icon)
12.12.2017 4:15 PM "jantje" <[email protected]> napisał(a):
… @Altair31 <https://github.com/altair31> As you seem to have used
platformio and Sloeber I would be interested in some comparison experiences
from you. (Though V3 and V4.2 are seriously different)
Sloeber anymore since V3 is not available anymore and V4 does not works at
all.
V3 is still downloadable from the website.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#701 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHOU8cP-2c-u0fHLJCNjrD84YakJQuRks5s_pikgaJpZM4M0Ol2>
.
|
If I understood correctly platformio does not have the indexer functionality which means:
|
@jantje In fact, PlatformIO is just a project generator for some platforms. IMHO it fits me my needs than Sloeber. And @uzi18, we almost are in 2018 so let RIP the 32 bits OS to the 2000 years 😉 (or I haven't understood what you said) |
Thanks for the input. |
When I have the serial monitor connected to a COM interface that is no more connected, the serial monitor uses a CPU to 100%.
How to reproduce:
Tested with esp8266
The text was updated successfully, but these errors were encountered: