[Mono-bugs] [Bug 540593] New: System.Console.CapsLock throws exception when accessed

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Sep 21 00:23:06 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=540593


           Summary: System.Console.CapsLock throws exception when accessed
    Classification: Mono
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: michael at michael.ie
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.14)
Gecko/2009082707 Firefox/3.0.14 (.NET CLR 3.5.30729)

Mono 2.4.2 throws an Unhandled Exception when a console application tries to
access System.Console.CapsLock.

This works under Microsoft .NET.

MoMA does not pick up on this as not working correctly under Mono on Linux.
This method in the class library may need the MonoTODO attribute added so MoMA
can alert on it.

Reproducible: Always

Steps to Reproduce:
Program.cs:
class Program {
  static void Main(string[] args) {
    if (Console.CapsLock)
      Console.WriteLine("Caps is on");
  }
}

Above program was compiled with CSC.exe and executed under Ubuntu Jaunty and
SLED (monovs release) with mono program.exe
Actual Results:  
Unhandled Exception: System.NotSupportedException: Operation is not supported.
  at System.TermInfoDriver.get_CapsLock () [0x00000]
  at System.ConsoleDriver.get_CapsLock () [0x00000]
  at System.Console.get_CapsLock () [0x00000]
  at ConsoleRepro.Program.Main (System.String[] args) [0x00000]

and
MoMA was unable to find any potential issues in this application.

Expected Results:  
On Mono, I expected "Caps is on" if capslock pressed.

In Visual Studio, I expected MoMA to alert me the Console.CapsLock call
wouldn't work.


Tried with:
 Mono 2.4.2 compiled from tarball on Jaunty.
 Mono 2.4.2.3 shipping with monovs SLED.

There does not appear to be anything in the mono docs that say this call would
not work.

-- 
Configure bugmail: http://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