473,387 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Error Starting APP in the GDI

I moved a bunch of code and variable declaration around to make things a
little more efficient. Now when i try and run the app I get the following
error:

An unhandled exception of type 'System.NullReferenceException' occurred in
Unknown Module.
Additional information: Object reference not set to an instance of an
object.

The problem is that i can't debug it. I have put breakpoints everywhere and
can't find the problem. In my startup module everything seems to initialize
properly. I then run the following code:

Application.Run(frm1)
Inside the load event for this form i step through everything and it all
seem good. Here is the load event:

Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim strFiles() As String =
Directory.GetFiles(Application.StartupPath & "\Layout Files")

If strFiles.Length > 0 Then

mnuMainNewConfig.Enabled = True

End If

bSaveTrigger = False

frm1.strExitKey = ""

End Sub
I get all the way through to the end sub then when i click the "step into"
button the error occurs. I don't know how to debug deeper or what to do
next. Please help.

Thank you,
John
Nov 20 '05 #1
2 1043
More....When I select the break button, I get the following error:

There is no source code available for the current location.

I'm sure I moved something wrongly, I just don't know how to find out what.

Thnaks again,

John

"jcrouse" <me> wrote in message news:uW*************@TK2MSFTNGP11.phx.gbl...
I moved a bunch of code and variable declaration around to make things a
little more efficient. Now when i try and run the app I get the following
error:

An unhandled exception of type 'System.NullReferenceException' occurred in
Unknown Module.
Additional information: Object reference not set to an instance of an
object.

The problem is that i can't debug it. I have put breakpoints everywhere and can't find the problem. In my startup module everything seems to initialize properly. I then run the following code:

Application.Run(frm1)
Inside the load event for this form i step through everything and it all
seem good. Here is the load event:

Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim strFiles() As String =
Directory.GetFiles(Application.StartupPath & "\Layout Files")

If strFiles.Length > 0 Then

mnuMainNewConfig.Enabled = True

End If

bSaveTrigger = False

frm1.strExitKey = ""

End Sub
I get all the way through to the end sub then when i click the "step into"
button the error occurs. I don't know how to debug deeper or what to do
next. Please help.

Thank you,
John

Nov 20 '05 #2
Well....I seem to have found it. This piece of code was wrong:

If strMyStartupArguments.Length = "1" Then

If frm1 Is Nothing OrElse frm1.IsDisposed Then

frm1 = New Form1

End If

myForms.form1 = frm1

Application.Run(frm1)

Exit Sub

End If
I needed to read like this:

If strMyStartupArguments.Length = "1" Then

If frm1 Is Nothing OrElse frm1.IsDisposed Then

frm1 = New Form1

End If

Application.Run(frm1)

myForms.form1 = frm1

Exit Sub

End If
Can someone explain this so I understand?

Thank you,
John

"jcrouse" <me> wrote in message news:uW*************@TK2MSFTNGP11.phx.gbl...
I moved a bunch of code and variable declaration around to make things a
little more efficient. Now when i try and run the app I get the following
error:

An unhandled exception of type 'System.NullReferenceException' occurred in
Unknown Module.
Additional information: Object reference not set to an instance of an
object.

The problem is that i can't debug it. I have put breakpoints everywhere and can't find the problem. In my startup module everything seems to initialize properly. I then run the following code:

Application.Run(frm1)
Inside the load event for this form i step through everything and it all
seem good. Here is the load event:

Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim strFiles() As String =
Directory.GetFiles(Application.StartupPath & "\Layout Files")

If strFiles.Length > 0 Then

mnuMainNewConfig.Enabled = True

End If

bSaveTrigger = False

frm1.strExitKey = ""

End Sub
I get all the way through to the end sub then when i click the "step into"
button the error occurs. I don't know how to debug deeper or what to do
next. Please help.

Thank you,
John

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Richard Gabriel | last post by:
Hi all, The following keeps happening and I can't pinpoint a query that is causing it. It did not happen in 3.23.x, but started upon upgrading to 4.0.14. The operating system/hardware...
0
by: Chris Halcrow | last post by:
Hi I've spent ALL DAY trying to re-install SQL Server 2000 on Windows XP. I continually get the error 'cannot configure server' just at the end of the installation. I've tried the following: ...
0
by: Max | last post by:
Hi Folks, I'm received this error on starting Control Center from the Start menu.... db2javit.dll This file does not have a program associated with it for performing this action. Create an...
6
by: Joe | last post by:
C# .NET 2.0 I've got a Windows Service that works exactly as I expect it to. However, it does rely on a few Configuration settings. If the customer doesn't configure it correctly, the service...
1
by: whitehorse | last post by:
When the warehousecontroller service is invoked, the following error message is sent to the application log: Event Type: Error Event Source: TFS Warehouse Event Category: None Event ID: 3000...
8
by: sara | last post by:
I have a report that runs fine with data. If there is no data, I have its NO Data event sending a MsgBox and cancelling the report. Then it seems I still get the 2501 message on the Open Report...
0
by: pavankumarveera | last post by:
how to unblock the CF below error what was the solution. GES: Potential blocker (pid=282) on resource CF-00000000-00000000; enqueue info in file...
1
by: brasewel | last post by:
Hi guys...I keep getting an error saying "Cannot access memory at address 0x2e". I have commented at which line it occurs. The code compiles but spits out the error at runtime. Any help would be...
12
by: jonatan | last post by:
Hello All, I am making a program and need the grt_main.c but i try to compile have the error c1004.Please help me how to solve it? Thank you. --------------------Configuration: pre - Win32...
9
by: arnuld | last post by:
Can anyone point me to some online/offline document on error handling in C ? I am doing some Socket Programming in C and feeling a lots of difficult in error handling :( Also some time ago...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.