[Mono-bugs] [Bug 490910] New: BytesToRead closes program

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Mar 31 18:13:44 EDT 2009


https://bugzilla.novell.com/show_bug.cgi?id=490910


           Summary: BytesToRead closes program
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: x86
        OS/Version: Windows XP
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: daniel.hughes at tait.co.nz
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.53 Safari/525.19

Calling System.IO.Ports.Serial.BytesToRead causes the program to close no
exception or error message is produced.

The following code reproduces the problem:

using System.IO.Ports;
using System;

namespace ConsoleApplication1
{
   class Program
   {
      static void Main(string[] args)
      {
         SerialPort serialPort = new SerialPort("Com4", 19200);
         serialPort.Open();
         Console.WriteLine("before");
         int bytesToRead = serialPort.BytesToRead;
         Console.WriteLine("after");
      }
   }
}

when run
before is printed to the console
after is not.

Reproducible: Always

Steps to Reproduce:
1. Compile the sample code using visual studio 2008
2. run using mono 2.4 on windows
3. see that the call to BytesToRead closes the program.
Actual Results:  
"Before" is printed to the console "After" is not printed, no exception or
error message is produced.

Expected Results:  
"Before" should be printed "After" should be printed. The program should not
close when executing serialPort.BytesToRead

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list