|
From: Bob Trabucco on 16 Jul 2008 09:34 Hello all. I have a application written in the 3.5 Compact Framework running on Windows Mobile devices. VB.NET VS 2008. The application communicates with our server using the System.Net.Sockets.TcpClient class This code used to communicate works flawlessly in our regular windows application. It also works wonderfully when the device (Treo 700 is my test case) is plugged into a PC with the USB cable. When not plugged in and using the internet over the cell phone it will occasionally crash with: ObjectDisposedException at System.Threading.Timer.throwIfDisposed() at System.Threading.Timer.Change(UInt32 dueTime, UInt32 period) at System.Threading.Timer.Change(Int32 dueTime, Int32 period) at System.Net.HttpWebRequest.startReadWriteTimer() at System.Net.HttpWebRequest.ConnectionClient.Read(Byte[] data, Int32 offset, Int32 length) at System.Net.HttpReadStream.NetworkRead(Byte[] data, Int32 offset, Int32 length) at System.Net.ChunkedReadStream.fillBuffer() at System.Net.ChunkedReadStream.getLine() at System.Net.ChunkedReadStream.doRead(Byte[] data, Int32 offset, Int32 length) at System.Net.HttpReadStream.ReadToDrain(Byte[] buffer, Int32 offset, Int32 length) at System.Net.HttpReadStream.doClose() at System.Net.HttpReadStream.Finalize() It may work great a few times - then crash like this. This error appears untrappable - all my code is Try/Catched. We don't believe this was a issue in previous versions of the framework but this is our first release using 2008/3.5 so it's hard to say for sure. Anyone out there have a clue as to what may be causing this and what steps I can take to trap the error and/or prevent it? Thanks so much in advance. Bob
From: miguel.madero on 17 Jul 2008 03:35 We have the same problem with the HttpReadStream class, here's our StackTrace: en System.Threading.Timer.throwIfDisposed() en System.Threading.Timer.Change(UInt32 dueTime, UInt32 period) en System.Threading.Timer.Change(Int32 dueTime, Int32 period) en System.Net.HttpWebRequest.ConnectionClient.Read(Byte[] data, Int32 offset, Int32 length) en System.Net.HttpReadStream.NetworkRead(Byte[] data, Int32 offset, Int32 length) en System.Net.ChunkedReadStream.fillBuffer() en System.Net.ChunkedReadStream.getLine() en System.Net.ChunkedReadStream.doRead(Byte[] data, Int32 offset, Int32 length) en System.Net.HttpReadStream.ReadToDrain(Byte[] buffer, Int32 offset, Int32 length) en System.Net.HttpReadStream.doClose() en System.Net.HttpReadStream.Finalize() In our case we're aborting the thread doing the request, I think that might be the problem a we might need to handle a ThreadAbortException and aborting the operation there. I will let you know if this solves anything.
From: Bob Trabucco on 17 Jul 2008 08:46 Thanks for letting me know if you find anything. My example is not threaded but who knows it's doing a few layers down. <miguel.madero(a)gmail.com> wrote in message news:fbd9c66a-2085-4e04-8aa5-79ba9645ad91(a)k37g2000hsf.googlegroups.com... > We have the same problem with the HttpReadStream class, here's our > StackTrace: > > en System.Threading.Timer.throwIfDisposed() > en System.Threading.Timer.Change(UInt32 dueTime, UInt32 period) > en System.Threading.Timer.Change(Int32 dueTime, Int32 period) > en System.Net.HttpWebRequest.ConnectionClient.Read(Byte[] data, Int32 > offset, Int32 length) > en System.Net.HttpReadStream.NetworkRead(Byte[] data, Int32 offset, > Int32 length) > en System.Net.ChunkedReadStream.fillBuffer() > en System.Net.ChunkedReadStream.getLine() > en System.Net.ChunkedReadStream.doRead(Byte[] data, Int32 offset, > Int32 length) > en System.Net.HttpReadStream.ReadToDrain(Byte[] buffer, Int32 offset, > Int32 length) > en System.Net.HttpReadStream.doClose() > en System.Net.HttpReadStream.Finalize() > > In our case we're aborting the thread doing the request, I think that > might be the problem a we might need to handle a ThreadAbortException > and aborting the operation there. > I will let you know if this solves anything.
|
Pages: 1 Prev: see all dot net interview questions here Next: string converstion to a date |