Not sure it’s the main issue, but your infinite random stream implementation is broken due to integer overflow. Stream.Position is using int64 for a reason, but your _sequence field is int32 which wraps after 2GB. BTW C# compiler has a setting to convert arithmetic overflows into runtime exceptions, too bad Microsoft neglected to enable by default.