[Mono-list] BUG: Console.ReadLine()

Jaroslaw Kowalski jarek@atm.com.pl
Mon, 13 May 2002 22:25:57 +0200 (CEST)


Suggestion: in mono/io-layer/io.c, console_read()

change

	ok=_wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
				(gpointer *)&console_handle,
				(gpointer *)&console_private_handle);

to

	ok=_wapi_lookup_handle (handle, WAPI_HANDLE_CONSOLE,
				(gpointer *)&console_handle,
				(gpointer *)&console_private_handle);

Helped in my case, looks like a typo. Can you commit it please?

Jarek

On Mon, 13 May 2002, Jaroslaw Kowalski wrote:

> 
> I've recently updated mono from CVS, compiled and found out that I'm no
> longer able to run this very sophisticated application:
> 
> -----------------------------------------------
> using System;
> 
> namespace test2
> {
>         class test2
>         {
>                 [STAThread]
>                 static void Main(string[] args)
>                 {
>                         string s = Console.ReadLine();
>                 }
>         }
> }
> -------------------------------------------------
> 
> I get the following errors:
> 
> ========================================
> (process:29080): ** WARNING **: console_read: error looking up console
> handle 0x5
> 
> (process:29080): ** ERROR **: file unicode.c: line 437
> (ves_icall_iconv_get_char_count): assertion failed: (mono_array_length
> (bytes) >= (idx + count))
> aborting...
> =======================================
> 
> Environment: Red Hat Linux 7.2/Intel
> 
> Is it my fault - are there any new tricks in the compilation process, or
> the code is broken?
> 
> Regards,
> 
> Jarek
> 
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>