Package and deployment help

otuatail

Active member
Joined
May 25, 2011
Messages
28
Programming Experience
5-10
Hi I created a simple app that builds ok and runs ok.
I created an aditional setup that also builds ok.

However when run I get this.
//
Microsoft.NET Framework
Unhandled exception has occured in your application. If you click continue the application will ignore this error
and attempt to continue...
Object reference not set to an instance of an object.
//

However when I click continue it runs ok.

This is the additional information for the error/warning.


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at InterestCalculator.cmdInterest.cmdInterest_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
InterestCalculator
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///E:/Interest Calculator/InterestCalculator.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSI....0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
 
The call stack is telling you what the error is and where it is:
System.NullReferenceException: Object reference not set to an instance of an object.
at InterestCalculator.cmdInterest.cmdInterest_Load(Ob ject sender, EventArgs e)
The application may run but the line on which the exception is thrown is not completing and nothing after that line in that method is being executed either. That situation could be anything from not a problem to catastrophic, depending on the code.

It's a known issue that exceptions thrown in the Load event handler of a form (maybe just the startup form, not sure) get swallowed on 64-bit systems. You need to put an exception handler in that event handler to determine exactly where the issue is occurring so that you can fix it.
 
Back
Top