MrLucky Posted March 10, 2006 Posted March 10, 2006 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? Quote
Shurikn Posted March 11, 2006 Posted March 11, 2006 How big is the program, and does the error occur right as you loud (before any form shows up) or at any other time? Quote
MrLucky Posted March 11, 2006 Author Posted March 11, 2006 It's a small program (I think in doesn't contain more than 1000 lines), and the error occurs before the form loads Quote
Shurikn Posted March 11, 2006 Posted March 11, 2006 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 Quote
MrLucky Posted March 13, 2006 Author Posted March 13, 2006 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 :) Quote
*Experts* Nerseus Posted March 13, 2006 *Experts* Posted March 13, 2006 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 Quote "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
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.