468,720 Members | 1,602 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,720 developers. It's quick & easy.

Program crashes on logoff but not regular closing

I have a program that exits just fine when you close it manually, but
throws an unhandled exception when I try to log off windows. It
suggests I enable the JIT debugger, but when I compile the program in
debug mode and enable JIT debugging it closes fine, though the logoff
process is aborted. I am using a couple of activex controls that .net
generated wrappers for, so I don't know if that has anything to do
with it, but my program closes fine manually and afaik windows calls
the same event when its trying to close a program.

Thanks in advance,
Luke
Nov 20 '05 #1
3 1138
* fa********@hotmail.com (Luke) scripsit:
I have a program that exits just fine when you close it manually, but
throws an unhandled exception when I try to log off windows. It
suggests I enable the JIT debugger, but when I compile the program in
debug mode and enable JIT debugging it closes fine, though the logoff


Post the complexe exception message.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
fa********@hotmail.com (Luke) wrote in message news:<cc**************************@posting.google. com>...
I have a program that exits just fine when you close it manually, but
throws an unhandled exception when I try to log off windows. It
suggests I enable the JIT debugger, but when I compile the program in
debug mode and enable JIT debugging it closes fine, though the logoff
process is aborted. I am using a couple of activex controls that .net
generated wrappers for, so I don't know if that has anything to do
with it, but my program closes fine manually and afaik windows calls
the same event when its trying to close a program.

Thanks in advance,
Luke


The text of the exception is:

System.NullReferenceException: Object reference not set to an instance
of an object.
at System.Windows.Forms.UnsafeNativeMethods.CallWindo wProc(IntPtr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Messa ge& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.AxHost.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)

I realize this is all very general but if someone could just point me
in the right direction I'd be grateful.
Nov 20 '05 #3
hi***************@gmx.at (Herfried K. Wagner [MVP]) wrote in message news:<2g************@uni-berlin.de>...
* fa********@hotmail.com (Luke) scripsit:
I have a program that exits just fine when you close it manually, but
throws an unhandled exception when I try to log off windows. It
suggests I enable the JIT debugger, but when I compile the program in
debug mode and enable JIT debugging it closes fine, though the logoff


Post the complexe exception message.


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance
of an object.
at System.Windows.Forms.UnsafeNativeMethods.CallWindo wProc(IntPtr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Messa ge& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.AxHost.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)
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by puppet_sock | last post: by
reply views Thread by Allan Bredahl | last post: by
1 post views Thread by Michael D. Reed | last post: by
2 posts views Thread by spncc | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.