[Mono-list] Binary Reader problem

Yury Serdyuk Yury@serdyuk.botik.ru
Wed, 19 Jan 2005 15:54:05 +0300


Hi, all !

We have problem with  BinaryReader concerning

Unhandled Exception: System.IO.EndOfStreamException: Failed to read past 
end of stream.

This is some protocol :

> [serdyuk@skif parallelRT]$ [serdyuk@skif parallelRT]$ mono Ray.exe 10 
> 4 serdyuk.botik.ru 6000 -npCommunicator started on port: 17051
> Sending initialization command...
> Application Guid: 2
> Before LaunchTasks
>  k = 0
> 0: channelmessage
> 0: channelmessage
> 0: channelmessage
> 0: channelmessage
>
> Unhandled Exception: System.IO.EndOfStreamException: Failed to read 
> past end of stream.
> in <0x000da> System.IO.BinaryReader:FillBuffer (int)
> in <0x00013> System.IO.BinaryReader:ReadUInt32 ()
> in <0x0004e> 
> System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadRefTypeObjectInstance 
> (System.IO.BinaryReader,long&,object&,System.Runtime.Serialization.SerializationInfo&) 
>
> in <0x00047> 
> System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadObject 
> (System.Runtime.Serialization.Formatters.Binary.BinaryElement,System.IO.BinaryReader,long&,object&,System.Runtime.Serialization.SerializationInfo&) 
>


I have reveal a similar problem on
http://bugzilla.ximian.com/show_bug.cgi?id=65827

I've tested Lolo program on Mono 1.0.5,
but the problem remains :

> [serdyuk@skif parallelRT]$ [serdyuk@skif lib]$ [serdyuk@skif 
> parallelRT]$ mono -V
> Mono JIT compiler version 1.0.5, (C) 2002-2004 Novell, Inc and 
> Contributors. www.go-mono.com
>         TLS:           __thread
>         GC:            Included Boehm (with typed GC)
>         SIGSEGV      : normal
>         Globalization: ICU
> [serdyuk@skif parallelRT]$ [serdyuk@skif serdyuk]$ mcs --version
> Mono C# compiler version 1.0.5.0
> [serdyuk@skif serdyuk]$ mcs Lolo.cs
> Compilation succeeded
> [serdyuk@skif serdyuk]$ mono Lolo.exe
>
> Unhandled Exception: System.IO.EndOfStreamException: Failed to read 
> past end of stream.
> in <0x000da> System.IO.BinaryReader:FillBuffer (int)
> in <0x00010> System.IO.BinaryReader:ReadByte ()
> in <0x00054> TestReadByte.Class1:Main (string[])
>
> [serdyuk@skif serdyuk]$


Please help us to decide this situation.
Is the above error really fixed in the current version of Mono ?

With best regards,
                           Yury Serdyuk.