SocketException: Write failed (OS Error: The operation completed successfully.

403 views
Skip to first unread message

Henri Chen

unread,
Jul 1, 2013, 9:45:06 PM7/1/13
to mi...@dartlang.org
Dart Experts, 

Do you have idea what this Exception really means.

Unhandled exception:
SocketException: Write failed (OS Error: The operation completed successfully.

, errno = 0)
#0      _DefaultZone.handleUncaughtError.<anonymous closure> (dart:async/zone.dart:148:7)
#1      _asyncRunCallback._asyncRunCallback (dart:async/event_loop.dart:9:15)
#2      _asyncRunCallback._asyncRunCallback (dart:async/event_loop.dart:13:7)
#3      _createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:8:13)
#4      _Timer._createTimerHandler._handleTimeout (timer_impl.dart:91:28)
#5      _Timer._createTimerHandler._handleTimeout (timer_impl.dart:99:7)
#6      _Timer._createTimerHandler.<anonymous closure> (timer_impl.dart:107:23)
#7      _ReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:81:92)

It sometimes(not always) happens when I do Socket.add(). The message of the exception is kind of "inconsistent" because it says 

"The operation completed successfully.

, errno = 0)"

My program runs on Dart VM(Dart SDK version 0.5.20.4_r24275);  Win7 64 bits. Any insider knows what this exception really is about?

Henri

Iván Zaera Avellón

unread,
Jul 2, 2013, 2:13:34 AM7/2/13
to misc
I'm not a Dart expert, but it looks like a bug. See this thread in stack overflow:


You can get an ERROR_SUCCESS (=0) when calling GetLastError() in Windows if you do some operations between the failure and the GetLastError() call.

Just a hint for the Dart expert ;-).


2013/7/2 Henri Chen <henr...@rikulo.org>

--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new
 
 

Anders Johnsen

unread,
Jul 2, 2013, 2:37:39 AM7/2/13
to General Dart Discussion
Hi Henri and Iván,

I actually landed a fix for this yesterday, so that we return the correct error code. Iván, you are right, we did indeed perform another call before extracting the error code.


Cheers,

- Anders
Reply all
Reply to author
Forward
0 new messages