Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Ok, this is really really strange:

 

When I press by debug button, My program starts under debug mode etc. Everything works fine.

 

But, when I go the myprojectfolder/bin/Debug and try to start the exe, I get an error! They ask if I want to send an report to microsoft etc.

 

This is the error signature:

EventType : clr20r3 P1 : ircbot.exe P2 : 1.0.0.0 P3 : 4411ee33

P4 : ircbot P5 : 1.0.0.0 P6 : 4411ee33 P7 : 39 P8 : c

P9 : system.nullreferenceexception

 

I can't do anything with this, except I know it's a system.nullreferenceexception

 

But where the problem is, I don't know..

 

Why am I getting this error when I try to start the application with the .exe, and not under debug mode?

Posted
It's a small program (I think in doesn't contain more than 1000 lines)' date=' and the error occurs before the form loads[/quote']

 

 

I sugest puting debug message box in the first executable code, to see where exactly the error occur.

 

you can do it like that:

 

Instruction 1

messagebox("instruction 1 passed")

Instruction 2

messagebox("instruction 2 passed")

 

 

and etc until you can see exactly where it crash... not really fun to do but pretty usefull

Posted

Fixed it already, I had some code in my Form COnstructor, which I moved to the form_load event.

 

Then, when I started the program, I got a much more descriptive error message :)

  • *Experts*
Posted

Note that if the code is in your class, it's generally better to override OnLoad than use the Load event. Maybe I'm being nitpicky, but thought I'd mention it since many people don't know about OnLoad.

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...