henrik,
what you are now describing seems to me exactly like the bug I had with even
async protocol I briefly talked about on Altme.
This is all assumptions, but when doing my async convertion, I had a few
situations where the port could be closed and some callback within the
handler would get executed out of sync. somehow explicitely calling close
seems to make the port react strangely. it is possible that its somewhere
else, which is causing a side-effect where you are debugging. possibly
calling i/o handlers on a dead port, just after the port close returned.
if I do close port on any async port at any time, there is a (rather high)
probability that what you describe happens.
so I added
attempt [
if port [
close port
]
]
around ALL port closes and this crash just diseapeared. I have no clue why
wrapping crashing code within an attempt does not crash (it brang up the
crash feedback requestor like you described) but it did the trick. I think
that when calling close on a dead port, even within an explicit tcp handler,
will trigger C stubs in a state where they cannot react, AFTER your function
returns.
What I think happens is that there is a state within the low-level code
which tries to flush an internal buffer while the port (at either end) is
actually down, when it should just clear it.
HTH!
-MAx
On 4/24/07, Henrik Mikael Kristensen <[EMAIL PROTECTED]> wrote:
>
>
>
> On 24/04/2007, at 18:18, Gabriele Santilli wrote:
>
> >
> > 2007/4/24, Henrik Mikael Kristensen <[EMAIL PROTECTED]>:
> >
> >> ; close port ; close port first?
> >> halt ; death notice received, halt so the port is dead
> >
> > Try quit instead of halt;
>
> OK, done that, but the result is the same. I said there was a timeout
> of 1 second, but I forgot that I inserted the 1 second wait myself.
> The write-io immediately returns to the prompt.
>
> > also, what is exactly happening in your
> > applications? Is the app physically disconnected from the server?
>
> The client app may crash hard at times, bringing up the Windows send
> feedback requester. If that happens at the right time, the server and
> the other clients hang as well.
>
> --
> Regards,
> Henrik Mikael Kristensen
>
>
> --
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
>
>
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.