0

I am getting a very strange exception and am having quite a bit of trouble tracking it down. I'm not sure how much good posting it here will do, but I figured it would be worth a shot.

On software that is working in the world, one of our clients started getting a continuous stream of exceptions in the Event Log. I have the program set up to store events under the company name in Applications and Services, and set the Source to the actual class that is writing the event when called.

The full error that I am getting is:

HVUpdate Exception: Value cannot be null Parameter name: source

I have checked my code, and the only place I use a variable named "source" is when writing to the Event Log. However, this should only happen when starting the service. After that, all logs are written to a log file. I confirmed that source was defined in each of the two classes that might write to the Event Log.

The service has been running just fine, and is writing to the log file as expected.

Has anyone seen an HVUpdate error before, and know what might cause it? I do not have a class by that name, nor do I access one. My best guess is that it is a class used by the Event Logging, and it is telling me that my Source is null when trying to write a log. However, if this were the case, there would be a maximum of 3 logs written, not one a second. I've done a Google search on HVUpdate, but wasn't able to find anything there, either.

An odd question, I know. I hope someone has seen something similar before and can point me in the correct direction. If you need additional information, let me know. Thank you.

Tim
  • 2,731
  • 9
  • 35
  • 72
  • This is likely a LINQ related exception; when projecting a `null` result into something like `Where` for example. – Mike Perrenoud May 07 '14 at 17:07
  • @MichaelPerrenoud: So you are saying that the exception probably doesn't have anything to do with the actual Event Logging? I do have places where I use LINQ to parse a string, and I can search in there for a possible null value. Is it the HVUpdate that cues you off to LINQ? – Tim May 07 '14 at 17:16
  • 1
    Time, that's right, I have no reason to believe it's the actual event logging. And it's `Value cannot be null Parameter name: source` that tells me it's likely a LINQ related error. – Mike Perrenoud May 07 '14 at 17:17

0 Answers0