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

COM Ports not found hard crash fix #8

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

VashBaldeus
Copy link

@VashBaldeus VashBaldeus commented May 14, 2024

When trying to debug, I encountered an issue with hard-crash coming from the Form1_Load method, result was that string[] ports = SerialPort.GetPortNames(); returned no ports (my PC has no COM). I fixed it by checking for the ports array to be longer than 0 before assigning anything thus preventing a hard crash.

Also added a message when user manually refreshes COM ports that will show in case no ports were found further preventing hard crash of the program.

Fixed an issue with loading com ports on start up, where it attempted to set combo box selectedindex to 0 where no ports found.
Fixed additional port search where it will not change anything if no ports found.
Added message on COM port refresh in case nothing found to alert user of a problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant