TomPhillips
Active member
- Joined
- Feb 24, 2005
- Messages
- 33
- Programming Experience
- 10+
System.ArgumentOutOfRangeException[RESOLVED]
My application has a form with a button that starts a thread to load data from an SQL database and then update a SYBASE database. As it progresses, it updates listboxes on the form. The problem is that at some point it errors with:
When the exception happens, the debugger breaks the program with a line in green highlight, but it is all the way back in the .ShowDialog() line of the form which opened the current form.
Also, while the exception is certainly caused by something in the threaded module, I have been unable to find it. It does not seem to occur at the same point in the code every time.
And if I just run the module, instead of launching it as a thread, there is no problem.
Any thoughts? How do I find out what 'specified argument' it's talking about?
My application has a form with a button that starts a thread to load data from an SQL database and then update a SYBASE database. As it progresses, it updates listboxes on the form. The problem is that at some point it errors with:
Now if I click 'continue' it goes on as if there's no problem. If I set this exeption to 'continue' in the Debug menu, I don't see the exception, but I don't like that solution.A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in system.windows.forms.dll
Additional information: Specified argument was out of the range of valid values.
When the exception happens, the debugger breaks the program with a line in green highlight, but it is all the way back in the .ShowDialog() line of the form which opened the current form.
Also, while the exception is certainly caused by something in the threaded module, I have been unable to find it. It does not seem to occur at the same point in the code every time.
And if I just run the module, instead of launching it as a thread, there is no problem.
Any thoughts? How do I find out what 'specified argument' it's talking about?
Last edited: