[Mono-bugs] [Bug 40702][Wis] New - System.IndexOutOfRangeException in BinaryReader

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Thu, 3 Apr 2003 00:08:39 -0500 (EST)


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 pauld@hutch.com.au.

http://bugzilla.ximian.com/show_bug.cgi?id=40702

--- shadow/40702	Thu Apr  3 00:08:39 2003
+++ shadow/40702.tmp.23475	Thu Apr  3 00:08:39 2003
@@ -0,0 +1,96 @@
+Bug#: 40702
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: pauld@hutch.com.au               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.IndexOutOfRangeException in BinaryReader
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+There appears to be some error being triggered in BinaryReader class
+
+The same code linked to below compiles and works (at least further than
+this - there are bugs further into the code) using C# on windows
+
+Unhandled Exception: System.IndexOutOfRangeException: Array index is out of
+range
+in <0x00196> 00 System.IO.BinaryReader:Read (char[],int,int)
+in <0x0007f> 00 System.IO.BinaryReader:ReadChars (int)
+in <0x0037b> 00 CSDonkey.DonkeyServerInfo:readFrom (System.IO.BinaryReader)
+in <0x0025d> 00 CSDonkey.ServerList:parseFile ()
+in <0x0003a> 00 CSDonkey.ServerList:.ctor (string)
+in <0x00029> 00 CSDonkey.ServerList:Main (string[])
+
+
+Steps to reproduce the problem:
+1. download the following 3 files: 
+http://members.iinet.net.au/~fatal/mono/DonkeyServerInfo.cs
+http://members.iinet.net.au/~fatal/mono/ServerList.cs
+http://members.iinet.net.au/~fatal/mono/server.met
+
+2. compile to ServerList.exe: mcs ServerList.cs DonkeyServerInfo.cs -g
+3. run 
+
+Actual Results:
+... some text scrolls past ...
+string: Emule Server No1 50000 max
+read type: 2 and name length: 1
+got a special tag. type: 2
+special type: 11
+string length: 39
+
+Unhandled Exception: System.IndexOutOfRangeException: Array index is out of
+range
+in <0x00196> 00 System.IO.BinaryReader:Read (char[],int,int)
+in <0x0007f> 00 System.IO.BinaryReader:ReadChars (int)
+in <0x0037b> 00 CSDonkey.DonkeyServerInfo:readFrom (System.IO.BinaryReader)
+in <0x0025d> 00 CSDonkey.ServerList:parseFile ()
+in <0x0003a> 00 CSDonkey.ServerList:.ctor (string)
+in <0x00029> 00 CSDonkey.ServerList:Main (string[])
+
+
+Expected Results:
+......text scrolls past ..............
+string: Emule Server No1 50000 max
+read type: 2 and name length: 1
+got a special tag. type: 2
+special type: 11
+string length: 39
+string: http://www.short-tipp.de/sl/probenking/
+read type: 3 and name length: 1
+got a special tag. type: 3
+special type: 13
+reading preference
+got it: 0
+read type: 3 and name length: 1
+got a special tag. type: 3
+special type: 14
+skipping number -  type: 14 and data: 1
+read type: 3 and name length: 5
+nameLength: 5, name value: users
+got tag: users = [NUMBER]13481
+read type: 3 and name length: 5
+nameLength: 5, name value: files
+got tag: files = [NUMBER]1109282
+read type: 3 and name length: 1
+got a special tag. type: 3
+special type: 12
+skipping number -  type: 12 and data: 731
+..........more text scrolls past ...........
+
+How often does this happen? 
+reproducable always
+
+Additional Information: