←back to thread

123 points eterm | 1 comments | | HN request time: 0s | source
Show context
eterm ◴[] No.43925356[source]
A post in which I try to rubber-duck a CoreWCF issue I've been having, because stackoverflow no longer seems suitable for asking questions about programming issues.

Screaming into the void of the blogosphere is catharsis for getting my SO question closed.

And because I know you're all nosy, the SO question is here: https://stackoverflow.com/questions/79605462/high-cpu-usage-... . Please feel free to point out more ways in which I screwed up asking my SO question.

replies(10): >>43925551 #>>43925669 #>>43925930 #>>43925975 #>>43926332 #>>43927351 #>>43931071 #>>43933405 #>>43933839 #>>43935803 #
1. Const-me ◴[] No.43933839[source]
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.