[Mono-bugs] [Bug 27764][Nor] New - When you call System.IO.BinaryReader.PeekChar(), the mono runtime give a fatal error
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
14 Jul 2002 13:57:09 -0000
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by kiwnix@yahoo.es.
http://bugzilla.ximian.com/show_bug.cgi?id=27764
--- shadow/27764 Sun Jul 14 09:57:09 2002
+++ shadow/27764.tmp.24885 Sun Jul 14 09:57:09 2002
@@ -0,0 +1,72 @@
+Bug#: 27764
+Product: Mono/Runtime
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: Debian sid with alp snapshot packages
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: kiwnix@yahoo.es
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: When you call System.IO.BinaryReader.PeekChar(), the mono runtime give a fatal error
+
+Description of Problem:
+
+When in a program you call System.IO.BinaryReader.PeekChar(), mono runtime
+give a fatal error:
+
+** ERROR **: file unicode.c: line 463 (ves_icall_iconv_get_chars):
+assertion failed: (mono_array_length (chars) >= (byteIndex + byteCount))
+aborting...
+Trace/breakpoint trap
+
+Steps to reproduce the problem:
+1. Compile the test case with mcs.
+2. Run it with mono.
+
+
+Actual Results:
+
+Fatal Error.
+
+Expected Results:
+
+Normal work of the function
+
+How often does this happen?
+
+Allways
+
+Test Case:
+
+using System;
+using System.IO;
+
+class TestClass
+{
+ public void Test()
+ {
+ FileStream fs = new FileStream("testfile",
+ FileMode.Open,FileAccess.Read);
+ BinaryReader br = new BinaryReader(fs);
+ byte c;
+ while(br.PeekChar() != -1)
+ {
+ c = br.ReadByte();
+ Console.Write("{0:X2} ",c);
+ }
+ br.Close();
+ }
+
+ public static void Main()
+ {
+ TestClass testfile = new TestClass();
+ testfile.Test();
+ }
+}