By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,417 Members | 1,178 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,417 IT Pros & Developers. It's quick & easy.

Runtime Error but no error in debugger?

P: n/a
I have been beating this around for 6 or 8 hours now. I swear it used to
work but I've changed quite a few things. I tried to revert to an earlier
version but it does the same thing now. When I run my code in the GDI it
runs fine. However, when I compile, install and run it I get an error. I am
trapping them. I posted the error log below. Any ideas what I'm missing
here?

System.NullReferenceException: Object reference not set to an instance of an
object.
at CPViewer.frmSaveConfig.btnTest_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Thanks,
John
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Resolved!

"jcrouse" <me> wrote in message
news:u8**************@TK2MSFTNGP09.phx.gbl...
I have been beating this around for 6 or 8 hours now. I swear it used to
work but I've changed quite a few things. I tried to revert to an earlier
version but it does the same thing now. When I run my code in the GDI it
runs fine. However, when I compile, install and run it I get an error. I am trapping them. I posted the error log below. Any ideas what I'm missing
here?

System.NullReferenceException: Object reference not set to an instance of an object.
at CPViewer.frmSaveConfig.btnTest_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Thanks,
John

Nov 21 '05 #2

P: n/a
Silly question, but what did you do to fix it?

I have seen this sort of error when a user copies their code to a cdrom and
then they copy it on another drive. Cdroms will automatically set all code
and anything else in their folders to readonly. The fix is to right click on
the main folder and uncheck the readonly for the main and all the sub files.
It should work then.

Rachel

"jcrouse" wrote:
Resolved!

"jcrouse" <me> wrote in message
news:u8**************@TK2MSFTNGP09.phx.gbl...
I have been beating this around for 6 or 8 hours now. I swear it used to
work but I've changed quite a few things. I tried to revert to an earlier
version but it does the same thing now. When I run my code in the GDI it
runs fine. However, when I compile, install and run it I get an error. I

am
trapping them. I posted the error log below. Any ideas what I'm missing
here?

System.NullReferenceException: Object reference not set to an instance of

an
object.
at CPViewer.frmSaveConfig.btnTest_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Thanks,
John


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.