Skip to content

Test failure: System.IO.Tests.BinaryReaderTests.BinaryReader_EofReachedEarlyTests_ThrowsException #45347

@v-haren

Description

@v-haren

failed in job: https://dev.azure.com/dnceng/public/_build/results?buildId=902316&view=ms.vss-test-web.build-test-results-tab&runId=28813524&resultId=116955&paneView=debug

net6.0-windows-Release-x86-CoreCLR_checked-jitstressregs4-Windows.10.Amd64.Open

Error message

Assert.Throws() Failure
Expected: typeof(System.IO.EndOfStreamException)
Actual:   typeof(System.Text.DecoderFallbackException): Unable to translate bytes [80] at index 2 from specified code page to Unicode.
---- System.Text.DecoderFallbackException : Unable to translate bytes [80] at index 2 from specified code page to Unicode.

Stack trace
   at System.Text.DecoderExceptionFallbackBuffer.Throw(Byte[] bytesUnknown, Int32 index) in /_/src/libraries/System.Private.CoreLib/src/System/Text/DecoderExceptionFallback.cs:line 66
   at System.Text.DecoderExceptionFallbackBuffer.Fallback(Byte[] bytesUnknown, Int32 index) in /_/src/libraries/System.Private.CoreLib/src/System/Text/DecoderExceptionFallback.cs:line 31
   at System.Text.Encoding.GetCharsWithFallback(ReadOnlySpan`1 bytes, Int32 originalBytesLength, Span`1 chars, Int32 originalCharsLength, DecoderNLS decoder) in /_/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.Internal.cs:line 1215
   at System.Text.UTF8Encoding.GetCharsWithFallback(ReadOnlySpan`1 bytes, Int32 originalBytesLength, Span`1 chars, Int32 originalCharsLength, DecoderNLS decoder) in /_/src/libraries/System.Private.CoreLib/src/System/Text/UTF8Encoding.cs:line 648
   at System.Text.Encoding.GetCharsWithFallback(Byte* pOriginalBytes, Int32 originalByteCount, Char* pOriginalChars, Int32 originalCharCount, Int32 bytesConsumedSoFar, Int32 charsWrittenSoFar, DecoderNLS decoder) in /_/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.Internal.cs:line 1164
   at System.Text.Encoding.GetChars(Byte* pBytes, Int32 byteCount, Char* pChars, Int32 charCount, DecoderNLS decoder) in /_/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.Internal.cs:line 1016
   at System.Text.DecoderNLS.GetChars(Byte* bytes, Int32 byteCount, Char* chars, Int32 charCount, Boolean flush) in /_/src/libraries/System.Private.CoreLib/src/System/Text/DecoderNLS.cs:line 143
   at System.Text.DecoderNLS.GetChars(Byte[] bytes, Int32 byteIndex, Int32 byteCount, Char[] chars, Int32 charIndex, Boolean flush) in /_/src/libraries/System.Private.CoreLib/src/System/Text/DecoderNLS.cs:line 121
   at System.Text.DecoderNLS.GetChars(Byte[] bytes, Int32 byteIndex, Int32 byteCount, Char[] chars, Int32 charIndex) in /_/src/libraries/System.Private.CoreLib/src/System/Text/DecoderNLS.cs:line 92
   at System.IO.BinaryReader.ReadString() in /_/src/libraries/System.Private.CoreLib/src/System/IO/BinaryReader.cs:line 302
   at System.IO.Tests.BinaryReaderTests.<>c.<BinaryReader_EofReachedEarlyTests_ThrowsException>b__5_57(BinaryReader reader) in /_/src/libraries/System.IO/tests/BinaryReader/BinaryReaderTests.cs:line 104
   at System.IO.Tests.BinaryReaderTests.<>c__DisplayClass5_0.<BinaryReader_EofReachedEarlyTests_ThrowsException>b__59() in /_/src/libraries/System.IO/tests/BinaryReader/BinaryReaderTests.cs:line 126
----- Inner Stack Trace -----
   at System.Text.DecoderExceptionFallbackBuffer.Throw(Byte[] bytesUnknown, Int32 index) in /_/src/libraries/System.Private.CoreLib/src/System/Text/DecoderExceptionFallback.cs:line 66
   at System.Text.DecoderExceptionFallbackBuffer.Fallback(Byte[] bytesUnknown, Int32 index) in /_/src/libraries/System.Private.CoreLib/src/System/Text/DecoderExceptionFallback.cs:line 31
   at System.Text.Encoding.GetCharsWithFallback(ReadOnlySpan`1 bytes, Int32 originalBytesLength, Span`1 chars, Int32 originalCharsLength, DecoderNLS decoder) in /_/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.Internal.cs:line 1215
   at System.Text.UTF8Encoding.GetCharsWithFallback(ReadOnlySpan`1 bytes, Int32 originalBytesLength, Span`1 chars, Int32 originalCharsLength, DecoderNLS decoder) in /_/src/libraries/System.Private.CoreLib/src/System/Text/UTF8Encoding.cs:line 648
   at System.Text.Encoding.GetCharsWithFallback(Byte* pOriginalBytes, Int32 originalByteCount, Char* pOriginalChars, Int32 originalCharCount, Int32 bytesConsumedSoFar, Int32 charsWrittenSoFar, DecoderNLS decoder) in /_/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.Internal.cs:line 1164
   at System.Text.Encoding.GetChars(Byte* pBytes, Int32 byteCount, Char* pChars, Int32 charCount, DecoderNLS decoder) in /_/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.Internal.cs:line 1016
   at System.Text.DecoderNLS.GetChars(Byte* bytes, Int32 byteCount, Char* chars, Int3

Metadata

Metadata

Assignees

No one assigned

    Labels

    untriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions