tuyendothanh / nmodbus

Automatically exported from code.google.com/p/nmodbus
0 stars 0 forks source link

ModbusTcpMasterReadInputs example #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. I'm test ModbusTcpMasterReadInputs example.

What is the expected output? What do you see instead?

Console was output right results. But when program closed program fallen at
function TcpStreamAdapter.EndWrite with message 
Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.

If I'm run debug mode, program execute without problem.

What version of the product are you using? On what operating system?
I'm used last version 1.3.0.2. WinXP.

Please provide any additional information below.

Original issue reported on code.google.com by Vladimir...@gmail.com on 28 Aug 2007 at 9:35

GoogleCodeExporter commented 9 years ago
A fix is checked in. 

Thanks

Original comment by sja...@gmail.com on 31 Aug 2007 at 3:41

GoogleCodeExporter commented 9 years ago

Original comment by sja...@gmail.com on 2 Dec 2007 at 1:32

GoogleCodeExporter commented 9 years ago
I meet this peoblem now,I use NModbus version is 1.2.0 ,with VS2005 develope 
tool, 
this exception throw , then ,i use ver 1.4.3,another exception throw

Original comment by yufeng5...@gmail.com on 1 Aug 2008 at 8:30

GoogleCodeExporter commented 9 years ago
please provide more information about the exception you are receiving.

Original comment by sja...@gmail.com on 2 Aug 2008 at 11:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
unsettled System.ObjectDisposedException
  Message="Cannot access a disposed object。
object:“System.Net.Sockets.NetworkStream”。"
  Source="System"
  ObjectName="System.Net.Sockets.NetworkStream"
  StackTrace:
       at System.Net.Sockets.NetworkStream.EndWrite(IAsyncResult asyncResult)
       at Modbus.IO.TcpStreamAdapter.EndWrite(IAsyncResult asyncResult) site 
D:\source\src\Modbus\IO\TcpStreamAdapter.cs:line 38
       at Modbus.IO.ModbusTcpTransport.WriteCompleted(IAsyncResult ar) site 
D:\source\src\Modbus\IO\ModbusTcpTransport.cs:line 128
       at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
       at System.Net.ContextAwareResult.CompleteCallback(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, 
ContextCallback callback, Object state)
       at System.Net.ContextAwareResult.Complete(IntPtr userToken)
       at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr 
userToken)
       at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 
errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
       at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 
errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

After read sometimes,this exception  will throw. cann't catch it ,but if do 
nothing 
with the exception interface,read will be normal. if close the exception 
interface,program will exit.

Original comment by yufeng5...@gmail.com on 4 Aug 2008 at 3:53