PC Review


Reply
Thread Tools Rate Thread

Bug in SerialPort Class NET 2005?

 
 
aayre
Guest
Posts: n/a
 
      5th Jun 2006
Hi All,

Can anyone tell me if there is a known bug and possible a fix for the
SerialPort Class (System.IO.Ports.SerialPort) in .NET 2005? More
specificly
to do with USB ComPorts?

I have found the following:
1) Open a SerialPort which happens to be a USB RS232 converter device.
2) Data can be sent and received OK.
3) Pull the plug on the USB device and CPU usage goes way up and memory
starts to leaking.
4) The only way to stop the leak and free the resources is the exit the
..NET
application then GC seems to clean things up.
5) Somes time you might event get a BSOD and the OS creashes (Win XP).
6) The type of USB harware does not seem to make any difference.

I belive this is a problem with the .NET 2005 framework as this problem
does
not happen in VB6 or when using HyperTerminal.
I managed to stop the BSOD by inheriting the SerialPort Class and
Overriding
the Dispose method.

When can we expect this problem to be fixed? Will it be in SP1 for NET
2005?
Any response would be greatful (except the ones that same "I have the
same
problem").

-aayre

 
Reply With Quote
 
 
 
 
Michael D. Ober
Guest
Posts: n/a
 
      5th Jun 2006
Are you "stopping" your USB serial port with the "Unplug or Eject Hardware"
applet?

Mike Ober.

"aayre" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
>
> Can anyone tell me if there is a known bug and possible a fix for the
> SerialPort Class (System.IO.Ports.SerialPort) in .NET 2005? More
> specificly
> to do with USB ComPorts?
>
> I have found the following:
> 1) Open a SerialPort which happens to be a USB RS232 converter device.
> 2) Data can be sent and received OK.
> 3) Pull the plug on the USB device and CPU usage goes way up and memory
> starts to leaking.
> 4) The only way to stop the leak and free the resources is the exit the
> .NET
> application then GC seems to clean things up.
> 5) Somes time you might event get a BSOD and the OS creashes (Win XP).
> 6) The type of USB harware does not seem to make any difference.
>
> I belive this is a problem with the .NET 2005 framework as this problem
> does
> not happen in VB6 or when using HyperTerminal.
> I managed to stop the BSOD by inheriting the SerialPort Class and
> Overriding
> the Dispose method.
>
> When can we expect this problem to be fixed? Will it be in SP1 for NET
> 2005?
> Any response would be greatful (except the ones that same "I have the
> same
> problem").
>
> -aayre
>
>




 
Reply With Quote
 
Carl Daniel [VC++ MVP]
Guest
Posts: n/a
 
      5th Jun 2006
aayre wrote:
> Hi All,
>
> Can anyone tell me if there is a known bug and possible a fix for the
> SerialPort Class (System.IO.Ports.SerialPort) in .NET 2005? More
> specificly
> to do with USB ComPorts?
>
> I have found the following:
> 1) Open a SerialPort which happens to be a USB RS232 converter device.
> 2) Data can be sent and received OK.
> 3) Pull the plug on the USB device and CPU usage goes way up and
> memory starts to leaking.
> 4) The only way to stop the leak and free the resources is the exit
> the .NET
> application then GC seems to clean things up.
> 5) Somes time you might event get a BSOD and the OS creashes (Win XP).
> 6) The type of USB harware does not seem to make any difference.
>
> I belive this is a problem with the .NET 2005 framework as this
> problem does
> not happen in VB6 or when using HyperTerminal.
> I managed to stop the BSOD by inheriting the SerialPort Class and
> Overriding
> the Dispose method.
>
> When can we expect this problem to be fixed? Will it be in SP1 for NET
> 2005?


Have you reported it to Microsoft? If not, please do so.

http://lab.msdn.microsoft.com/productfeedback

Have you contacted product support? You might want to if this is causing
you major problems.

-cd


 
Reply With Quote
 
aayre
Guest
Posts: n/a
 
      7th Jun 2006
Mike,

Thanks for you reply, but unfortunately in the environment that our
..NET application will be running in (application will be running on a
laptop installed in a truck) we are unable to use "Unplug or Eject
Hardware". Our application will generally have USB devices connected
via an external powered USB hub. The power to this hub can be turned
off without warning (truck engine is turned off). This is when we have
the problem.

-aayre


Michael D. Ober wrote:
> Are you "stopping" your USB serial port with the "Unplug or Eject Hardware"
> applet?
>
> Mike Ober.
>
> "aayre" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi All,
> >
> > Can anyone tell me if there is a known bug and possible a fix for the
> > SerialPort Class (System.IO.Ports.SerialPort) in .NET 2005? More
> > specificly
> > to do with USB ComPorts?
> >
> > I have found the following:
> > 1) Open a SerialPort which happens to be a USB RS232 converter device.
> > 2) Data can be sent and received OK.
> > 3) Pull the plug on the USB device and CPU usage goes way up and memory
> > starts to leaking.
> > 4) The only way to stop the leak and free the resources is the exit the
> > .NET
> > application then GC seems to clean things up.
> > 5) Somes time you might event get a BSOD and the OS creashes (Win XP).
> > 6) The type of USB harware does not seem to make any difference.
> >
> > I belive this is a problem with the .NET 2005 framework as this problem
> > does
> > not happen in VB6 or when using HyperTerminal.
> > I managed to stop the BSOD by inheriting the SerialPort Class and
> > Overriding
> > the Dispose method.
> >
> > When can we expect this problem to be fixed? Will it be in SP1 for NET
> > 2005?
> > Any response would be greatful (except the ones that same "I have the
> > same
> > problem").
> >
> > -aayre
> >
> >


 
Reply With Quote
 
aayre
Guest
Posts: n/a
 
      7th Jun 2006
Carl,

I will defiantly be report it. I was not aware how to before, now I
know :-)

-aayre

Carl Daniel [VC++ MVP] wrote:
> aayre wrote:
> > Hi All,
> >
> > Can anyone tell me if there is a known bug and possible a fix for the
> > SerialPort Class (System.IO.Ports.SerialPort) in .NET 2005? More
> > specificly
> > to do with USB ComPorts?
> >
> > I have found the following:
> > 1) Open a SerialPort which happens to be a USB RS232 converter device.
> > 2) Data can be sent and received OK.
> > 3) Pull the plug on the USB device and CPU usage goes way up and
> > memory starts to leaking.
> > 4) The only way to stop the leak and free the resources is the exit
> > the .NET
> > application then GC seems to clean things up.
> > 5) Somes time you might event get a BSOD and the OS creashes (Win XP).
> > 6) The type of USB harware does not seem to make any difference.
> >
> > I belive this is a problem with the .NET 2005 framework as this
> > problem does
> > not happen in VB6 or when using HyperTerminal.
> > I managed to stop the BSOD by inheriting the SerialPort Class and
> > Overriding
> > the Dispose method.
> >
> > When can we expect this problem to be fixed? Will it be in SP1 for NET
> > 2005?

>
> Have you reported it to Microsoft? If not, please do so.
>
> http://lab.msdn.microsoft.com/productfeedback
>
> Have you contacted product support? You might want to if this is causing
> you major problems.
>
> -cd


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SerialPort Class Aidan Microsoft Dot NET Compact Framework 4 9th Apr 2008 04:47 PM
SerialPort Class too slow & CPU Hog? Kevin Microsoft VC .NET 2 7th Dec 2007 08:22 PM
.NET 2005 C++ SerialPort class awu Microsoft VC .NET 2 6th Jul 2006 06:41 AM
New serialport in VS 2005 =?Utf-8?B?c2Vhbmt1Yg==?= Microsoft Dot NET 1 4th Jul 2005 01:52 PM
Serialport Class (for Visual Studio 2005 Beta) =?Utf-8?B?TmF0aGFuIEll?= Microsoft C# .NET 0 22nd Jun 2005 12:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:16 AM.