By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,212 Members | 1,144 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,212 IT Pros & Developers. It's quick & easy.

Null reference exception was unhandled

P: 2
Hi,
I've application to capture video of image, grab the still image and process it. It runs well until I put loop to regrab and the still images many times automatically.. and the error happened. The error is Null reference exception was unhandled. I found that the error happened when I call one image file :

//// apply filter subtract===>>>> call file from out bin folder <<<<=====
System.Drawing.Bitmap subtract = filter1.Apply(image2);

In the code above, image2 is the name of file image that I retrieved from bin folder. However, if I not using loop, it can execute smoothly. I'm using C# Express edition. Im stuck now. Could anybody help me please...
May 3 '07 #1
Share this Question
Share on Google+
1 Reply


Plater
Expert 5K+
P: 7,872
If you catch the exception with a try/catch loop does your code stop working? If not, for now I would do a try catch and carry on.
It wouldn't solve the issue, but it does allow you to sneak by.
May 3 '07 #2

Post your reply

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