What does this error dialog mean?

  • Thread starter Thread starter stax
  • Start date Start date
S

stax

Hi,
lately a lot users of my application complain it won't even startup, there seems to be a few problems.


Here is a screenshot a user made of a error dialog I've never seen before:

http://server2.ihostphotos.com/show.php?id=61788


Here is my source code:

http://www.planetdvb.net/staxrip/download_src.htm


I've absolutely no clue how to deal with such problems, just too often people file bug reports that cannot be reproduced on my machine, very frustratung everytime. Most of the time I don't know what to tell those people other than wild guesses.

Thanks in advance

Frank
 
Frank,

I don't see how you couldn't get this. I ran the code and I got the
exception the first time.

The issue is with the line:
RegistryHelp.CurrentUser.GetValue(RegistryKey, Nothing).ToString

That line returns Nothing, and you get a NullReferenceException as a
result since you can't call ToString on Nothing.

Hope this helps.
 
Nicholas said:
Frank,

I don't see how you couldn't get this. I ran the code and I got the
exception the first time.

The issue is with the line:
RegistryHelp.CurrentUser.GetValue(RegistryKey, Nothing).ToString

That line returns Nothing, and you get a NullReferenceException as a
result since you can't call ToString on Nothing.

Hope this helps.

Thanks a lot, very stupid bug, happens if you got DivX before version 6.0.3. That class is one of the most painful I've ever worked as DivX breaks compatibility just to often and I have to rework it everytime. I fiddle with this class for years. Just recently I had to modify it because of some 64 bit system weirdness and that's were the bug slipped in. I just have to figure out why the native error dialog pops up instead of the .NET one giving at least a stack trace.

Thanks,
Frank
 
Frank,

That is more a bug on your part than on theirs. You are assuming the
presence of a registry key which does not exist. You should make the code a
little more tolerant in this event, and have the application indicate that
something is amiss to the user.
 
Nicholas said:
Frank,

That is more a bug on your part than on theirs. You are assuming the presence of a registry key which does not exist. You should make the code a little more tolerant in this event, and have the application indicate that something is amiss to the user.

I really didn't expect this because I thought when DivX is not installed this code will never be executed. In the ctor of my startup form I subscribe to the Application.ThreadException event in case something goes wrong I did not expect and handle nowhere. This invokes some code giving users a chance to file a bug report. After I subscribe to the event still being in the ctor of the startup form the exception occurs. Some might think now the ThreadException handler will kick in but it doesn't and if this is not worse enough the native error dialog pops up and not the .NET one giving a nice stacktrace. Generally, I tested this on a newly created forms project, whenever a exception in the ctor of a startup form happens and is not handled by a try catch block the native error dialog pops up, might this be a .NET bug or at least limitation? I think it's good to know this otherwise it might cause some headache, it did in my case so thanks again for your help.

Regards,
Frank
 
Back
Top