473,395 Members | 1,689 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,395 software developers and data experts.

An unhandled exception of type 'System...............

i got error problem..........
An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object..
Namespace PirateChat <========== error occurred in here

Public Class mainPirateChat
Inherits System.Windows.Forms.Form.
..
..
..
..
..
End Class
End Namespace

i have search in microsoft and google too. but i don't see nothing
declaring variables. the only i wrote small code that fine. but when i
added some more codes i got error problem.
how to i trap error problem?
regards,

Nov 21 '05 #1
9 3148
Supra,

I do not see it directly, what I am first thinking about, is that it is not
impossible that you have an endless loop and your program goes out of mem.

Cor

"Supra" <su*****@rogers.com>
i got error problem..........
An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object..
Namespace PirateChat <========== error occurred in here

Public Class mainPirateChat
Inherits System.Windows.Forms.Form.
.
.
.
.
.
End Class
End Namespace

i have search in microsoft and google too. but i don't see nothing
declaring variables. the only i wrote small code that fine. but when i
added some more codes i got error problem.
how to i trap error problem?
regards,

Nov 21 '05 #2
Supra,

I do not see it directly, what I am first thinking about, is that it is not
impossible that you have an endless loop and your program goes out of mem.

Cor

"Supra" <su*****@rogers.com>
i got error problem..........
An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object..
Namespace PirateChat <========== error occurred in here

Public Class mainPirateChat
Inherits System.Windows.Forms.Form.
.
.
.
.
.
End Class
End Namespace

i have search in microsoft and google too. but i don't see nothing
declaring variables. the only i wrote small code that fine. but when i
added some more codes i got error problem.
how to i trap error problem?
regards,

Nov 21 '05 #3
here is debug:

NOTICE AUTH :*** Looking up your hostname
NOTICE AUTH :*** Checking Ident
NOTICE AUTH :*** Couldn't look up your hostname

PING :23273344

Oslo2.NO.EU.undernet.org 001 djanjo2 :Welcome to the UnderNet IRC
Network, djanjo2
Oslo2.NO.EU.undernet.org 002 djanjo2 :Your host is
Oslo2.NO.EU.undernet.org, running version u2.10.11.06
Oslo2.NO.EU.undernet.org 003 djanjo2 :This server was created Sun Jan 11
2004 at 04:21:44 CET
Oslo2.NO.EU.undernet.org 004 djanjo2 Oslo2.NO.EU.undernet.org
u2.10.11.06 dioswkgx biklmnopstvr bklov
Oslo2.NO.EU.undernet.org 255 djanjo2 :I have 5132 clients and 1 servers
:Highest connection count: 7804 (7803 clients)
Oslo2.NO.EU.undernet.org 375 djanjo2 :- Oslo2.NO.EU.undernet.org Message
of the Day -
An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
;
;
;
at PirateChat.PirateChat.mainPirateChat.Main() in C:\Documents and
Settings\Afraz\My Documents\Visual Studio
Projects\VbNet\project\PirateChat\mainPirateChat.v b:line 14

I don't see nothing "instance of object"
additional information: Object reference not set to an instance of an
object..
regards

Cor Ligthert wrote:
Supra,

I do not see it directly, what I am first thinking about, is that it is not
impossible that you have an endless loop and your program goes out of mem.

Cor

"Supra" <su*****@rogers.com>
i got error problem..........
An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object..
Namespace PirateChat <========== error occurred in here

Public Class mainPirateChat
Inherits System.Windows.Forms.Form.
.
.
.
.
.
End Class
End Namespace

i have search in microsoft and google too. but i don't see nothing
declaring variables. the only i wrote small code that fine. but when i
added some more codes i got error problem.
how to i trap error problem?
regards,



Nov 21 '05 #4
here is debug:

NOTICE AUTH :*** Looking up your hostname
NOTICE AUTH :*** Checking Ident
NOTICE AUTH :*** Couldn't look up your hostname

PING :23273344

Oslo2.NO.EU.undernet.org 001 djanjo2 :Welcome to the UnderNet IRC
Network, djanjo2
Oslo2.NO.EU.undernet.org 002 djanjo2 :Your host is
Oslo2.NO.EU.undernet.org, running version u2.10.11.06
Oslo2.NO.EU.undernet.org 003 djanjo2 :This server was created Sun Jan 11
2004 at 04:21:44 CET
Oslo2.NO.EU.undernet.org 004 djanjo2 Oslo2.NO.EU.undernet.org
u2.10.11.06 dioswkgx biklmnopstvr bklov
Oslo2.NO.EU.undernet.org 255 djanjo2 :I have 5132 clients and 1 servers
:Highest connection count: 7804 (7803 clients)
Oslo2.NO.EU.undernet.org 375 djanjo2 :- Oslo2.NO.EU.undernet.org Message
of the Day -
An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
;
;
;
at PirateChat.PirateChat.mainPirateChat.Main() in C:\Documents and
Settings\Afraz\My Documents\Visual Studio
Projects\VbNet\project\PirateChat\mainPirateChat.v b:line 14

I don't see nothing "instance of object"
additional information: Object reference not set to an instance of an
object..
regards

Cor Ligthert wrote:
Supra,

I do not see it directly, what I am first thinking about, is that it is not
impossible that you have an endless loop and your program goes out of mem.

Cor

"Supra" <su*****@rogers.com>
i got error problem..........
An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object..
Namespace PirateChat <========== error occurred in here

Public Class mainPirateChat
Inherits System.Windows.Forms.Form.
.
.
.
.
.
End Class
End Namespace

i have search in microsoft and google too. but i don't see nothing
declaring variables. the only i wrote small code that fine. but when i
added some more codes i got error problem.
how to i trap error problem?
regards,



Nov 21 '05 #5
"Supra" <su*****@rogers.com> schrieb:
here is debug: at PirateChat.PirateChat.mainPirateChat.Main() in C:\Documents and
Settings\Afraz\My Documents\Visual Studio
Projects\VbNet\project\PirateChat\mainPirateChat. vb:line 14


Can you post the source code of your main method? What's the code on line
14?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #6
"Supra" <su*****@rogers.com> schrieb:
here is debug: at PirateChat.PirateChat.mainPirateChat.Main() in C:\Documents and
Settings\Afraz\My Documents\Visual Studio
Projects\VbNet\project\PirateChat\mainPirateChat. vb:line 14


Can you post the source code of your main method? What's the code on line
14?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #7
'February 2004
'An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
'Additional information: Object reference not set to an instance of an
object.
Option Explicit On
Option Strict Off

Imports System
Imports System.Text
'Imports System.Net.Dns
'Imports System.Net.Sockets

Namespace PirateChat

Public Class mainPirateChat <===== The error occurred here in line 14
Inherits System.Windows.Forms.Form

Private WithEvents netBots As New PirateChat.ClientFactory
Private WithEvents Netsock As New PirateChat.SockFactory
Dim clsReader As New PirateChat.clsReadWriteXML
Dim nlform As New PirateChat.frmNotifyLists
Dim frmPref As New PirateChat.frmPreferences
:
:
:
:
End Class
End Namespace


Herfried K. Wagner [MVP] wrote:
"Supra" <su*****@rogers.com> schrieb:
here is debug:


at PirateChat.PirateChat.mainPirateChat.Main() in C:\Documents and
Settings\Afraz\My Documents\Visual Studio
Projects\VbNet\project\PirateChat\mainPirateChat.v b:line 14

Can you post the source code of your main method? What's the code on
line 14?


Nov 21 '05 #8
everytimes i changed and modified code again.this is comming from this
event i put another first class.vb and this second class.vb is calling
from first class . and second class goes into mainPirchatechat form.

this is first class. if i change code again i will get error line 14
from mainPirateChat form
Private Sub Netsock_onDataArrival(ByVal Data() As Byte, ByVal
TotalBytes As Integer) Handles Netsock.onDataArrival
Dim inData As String = Netsock.BytestoString(Data)
Dim lData(), C(), CLi As String, tData, CL, a, i As Integer
Dim b() As String

lData = Split(inData, Chr(10))
tData = UBound(lData) - LBound(lData)

For a = 0 To tData
If Mid(lData(a), 1, 1) = ":" Then
lData(a) = Mid(lData(a), 2)
End If
Next

For CL = 0 To tData
C = Split(lData(CL), " ")
ReDim Preserve C(32767)
CLi = lData(CL)

Dim spNick As String(), sNick As String
Dim strNick As String = CLi
spNick = strNick.Split("!")
sNick = spNick(0)

If C(0) = "PING" Then
'
nStatus.rtbStatus.DisplayMessage(nStatus.rtbStatus , "PONG :" &
C(1).Substring(1))
RaiseEvent onSeverMessage("PONG :" & C(1).Substring(1))
Netsock.SendData(Netsock.StringToBytes("PONG :" &
C(1).Substring(1) & vbCrLf))
End If

If C(0) = "ERROR" Then
Dim int2 As Integer = CLi.IndexOf(":")
CLi = CLi.Substring(int2 + 1)
RaiseEvent onSeverMessage(CLi.ToString)
End If

If C(0) = "NOTICE" Then
Dim int3 As Integer = CLi.IndexOf("NOTICE")
CLi = CLi.Substring(C(0).Length - 6)
RaiseEvent onSeverMessage(CLi)
ElseIf C(1) = "NOTICE" And C(2) = "AUTH" Then
Dim int1 As Integer = CLi.IndexOf(C(0))
CLi = CLi.Substring(C(0).Length)
RaiseEvent onSeverMessage(CLi)
ElseIf C(1) = "NOTICE" And C(2) = Netsock.Nick Then
Dim nic As Integer = CLi.IndexOf(C(0))
CLi = CLi.Substring(C(0).Length + 1 + C(1).Length +
1 + Netsock.Nick.Length)
RaiseEvent onSeverMessage(CLi)
End If

'Select Case C(1)
'Case "001" To "376"
If C(2) = Netsock.Nick Then
Dim servString As String
Dim intI As Integer = CLi.IndexOf(Netsock.Nick)
servString = CLi.Substring(intI + Netsock.Nick.Length)
RaiseEvent onSeverMessage(servString)
servString = String.Empty
End If
'End Select
Debug.WriteLine(CLi)

Next
End Sub

regards,

Supra wrote:
'February 2004
'An unhandled exception of type 'System.NullReferenceException'
occurred in system.windows.forms.dll
'Additional information: Object reference not set to an instance of an
object.
Option Explicit On
Option Strict Off

Imports System
Imports System.Text
'Imports System.Net.Dns
'Imports System.Net.Sockets

Namespace PirateChat

Public Class mainPirateChat <===== The error occurred here in
line 14
Inherits System.Windows.Forms.Form

Private WithEvents netBots As New PirateChat.ClientFactory
Private WithEvents Netsock As New PirateChat.SockFactory
Dim clsReader As New PirateChat.clsReadWriteXML
Dim nlform As New PirateChat.frmNotifyLists
Dim frmPref As New PirateChat.frmPreferences
:
:
:
:
End Class
End Namespace


Herfried K. Wagner [MVP] wrote:
"Supra" <su*****@rogers.com> schrieb:
here is debug:

at PirateChat.PirateChat.mainPirateChat.Main() in C:\Documents and
Settings\Afraz\My Documents\Visual Studio
Projects\VbNet\project\PirateChat\mainPirateChat.v b:line 14


Can you post the source code of your main method? What's the code on
line 14?


Nov 21 '05 #9
Herfried,
i solved it.
regards,

Supra wrote:
everytimes i changed and modified code again.this is comming from this
event i put another first class.vb and this second class.vb is calling
from first class . and second class goes into mainPirchatechat form.

this is first class. if i change code again i will get error line 14
from mainPirateChat form
Private Sub Netsock_onDataArrival(ByVal Data() As Byte, ByVal
TotalBytes As Integer) Handles Netsock.onDataArrival
Dim inData As String = Netsock.BytestoString(Data)
Dim lData(), C(), CLi As String, tData, CL, a, i As Integer
Dim b() As String

lData = Split(inData, Chr(10))
tData = UBound(lData) - LBound(lData)

For a = 0 To tData
If Mid(lData(a), 1, 1) = ":" Then
lData(a) = Mid(lData(a), 2)
End If
Next

For CL = 0 To tData
C = Split(lData(CL), " ")
ReDim Preserve C(32767)
CLi = lData(CL)

Dim spNick As String(), sNick As String
Dim strNick As String = CLi
spNick = strNick.Split("!")
sNick = spNick(0)

If C(0) = "PING" Then
'
nStatus.rtbStatus.DisplayMessage(nStatus.rtbStatus , "PONG :" &
C(1).Substring(1))
RaiseEvent onSeverMessage("PONG :" &
C(1).Substring(1))
Netsock.SendData(Netsock.StringToBytes("PONG :" &
C(1).Substring(1) & vbCrLf))
End If

If C(0) = "ERROR" Then
Dim int2 As Integer = CLi.IndexOf(":")
CLi = CLi.Substring(int2 + 1)
RaiseEvent onSeverMessage(CLi.ToString)
End If

If C(0) = "NOTICE" Then
Dim int3 As Integer = CLi.IndexOf("NOTICE")
CLi = CLi.Substring(C(0).Length - 6)
RaiseEvent onSeverMessage(CLi)
ElseIf C(1) = "NOTICE" And C(2) = "AUTH" Then
Dim int1 As Integer = CLi.IndexOf(C(0))
CLi = CLi.Substring(C(0).Length)
RaiseEvent onSeverMessage(CLi)
ElseIf C(1) = "NOTICE" And C(2) = Netsock.Nick Then
Dim nic As Integer = CLi.IndexOf(C(0))
CLi = CLi.Substring(C(0).Length + 1 + C(1).Length +
1 + Netsock.Nick.Length)
RaiseEvent onSeverMessage(CLi)
End If

'Select Case C(1)
'Case "001" To "376"
If C(2) = Netsock.Nick Then
Dim servString As String
Dim intI As Integer = CLi.IndexOf(Netsock.Nick)
servString = CLi.Substring(intI + Netsock.Nick.Length)
RaiseEvent onSeverMessage(servString)
servString = String.Empty
End If
'End Select
Debug.WriteLine(CLi)

Next
End Sub

regards,

Supra wrote:
'February 2004
'An unhandled exception of type 'System.NullReferenceException'
occurred in system.windows.forms.dll
'Additional information: Object reference not set to an instance of
an object.
Option Explicit On
Option Strict Off

Imports System
Imports System.Text
'Imports System.Net.Dns
'Imports System.Net.Sockets

Namespace PirateChat

Public Class mainPirateChat <===== The error occurred here in
line 14
Inherits System.Windows.Forms.Form

Private WithEvents netBots As New PirateChat.ClientFactory
Private WithEvents Netsock As New PirateChat.SockFactory
Dim clsReader As New PirateChat.clsReadWriteXML
Dim nlform As New PirateChat.frmNotifyLists
Dim frmPref As New PirateChat.frmPreferences
:
:
:
:
End Class
End Namespace


Herfried K. Wagner [MVP] wrote:
"Supra" <su*****@rogers.com> schrieb:

here is debug:


at PirateChat.PirateChat.mainPirateChat.Main() in C:\Documents and
Settings\Afraz\My Documents\Visual Studio
Projects\VbNet\project\PirateChat\mainPirateChat.v b:line 14


Can you post the source code of your main method? What's the code
on line 14?


Nov 21 '05 #10

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

Similar topics

1
by: Rafael | last post by:
Hi, I hope I can find some help for this problem IDE: Visual Studio.NET 2003 Developer Editio Language: C# Problem: "An unhandled exception of type 'System.NullReferenceException' occurred in...
0
by: Oliver | last post by:
Hello, I may have posted in the wrong place, if so, feel free to move my post (just notify me where you put it via email or something) I’m having a problem with my program that I cant...
3
by: Professor Frink | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
0
by: Joe Bloggs | last post by:
I have a C# MRS application that uses the ReportingService's Render method to retrieve a byte array containing a report. The following error message occurs An unhandled exception of type...
4
by: Craig831 | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
5
by: Lucvdv | last post by:
Can someone explain why this code pops up a messagebox saying the ThreadAbortException wasn't handled? The first exception is reported only in the debug pane, as expected. The second (caused by...
5
by: Samuel R. Neff | last post by:
When you have an unhandled exception in vb.net how do you view the exception information in the debugger? In C# the debugger creates a local variable that points to the exception and you can...
0
by: Colmeister | last post by:
I recently read Jason Clark's excellent article on Unhandled Exceptions (http://msdn.microsoft.com/msdnmag/issues/04/06/NET/default.aspx) and have attempted to incorporate the features he talks...
5
by: Ankit Aneja | last post by:
This is my problem. I am using Visual 2003, .Net framework 1.1 and the Application Block I configured the DAAB using the Enterprise Library Configuration now this is the error which is coming ...
1
by: =?Utf-8?B?Wmlub24=?= | last post by:
Hello I have an ASP.NET 2 intranet application written in C#. I use Active Directory authentication and parts of the application uses AJAX. From time to time (about once every 200-300 accesses...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.