I was testing a program I am writing and I got this error message: Cross-thread operation not valid: Control 'lblStatus' accessed from a thread other than the thread it was created on
The code is a bit massive and I am not sure which part is causing this error to post a smaller segment. However here is some info that might be of use.
I am not using any "threading" explicitly. I am guessing something else is automatically creating multiple threads - I am using a Wii remote hardware access library and I am doing graphics manipulation.
The stack trace indicates, that a call is made to an on change event handler, which calls a function inside which lblStatus
is tried to be modified - but fails.
I was wondering how do you debug these types of errors. I am using Visual Studio 2008.
EDIT
One thing I want to clarify, I do not know how this different thread even came up. How would I even find this? the source of the different thread.