473,406 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

System.FormatException: Input string was not in a correct format.

I have a version of software that I had written (in C#) for me several years ago. Thousands of installs have been done over the last 6 years with everything working correctly.

The software talks on a comm port (either physical or via a USB to serial adapter). This has been done successfully for a long time. It appears there has been a Windows Update that may have caused a problem leading to the following error.

System.FormatException: Input string was not in a correct format.

The application gives the option to terminate or continue. If you continue, the comm port selection dropdown and the baud rate selection dropdown appear empty.

Has anyone come across this before? Is there a work around? I'd like to note have to change the application and re-install it on hundreds or thousands of PCs.

Thanks in advance. Steve.
Jul 13 '10 #1
2 3231
GaryTexmo
1,501 Expert 1GB
Hmm, that's very odd. Since you have the code for this, I'd step through to see why this exception is being thrown. Perhaps the way the parameters come from the comm port changed, and are no longer matching the input string? This is pure speculation, you'll need to step through to see what's happening now.

You might luck out and be able to release a simple patch to update your binaries, or you might be able to put in a ticket with Microsoft... perhaps they made a mistake? (Wouldn't be the first time... >.>)
Jul 13 '10 #2
tlhintoq
3,525 Expert 2GB
If your comport is a virtual COM from a Microsoft bluetooth dongle there is a known bug. The MS BT stack sometimes make entries like this

COM15╪
instead of
COM15

It fails to put a proper null termination in the registry, then later when you get the available com port names they are fraked up.

Check the registry to see if they are screwed, or better yet parse the reg and fix all COM port names that aren't right.

LocalMachine | Hardware | Devicemap | SerialComm


Another thought... I recently saw a Dell mini PC with no COM ports at all, thus the result to the list of available com ports was null. An empty string would not be the right format for getting a number.
Jul 13 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: sbox | last post by:
I've got an error "System.FormatException: Input string was not in a correct format." while I'm implementing a datagrid and a textbox What's wrong with it? Sub Button1_Click(sender As Object, e...
0
by: lianfe_ravago | last post by:
Input string was not in a correct format. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the...
4
by: Maria | last post by:
Hello ! I'm a newbie trying to learn something about asp.net. To start with something easy I made a page that convert from Celsius to Fahrenheit. The code : Private Sub Button1_Click(ByVal...
1
by: Big E | last post by:
Here is my code below. I recieve this error when I run MyCommand.SelectCommand.ExecuteNonQuery() Thanks. Big E Sub MyDataGrid_Update(ByVal Sender As Object, ByVal E As...
5
by: blackg | last post by:
Input string not in correct format -------------------------------------------------------------------------------- I am trying to view a picture from a table. I am getting this error Input string...
0
by: bnlockwood | last post by:
G'day all, Thank you in advance for anyone that can help. I have a shopping cart datagrid on my c# asp.net page. This is the code: ------------------------------------- <asp:datagrid...
0
by: hudhuhandhu | last post by:
have got an error which says Input string was not in a correct format. as follows.. Description: An unhandled exception occurred during the execution of the current web request. Please review the...
0
by: sehguh | last post by:
Hiya Folks, I am Currently using windows xp. Also using Visual Web Developer 2005 and Microsoft Sql server 2005. The main page consists of an aspx page and a master page. The page also...
1
by: weird0 | last post by:
localhost.BankingService bservice = new localhost.BankingService(); int balance=Convert.ToInt32(bservice.CheckBalance(InfoAccount.pincode)); // Line of Error How can i remove this error? I...
1
by: differentsri | last post by:
THIS IS AN ASP.NET 1.1 APPLICATION IAM TRYING TO UPDATE THE FIELD BUT I AM NOT ABLE TO UPDATE IT? CAN U TELL THE REASON ? IT IS GIVING THE FOLLOWING ERROR BELOW I HAVE ALSO GIVEN THE CODE OF...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.