Bug 42616 - Brand new instance of SocketAsyncEventArgs.SetBuffer throws ArgumentException "Buffer and BufferList properties cannot both be non-null."
Summary: Brand new instance of SocketAsyncEventArgs.SetBuffer throws ArgumentException...
Status: RESOLVED NORESPONSE
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Core ()
Version: 4.4.0 (C7)
Hardware: Other Windows
: Normal normal
Target Milestone: Future Release
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-07-17 10:34 UTC by Jahmai
Modified: 2017-09-08 17:18 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED NORESPONSE

Description Jahmai 2016-07-17 10:34:47 UTC
No reproduction for this -- as far as I can tell this should be impossible.
I've had a lot of strange crashes emerging from SocketAsyncEventArgs lately.

The following stack is from the code:

            SocketAsyncEventArgs e = new SocketAsyncEventArgs();
            e.SetBuffer(buffer, offset, count);

Non-fatal Exception: xamarin.android.crashlytics.MonoException: (ArgumentException) Buffer and BufferList properties cannot both be non-null.
       at System.Net.Sockets.SocketAsyncEventArgs.SetBuffer(System.Byte[] buffer, Int32 offset, Int32 count)<0xe8a6eba8 + 0x000a4>(SocketAsyncEventArgs0xe8a6eba80x000a4.cs:1)
       at Intrinsic.Net.Sockets.SocketExtensions+<SendToAsync>d__39.MoveNext()<0xe8abfce8 + 0x00297>(SocketExtensionsSendToAsyncd__390xe8abfce80x00297.cs:1)
       at --- End of stack trace from previous location where exception was thrown ---.(unknown.cs:1)
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()<0xdd03bad0 + 0x00024>(ExceptionDispatchInfo0xdd03bad00x00024.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task task)<0xdd0381e8 + 0x000c3>(TaskAwaiter0xdd0381e80x000c3.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task)<0xdd036ae8 + 0x0008b>(TaskAwaiter0xdd036ae80x0008b.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task task)<0xe8b7ac80 + 0x0003f>(TaskAwaiter0xe8b7ac800x0003f.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult()<0xdd036230 + 0x00017>(TaskAwaiter1TResult0xdd0362300x00017.cs:1)
       at Intrinsic.Net.Ntp.SntpClient+<SynchronizeAsync>d__23.MoveNext()<0xee854738 + 0x007e7>(SntpClientSynchronizeAsyncd__230xee8547380x007e7.cs:1)
       at --- End of stack trace from previous location where exception was thrown ---.(unknown.cs:1)
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()<0xdd03bad0 + 0x00024>(ExceptionDispatchInfo0xdd03bad00x00024.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task task)<0xdd0381e8 + 0x000c3>(TaskAwaiter0xdd0381e80x000c3.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task)<0xdd036ae8 + 0x0008b>(TaskAwaiter0xdd036ae80x0008b.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task task)<0xe8b7ac80 + 0x0003f>(TaskAwaiter0xe8b7ac800x0003f.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult()<0xe8b7aa10 + 0x0001b>(TaskAwaiter1TResult0xe8b7aa100x0001b.cs:1)
       at Intrinsic.Net.Ntp.SntpClient+<>c__DisplayClass19_0+<<InitializeAsync>b__0>d.MoveNext()<0xee851960 + 0x0013b>(SntpClientc__DisplayClass19_0InitializeAsyncb__0d0xee8519600x0013b.cs:1)
       at --- End of stack trace from previous location where exception was thrown ---.(unknown.cs:1)
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()<0xdd03bad0 + 0x00024>(ExceptionDispatchInfo0xdd03bad00x00024.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task task)<0xdd0381e8 + 0x000c3>(TaskAwaiter0xdd0381e80x000c3.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task)<0xdd036ae8 + 0x0008b>(TaskAwaiter0xdd036ae80x0008b.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task task)<0xe8b7ac80 + 0x0003f>(TaskAwaiter0xe8b7ac800x0003f.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.GetResult()<0xdd03b340 + 0x00017>(TaskAwaiter0xdd03b3400x00017.cs:1)
       at Intrinsic.Threading.Tasks.AsyncParallel+<ForEachAsync>d__5`1[TSource].MoveNext()<0xee865a70 + 0x00e7b>(AsyncParallelForEachAsyncd__51TSource0xee865a700x00e7b.cs:1)
       at --- End of stack trace from previous location where exception was thrown ---.(unknown.cs:1)
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()<0xdd03bad0 + 0x00024>(ExceptionDispatchInfo0xdd03bad00x00024.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task task)<0xdd0381e8 + 0x000c3>(TaskAwaiter0xdd0381e80x000c3.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task)<0xdd036ae8 + 0x0008b>(TaskAwaiter0xdd036ae80x0008b.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task task)<0xe8b7ac80 + 0x0003f>(TaskAwaiter0xe8b7ac800x0003f.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult()<0xdb6f8d00 + 0x0001b>(TaskAwaiter1TResult0xdb6f8d000x0001b.cs:1)
       at Intrinsic.Net.Ntp.SntpClient+<InitializeAsync>d__19.MoveNext()<0xee87b8b8 + 0x00517>(SntpClientInitializeAsyncd__190xee87b8b80x00517.cs:1)
       at --- End of stack trace from previous location where exception was thrown ---.(unknown.cs:1)
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()<0xdd03bad0 + 0x00024>(ExceptionDispatchInfo0xdd03bad00x00024.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task task)<0xdd0381e8 + 0x000c3>(TaskAwaiter0xdd0381e80x000c3.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task)<0xdd036ae8 + 0x0008b>(TaskAwaiter0xdd036ae80x0008b.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(System.Threading.Tasks.Task task)<0xe8b7ac80 + 0x0003f>(TaskAwaiter0xe8b7ac800x0003f.cs:1)
       at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult()<0xdb6fb148 + 0x00017>(TaskAwaiter1TResult0xdb6fb1480x00017.cs:1)
       at Intrinsic.Net.Ntp.SntpClient+<SynchronizeContinuouslyAsync>d__24.MoveNext()<0xeeb897d0 + 0x00523>(SntpClientSynchronizeContinuouslyAsyncd__240xeeb897d00x00523.cs:1)
Comment 1 Rodrigo Kumpera 2016-07-20 01:00:09 UTC
Hi Jahmai,

If you run into a program that can reproduce the issue, please provide it. There's nothing we can do otherwise.
Comment 2 Jahmai 2016-07-20 01:03:19 UTC
I understand. I just wanted this recorded so others could see if it they run into the issue. I can't reproduce it in lab conditions, only in released software running on thousands of devices.
Comment 3 Jahmai 2016-07-26 07:12:21 UTC
This issue occurred on an SM-G930F (Samsung Galaxy S7).
Comment 4 Rodrigo Kumpera 2016-07-26 20:12:23 UTC
Hey João,

Another weird crash on a Galaxy S7
Comment 5 Marek Safar 2017-09-08 17:18:55 UTC
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and reopen the bug report.

Thank you!