mostwanted4 wrote:
if I delete a part of my code pictureBox1.Image = img;
Is that happening in a background thread or on the UI thread? I've sometimes seen cross thread exceptions like that thrown up to the call to
Application.Run(...)
in the
Main
method.
Does the inner exception shed any light on the problem?
If you attach to the unhandled exception handler:
static void Main(string[] args)
{
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
}
do you get any more useful information?