> When closing the form, the splash.Invoke... line throws a NullReference
> exception, but neither closeDelegate nor splash is null, and appear to be
> instantiated properly.
Well, _something_ is null. If not the closeDelegate or splash variable,
then what? .NET doesn't throw NullReference exceptions just for the fun
of it. :)
One thing I note is that you don't synchronize access to the splash
variable. So you could have a race condition where two different threads
are using it and then setting it to null. Whichever thread wins the race
gets to set the variable to null before the other is done with it, which
would cause a null exception. Of course, you didn't post nearly enough
code for anyone to be able to identify something like that, but it's a
possibility given the little code that you did post.
If you do post more code, don't post all of it. Just pare down your code
to the bare minimum required in order to reproduce the problem, while
still providing a complete program that can be compiled.
> I suspect there is some kind of odd timing/threading issue going on since
> this only happens on Win2000 machines. To make things a little weirder,
[quoted text clipped - 7 lines]
> The splash form is closed, the program continues on, and there is no
> problem.
All that shows is suggest that you do in fact have some sort of
timing-related thread issue. Basically, if you have a reproducible error
case, often when you change the exact operations you do, especially if
doing so affects the timing of the code, the error goes away. However,
since many thread-related bugs are timing-related, that's not really
useful information, and it doesn't mean you've actually fixed the bug. It
just means you've made it harder to debug, because the error no longer
happens.
Pete