I just started to learn C# (my background is in C++), and right now I
study the sockets, TCP/IP etc... so, I found a usefull source code at: http://www.codeguru.com/Csharp/Cshar...cle.php/c8781/.
But there is a scenarion that throw a strange exception. So, the client
is connected to the server, I send a message from client to server and
viceversa and than I stop the server from the 'x' button from the right-up
corner; in that moment the client throw System.NullRefe renceException:
An unhandled exception of type 'System.NullRef erenceException ' occurred
in system.dll
Additional information: Object reference not set to an instance of an
object.
the cursor is placed here:
000000a0 0F B6 F0 movzx esi,al
and the Call Stack stopped here:
system.dll!Syst em.Net.Sockets. OverlappedAsync Result.Completi onPortCallback( uint
errorCode = 64, uint numBytes = 0, System.Threadin g.NativeOverlap ped*
nativeOverlappe d = 1750608) + 0xa0 bytes
There is a solution?
Thank you in advance.
..:Alex:. 3 3655
Hi,
What escenrio?
What is the code you were executing when this exception is thrown
That exception happen when you are access a variable that is null
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Alex J." <al*******@yaho o.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. .. I just started to learn C# (my background is in C++), and right now I study the sockets, TCP/IP etc... so, I found a usefull source code at: http://www.codeguru.com/Csharp/Cshar...cle.php/c8781/. But there is a scenarion that throw a strange exception. So, the client is connected to the server, I send a message from client to server and viceversa and than I stop the server from the 'x' button from the right-up corner; in that moment the client throw System.NullRefe renceException:
An unhandled exception of type 'System.NullRef erenceException ' occurred in system.dll Additional information: Object reference not set to an instance of an object.
the cursor is placed here: 000000a0 0F B6 F0 movzx esi,al
and the Call Stack stopped here:
system.dll!Syst em.Net.Sockets. OverlappedAsync Result.Completi onPortCallback( uint errorCode = 64, uint numBytes = 0, System.Threadin g.NativeOverlap ped* nativeOverlappe d = 1750608) + 0xa0 bytes
There is a solution?
Thank you in advance.
.:Alex:.
Hi,
I don't know if you took a look at the source code from this url: http://www.codeguru.com/Csharp/Cshar...cle.php/c8781/
Try to make 2 projects from these files a client and a server. 'Start
Listen' the server and then connect the client to the server. Kill the
server from procesess (task manager).
You will se how the client throw the exeption in subject:
System.NullRefe renceException
Let me know if you understand me.
Thank you for your attention.
..:Alex:.
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us > wrote
in message news:OS******** ******@tk2msftn gp13.phx.gbl... Hi,
What escenrio?
What is the code you were executing when this exception is thrown
That exception happen when you are access a variable that is null
-- Ignacio Machin, ignacio.machin AT dot.state.fl.us Florida Department Of Transportation
"Alex J." <al*******@yaho o.com> wrote in message news:%2******** ********@TK2MSF TNGP15.phx.gbl. .. I just started to learn C# (my background is in C++), and right now I study the sockets, TCP/IP etc... so, I found a usefull source code at: http://www.codeguru.com/Csharp/Cshar...cle.php/c8781/. But there is a scenarion that throw a strange exception. So, the client is connected to the server, I send a message from client to server and viceversa and than I stop the server from the 'x' button from the right-up corner; in that moment the client throw System.NullRefe renceException:
An unhandled exception of type 'System.NullRef erenceException ' occurred in system.dll Additional information: Object reference not set to an instance of an object.
the cursor is placed here: 000000a0 0F B6 F0 movzx esi,al
and the Call Stack stopped here:
system.dll!Syst em.Net.Sockets. OverlappedAsync Result.Completi onPortCallback( uint errorCode = 64, uint numBytes = 0, System.Threadin g.NativeOverlap ped* nativeOverlappe d = 1750608) + 0xa0 bytes
There is a solution?
Thank you in advance.
.:Alex:.
> That exception happen when you are access a variable that is null
ok, d'accord :), but where exactly it happens in that code?
Do you have a ideea?
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us > wrote
in message news:OS******** ******@tk2msftn gp13.phx.gbl... Hi,
What escenrio?
What is the code you were executing when this exception is thrown
That exception happen when you are access a variable that is null
-- Ignacio Machin, ignacio.machin AT dot.state.fl.us Florida Department Of Transportation
"Alex J." <al*******@yaho o.com> wrote in message news:%2******** ********@TK2MSF TNGP15.phx.gbl. .. I just started to learn C# (my background is in C++), and right now I study the sockets, TCP/IP etc... so, I found a usefull source code at: http://www.codeguru.com/Csharp/Cshar...cle.php/c8781/. But there is a scenarion that throw a strange exception. So, the client is connected to the server, I send a message from client to server and viceversa and than I stop the server from the 'x' button from the right-up corner; in that moment the client throw System.NullRefe renceException:
An unhandled exception of type 'System.NullRef erenceException ' occurred in system.dll Additional information: Object reference not set to an instance of an object.
the cursor is placed here: 000000a0 0F B6 F0 movzx esi,al
and the Call Stack stopped here:
system.dll!Syst em.Net.Sockets. OverlappedAsync Result.Completi onPortCallback( uint errorCode = 64, uint numBytes = 0, System.Threadin g.NativeOverlap ped* nativeOverlappe d = 1750608) + 0xa0 bytes
There is a solution?
Thank you in advance.
.:Alex:.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Terrence |
last post by:
I am doing some of the C# walkthroughs to transition from
VB to C#. When I try to execute
static void Main()
{
Aplication.Run(new Form1())
}
I raise a 'System.NullReferenceException" in
system.windows.forms.dll
|
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 system.windows.forms.dll. Additional information: Object reference not set to an instance of an object.
Visual Studio's IDE is not allowing me to develop projects in C#... I've trying to create a simple Windows Forms project using Visual Studio.NET...
|
by: mike p. |
last post by:
I have a docbook xml file, and am using standard docbook 1.61.3 xsl
stylesheets to do xhtml transform. Transform works fine when using
MSXML.
When I try to do the following using asp.net 1.1:
private void Page_Load(object sender, System.EventArgs e) {
// load content
XslTransform trans = new XslTransform();
|
by: muralidharan |
last post by:
WebForm1.aspx Code:
<%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI"
Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView
id="TreeView1" Height="520" AutoPostBackOnNodeMove="false"
DragAndDropEnabled="true"
NodeEditingEnabled="False" KeyboardEnabled="true"
CssClass="TreeView" NodeCssClass="TreeNode"
SelectedNodeCssClass="SelectedTreeNode"
HoverNodeCssClass="HoverTreeNode" NodeEditCssClass="NodeEdit"
|
by: Matthias Kwiedor |
last post by:
Hi!
I want to create a WebBrowser Control at runtime. So i ported the "at
start creation" of the Control to a new routine.
Everything works fine, but i implement the BeforeNavigateFix and a own
Content Menu. For this i need this lines:
public void create_new_browser()
| |
by: Raed Sawalha |
last post by:
i have a windows form(Main) with listview, when click an item in listview i
open other window form (Sub) which generate the selected item from parent
window in as treeview items when click any item in treeview i display the
content item in axWebBrowser, i close the sub form normally when i close the
main the following error is generated
An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll
...
|
by: msnews.microsoft.com |
last post by:
I'm trying to fill an array of objects but when I add the first object I get
a NullReferenceException.
----------------------------------------------------------------------------
-------------------------------------------
Public Class TestClass
Public NextSubIndex As Integer = 1
Public arrTestSubClass() As TestSubClass
|
by: sxiao |
last post by:
Hi, there
I got a NullReferenceException when there are more than one users
trying to open the same page at the same time. The senerio is:
Two users logged into the web application using the Windows domain user
account and tried to open the same page which has the databasde query
code. When the two user tried to open the same page at the same time,
there is a runtime error messsage showing as follows:
|
by: William Mild |
last post by:
I must be getting brain fried. I can't see the error.
Create a new web form with the following code begind:
Public Class test
Inherits System.Web.UI.Page
Public Class ReportCardData
Public Structure Attend
Dim DaysTardy As Double
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |