?

Log in

No account? Create an account
need windows tester - brad's life — LiveJournal [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

need windows tester [Dec. 26th, 2003|03:51 pm]
Brad Fitzpatrick
Can somebody run this program on Windows and copy/paste me what it displays?

http://www.bradfitz.com/share/mono/AsyncErrorDemo.exe

(This is a minimal test case showing Mono's class library not catching async socket errors.....)

The source is temporarily here:
http://www.bradfitz.com/share/mono/AsyncErrorDemo.cs

What you shouldn't see is:

$ ./AsyncErrorDemo.exe
server starting
Client starting
Client Read: 4094 bytes
Client Read: 4094 bytes
Client Read: 4094 bytes
Client ending (server will croak)

Unhandled Exception: System.Net.Sockets.SocketException: The socket has been shut down
in <0x00102> System.Net.Sockets.Socket:Send (byte[],int,int,System.Net.Sockets.SocketFlags)
in <0x00056> .Worker:Send ()
in <0x00044> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()


But I think I found the bug:

mcs-0.29/class/System/System.Net.Sockets/Socket.cs:

BeginSend makes a worker thread, with threadstart of Worker.Send. But Worker.Send doesn't catch or save the Exception, so EndSend can't rethrow it. Looks like an easy enough fix. Now I just gotta learn how to build this beast.

I'm really enjoying both Mono and C#.

I need to get vmware working again.
LinkReply

Comments:
[User Picture]From: bostonsteamer
2003-12-26 04:01 pm (UTC)
On Windows XP, all I get is a dialog box:

The application failed to initialize properly (0xc0000135). Click on OK to terminate the application.
(Reply) (Thread)
[User Picture]From: christowang
2003-12-26 04:06 pm (UTC)
Did you try saving it and then running it from the command prompt or did you just let windows open it?
(Reply) (Parent) (Thread)
[User Picture]From: desertwolf
2003-12-26 05:53 pm (UTC)
I got the same thing on my XP machine.
(Reply) (Parent) (Thread)
[User Picture]From: christowang
2003-12-26 04:02 pm (UTC)
C:\>AsyncErrorDemo.exe
server starting
Client starting
Client Read: 4094 bytes
Client Read: 4094 bytes
Client Read: 4094 bytes
Client ending (server will croak)

C:\>
(Reply) (Thread)
[User Picture]From: brad
2003-12-26 04:05 pm (UTC)
Not quite what I was expecting, but helpful, thanks!
(Reply) (Parent) (Thread)
[User Picture]From: bandicoot
2003-12-26 04:02 pm (UTC)
Win 98 gives error box:
A required DLL file, MSCOREE.DLL, was not found
(Reply) (Thread)
[User Picture]From: matte
2003-12-26 04:03 pm (UTC)
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.


C:\foo>asyncerrordemo
server starting
Client starting
Client Read: 4094 bytes
Client Read: 4094 bytes
Client Read: 4094 bytes
Client ending (server will croak)

C:\foo>
(Reply) (Thread)
[User Picture]From: brad
2003-12-26 04:06 pm (UTC)
Cool, thanks!

I'll change my example around a bit to be more informative.
(Reply) (Parent) (Thread)
[User Picture]From: matte
2003-12-26 04:08 pm (UTC)
looks informative enough to me....but yeah, most others need a bit more hand holding ;)
(Reply) (Parent) (Thread)
[User Picture]From: ijon
2003-12-26 05:34 pm (UTC)
I got the same as matte, also running WinXP.
(Reply) (Parent) (Thread)
[User Picture]From: teferi
2003-12-26 04:44 pm (UTC)

server starting
Client starting
Client Read: 4094 bytes
Client Read: 4094 bytes
Client Read: 4094 bytes
Client ending (server will croak)

Windows XP Pro with the latest version of .NET
(Reply) (Thread)
[User Picture]From: dakus
2003-12-26 06:09 pm (UTC)
server starting
Client starting
Client Read: 4094 bytes
Client Read: 4094 bytes
Client Read: 4094 bytes
Client ending (server will croak)

didn't see the error
(Reply) (Thread)