472,807 Members | 1,632 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,807 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 3087
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.