Null reference exception was unhandled

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • labby
    New Member
    • Dec 2006
    • 2

    Null reference exception was unhandled

    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(i mage2);

    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. I’m stuck now. Could anybody help me please...
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    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.

    Comment

    Working...