Has the mscorlib recursive resource lookup bug been fixed?

Richard Y. Hayashi 1 Reputation point
2022-10-06T08:50:33.75+00:00

Recently I have been getting this fatal error sporadically and it crashes the computer so that it displays a black screen.
This is one of the instances where we were able to observe the error message before completely crashing.

248004-vrcameraerror20220930.jpg

I have used the same code before in other projects and it is part of a socket packet writer.
The place where it starts from in my C# code I call string.Format:

public static void WriteInt( BinaryWriter bw, int intValue, DSize dSize, ref byte bcc )  
        {  
            byte[] bytes;  
            switch ( dSize )  
            {  
                // 2-digit: 00->99  
                case DSize.D2:  
                    bytes = Encoding.ASCII.GetBytes( string.Format( "{0:D2}", intValue ) );  
                    break;  

                // 3-digit: 000->999  
                case DSize.D3:  
                    bytes = Encoding.ASCII.GetBytes( string.Format( "{0:D3}", intValue ) );  
                    break;  

                // 4-digit: 0000->9999  
                case DSize.D4:  
                    bytes = Encoding.ASCII.GetBytes( string.Format( "{0:D4}", intValue ) );  
                    break;  

                default:  
                    throw new Exception( "Unknown byte size!" );  
            }  
            XOR( bytes, ref bcc );  
            bw.Write( bytes );  
        }  

Using
* Japanese version Windows 10
* .NET Framework Ver. 4.8
* No recursion involved on my part; and called on a Task.

Has Microsoft fixed this bug or are they trying to?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,387 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,131 questions
{count} votes