Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 3357 [details]
Semple test code to get the exception.
Socket.BeginSendFile method is broken.
If this method is used you get this exception:
System.ArgumentException: Invalid IAsyncResult - Datatype:System.Runtime.Remoting.Messaging.AsyncResult
Parameter name: syncResult
at System.Net.Sockets.Socket.EndSendFile (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
at test_sendfile.MainClass.FileSendCallback (IAsyncResult ar) [0x00000] in <filename unknown>:0
I try using git and 3.0.3 mono versions.
In attach sample code to get this exception.
Created attachment 3358 [details]
Proposal patch to solve fhit bug
I recommend you two things for this patch to get merged:
1) Merge both things into single patch (the testcase should be transformed into a unit test that is included in the mono test suite).
2) Propose it as a pull request in github.
to produce a testcase I need to have a socket server and a file to send to it.
- how can choose the port for socket server? I try with random port and if get an error try with another one?
- where can I store the file to send with BeginSendFile method in order to be compatible with different platform?
I ask this because not find any guideline about this.
To setup a socket server: just check how it's done in other tests in the test suite.
In regards to the file: cannot you inline the data in C# in your test instead of using a file?
Oops, disregard my last question, obviously the file is needed given this is related to SendFile API.
Created attachment 3468 [details]
Patch with test case proposal
Test case is added in Socket testing code.
I not know if SocketAsyncTest is a better place where insert the testing code.
About the test I use a timer to know if the lamda is not called and raise and exception.
I not find a way to get the exception in thread pool.
Some nitpicks and a question:
- You're not following http://www.mono-project.com/Coding_Guidelines in some parts of the patch (like putting a space before "(".
- The last three lines added to Socket.cs have one more tab char than it should be, I think it would look better if you just align the last line with the return statement, and remove one tab in each of the previous two.
- I'm assuming that you have run your test in MS.NET (not Mono) and it passes, right?
If all of the above addressed, I guess you're ready for sending a pull request in github.
Created attachment 3478 [details]
Patch with test case proposal that respect coding guideline (I hope)
Now I hope to respect the coding GuideLine.
I try the test case in .NET writing a testing console application that use the unit test code. I use Visual Studio 2010 to perform the test.
The test is passed.
Is pull request creation the only way to submit this patch for acceptance?
> Is pull request creation the only way to submit this patch for acceptance?
Well, you can also try to bug the developers via IRC to get them to include this patch manually. Using a pull-request is simply to be believed less of a burden for them because they can just merge the change with a click.
Pull request submitted.