Bob,
Rather than play the "hit or miss" game... test your theory by instantiating
various string with a fixed number of characters such as: Dim test As String
= New String("X",2048) Choose a large value (20 times the length of your
current string for instance) and see if it is in fact the length of the
output. Then reduce the value by half until it doesn't fail. You should be
able to hit the exact length if that is a factor.
What it sounds like (but who knows what it really is) is that the output is
being redirected to some device (like an empty parallel or serial port) and
when that buffer gets full the process blocks waiting for acknowledgement.
Did it ever work? Did it just start doing it out of the blue or is this a
recent installation?
Tom
"Bob" <(E-Mail Removed)> wrote...
> "Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Never seen before. Does that only occur at /one/ call to
> > 'Console.WriteLine' or does this even occur in, for example, a blank or
> > a very simple project?
>
> Yes. This will cause a hang (as described in my original post) at
iteration 20
> in the loop below.
>
> Module Main
>
> Public Sub Main()
> For i As Integer = 1 To 20
> Console.WriteLine("console writeline output " & i)
> Next
> End Sub
>
> End Module
>
> The problem seems to be related to the amount of data sent to the console,
> beacuse the loop below causes a hang at 11:
>
> For i As Integer = 1 To 11
> Console.WriteLine("console writeline output console writeline output
console
> writeline output " & i)
> Next
>
> If I make another simple project with a form and do Console.Writeline on a
> button click, none of the output shows up until the application exits. And
if
> this output exceeds a ciritcal limit, it hangs just like in the first
project.
>
> I'd really like to know what's up with this one. But if no one else can
> reproduce it, maybe I'll just have to reinstall VS.
>
> Bob
>
|