2

Closed

StreamReader.cs - IndexOutOfRangeException

description

Hi,
 
we wrote a test program which can read out a file, this test program is in the attachment.
This program reads out a file with readline(), but on one line there comes a IndexOutOfRangeException.
This Exception was thrown from Peek() what is in the readline function.
 
When I separate readline and Peek(). The Peek() function hangs up on one line.
There are two int variables in the Peek() function m_curBufPos and m_curBufLen.
The problem comes, because this two variables have not the right value.
 
When I comment out line 88 till line 111 in the „C:\MicroFrameworkPK_v4_1\Framework\Core\System\IO\StreamReader.cs“ file.
I have no problems with my test program. But I think thats not the right way.
Do you know for what the two variables m_curBufPos and m_curBufLen?
And why could they have false values?
 
Thanks,
 
Bernhard

file attachments

Closed Jul 23, 2012 at 10:37 PM by ZachLibby
Fixed in code change set 23510.

comments

TheDeath wrote Oct 15, 2012 at 8:22 AM

Hello,

I use the NetMF 4.2 but I have the same problem.


Best regards
Christian

ZachLibby wrote Oct 15, 2012 at 4:52 PM

Hello Christian,

Are you using v4.2 (QFE2)? If so, could you please add your sample code if it is different than the one already attached to this bug?

Thanks,
Zach