Skip to content
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

SerialServer not working on Windows 10 and logs are flooded with exceptions #28

Open
old9 opened this issue Apr 2, 2022 · 1 comment
Assignees
Labels

Comments

@old9
Copy link

old9 commented Apr 2, 2022

Describe the bug
I'm trying to use MCEC as a serial server listening for commands from a serial port, it works fine on my old windows 7 box but not on a windows 10 machine.

2022-04-02 16:47:53,711 INFO  - Serial: Starting...
2022-04-02 16:47:53,711 INFO  - SerialServer: Opening port: COM1 9600 baud N81 None
2022-04-02 16:47:53,726 INFO  - SerialServer: Waiting for commands on ...
2022-04-02 16:47:54,898 INFO  - You are running the most recent version

The status window shows that it's opening the serial port and waiting for commands, but when I send command through the port nothing happens, and I exited it out (it refuses to exit until a force kill from task manager) and check the logs only to find it's flooded with tens of thousands of exceptions 2022-04-02 18:08:06,352 DEBUG - SerialServer: Exception: Thread was being aborted. and there are also MCEControl.log.1 and MCEControl.log.2 and so on files generated.

To Reproduce
Steps to reproduce the behavior:

  1. Install and run the program
  2. Go to 'File - Settings - Serial Server tab'
  3. Click on 'Enable Serial Server' and keep everything as default
  4. Click 'OK' to see the status updating saying SerialServer Opening port and Waiting for commands
  5. Click 'File - Exit' to exit the program (but it refuses to, the UI is dismissed but the process is still running in the background and has a high CPU ratio about 20%)
  6. force kill the process
  7. check the logs in %APPDATA%\Kindel Systems\MCE Controller
  8. see logs flooded with exceptions

Expected behavior
It should respond to serial port messages but not.
It should exit out cleanly.
It should not flood the log with exceptions

Screenshots
image

Version Information
Include the first line from the log window, like this:

2022-04-02 17:47:35,927 INFO  - MCE Controller v2.2.10.2 - OS: Microsoft Windows NT 10.0.19044.0 on x64 - .NET: 4.0.30319.42000

Snippets from the log

2022-04-02 18:07:58,196 DEBUG - ------ START: v2.2.10.2 - OS: Microsoft Windows NT 10.0.19044.0 on x64 - .NET: 4.0.30319.42000 ------
2022-04-02 18:07:58,321 INFO  - MCE Controller v2.2.10.2 - OS: Microsoft Windows NT 10.0.19044.0 on x64 - .NET: 4.0.30319.42000
2022-04-02 18:07:58,367 INFO  - Settings: Loaded settings from C:\Users\username\AppData\Roaming\Kindel Systems\MCE Controller\MCEControl.settings
2022-04-02 18:07:58,604 INFO  - Logger: Logging to C:\Users\username\AppData\Roaming\Kindel Systems\MCE Controller\MCEControl.log
2022-04-02 18:07:58,618 INFO  - Telemetry: Disabled
2022-04-02 18:07:58,649 INFO  - CommandInvoker: 303 built-in commands defined
2022-04-02 18:07:58,649 INFO  - SerializedCommands: Loading user-defined commands from C:\Users\username\AppData\Roaming\Kindel Systems\MCE Controller\MCEControl.commands
2022-04-02 18:07:58,649 ERROR - SerializedCommands: C:\Users\username\AppData\Roaming\Kindel Systems\MCE Controller\MCEControl.commands was not found
2022-04-02 18:07:58,696 INFO  - CommandInvoker: 0 commands enabled (303 commands disabled).
2022-04-02 18:07:58,696 INFO  - CommandFileWatcher: Watching C:\Users\username\AppData\Roaming\Kindel Systems\MCE Controller\MCEControl.commands for changes
2022-04-02 18:07:58,696 INFO  - Server: Starting...
2022-04-02 18:07:58,711 DEBUG - SocketServer - Binding to IP address: 0.0.0.0:5150
2022-04-02 18:07:58,711 DEBUG - _mainSocket.Listen
2022-04-02 18:07:58,730 INFO  - SocketServer: Started on port 5150
2022-04-02 18:07:58,730 INFO  - SocketServer: Waiting for a client to connect
2022-04-02 18:07:58,740 INFO  - Serial: Starting...
2022-04-02 18:07:58,742 DEBUG - Opening serial port: COM1 9600 baud N81 None
2022-04-02 18:07:58,742 INFO  - SerialServer: Opening port: COM1 9600 baud N81 None
2022-04-02 18:07:58,742 DEBUG - Serial Read thread starting: COM1 9600 baud N81 None
2022-04-02 18:07:58,742 INFO  - SerialServer: Waiting for commands on ...
2022-04-02 18:07:58,774 DEBUG - Checking for new release...
2022-04-02 18:07:59,259 DEBUG - SerialServer: TimeoutException
2022-04-02 18:07:59,774 DEBUG - SerialServer: TimeoutException
2022-04-02 18:07:59,790 DEBUG - The latest release is tagged at v2.2.10.2 and is named 'MCE Controller Version 2.2.10'. Download Url: https://github.com/tig/mcec/releases/download/v2.2.10.2/MCEController.Setup.exe
2022-04-02 18:07:59,813 INFO  - You are running the most recent version
2022-04-02 18:08:00,288 DEBUG - SerialServer: TimeoutException
2022-04-02 18:08:00,789 DEBUG - SerialServer: TimeoutException
2022-04-02 18:08:01,291 DEBUG - SerialServer: TimeoutException
2022-04-02 18:08:01,803 DEBUG - SerialServer: TimeoutException
2022-04-02 18:08:02,308 DEBUG - SerialServer: TimeoutException
2022-04-02 18:08:02,826 DEBUG - SerialServer: TimeoutException
2022-04-02 18:08:03,334 DEBUG - SerialServer: TimeoutException
2022-04-02 18:08:03,855 DEBUG - SerialServer: TimeoutException
2022-04-02 18:08:04,374 DEBUG - SerialServer: TimeoutException
2022-04-02 18:08:04,900 DEBUG - SerialServer: TimeoutException
2022-04-02 18:08:05,415 DEBUG - SerialServer: TimeoutException
2022-04-02 18:08:05,928 DEBUG - SerialServer: TimeoutException
2022-04-02 18:08:06,182 INFO  - Exiting app...
2022-04-02 18:08:06,196 INFO  - ActivityMonitor: Stop
2022-04-02 18:08:06,196 INFO  - Server: Stopping...
2022-04-02 18:08:06,196 DEBUG - SocketServer Stop
2022-04-02 18:08:06,196 DEBUG - SocketServer disposing...
2022-04-02 18:08:06,212 DEBUG - SocketServer OnClientConnect
2022-04-02 18:08:06,212 INFO  - SocketServer: Stopped
2022-04-02 18:08:06,212 INFO  - Serial: Stopping...
2022-04-02 18:08:06,212 DEBUG - Serial Server Stop
2022-04-02 18:08:06,212 DEBUG - SerialServer: IOException: The I/O operation has been aborted because of either a thread exit or an application request.

2022-04-02 18:08:06,289 DEBUG - SerialServer: Exception: Thread was being aborted.
2022-04-02 18:08:06,305 INFO  - SerialServer: Stopped
2022-04-02 18:08:06,321 INFO  - Settings: Wrote settings to C:\Users\username\AppData\Roaming\Kindel Systems\MCE Controller\MCEControl.settings
2022-04-02 18:08:06,336 INFO  - Closing Main Window...
2022-04-02 18:08:06,336 DEBUG - SerialServer: Exception: Thread was being aborted.
2022-04-02 18:08:06,336 INFO  - CommandFileWatcher: Stopped watching C:\Users\username\AppData\Roaming\Kindel Systems\MCE Controller\MCEControl.commands for changes
2022-04-02 18:08:06,336 DEBUG - SerialServer: Exception: Thread was being aborted.
2022-04-02 18:08:06,352 DEBUG - SerialServer: Exception: Thread was being aborted.
2022-04-02 18:08:06,352 DEBUG - SerialServer: Exception: Thread was being aborted.
2022-04-02 18:08:06,352 DEBUG - SerialServer: Exception: Thread was being aborted.
2022-04-02 18:08:06,352 DEBUG - SerialServer: Exception: Thread was being aborted.
2022-04-02 18:08:06,352 DEBUG - SerialServer: Exception: Thread was being aborted.
2022-04-02 18:08:06,352 DEBUG - SerialServer: Exception: Thread was being aborted.
2022-04-02 18:08:06,352 DEBUG - SerialServer: Exception: Thread was being aborted.
2022-04-02 18:08:06,352 DEBUG - SerialServer: Exception: Thread was being aborted.
2022-04-02 18:08:06,367 DEBUG - SerialServer: Exception: Thread was being aborted.
2022-04-02 18:08:06,367 DEBUG - SerialServer: Exception: Thread was being aborted.
... (repeat lines omitted)
@old9 old9 changed the title SerialServer not working on Windows 10 and logs are flooded with SerialServer not working on Windows 10 and logs are flooded with exceptions Apr 2, 2022
@tig
Copy link
Owner

tig commented Oct 11, 2022 via email

@tig tig self-assigned this Dec 9, 2022
@tig tig added the bug label Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants