You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this library through the service bus SDK for Xamarin.Android and when I turn my internet connection off, I get an endless loop of exceptions with the following stacktrace:
{System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Azure.Amqp.Transport.TcpTransport..ctor (System.Net.Sockets.Socket socket, Microsoft.Azure.Amqp.Transport.TcpTransportSettings transportSettings) [0x0004c] in <…}
at Microsoft.Azure.Amqp.Transport.TcpTransport..ctor (System.Net.Sockets.Socket socket, Microsoft.Azure.Amqp.Transport.TcpTransportSettings transportSettings) [0x0004c] in <3b45427d81d44b4aa3f01d405febfb3f>:0
at Microsoft.Azure.Amqp.Transport.TcpTransportInitiator.Complete (System.Net.Sockets.SocketAsyncEventArgs e, System.Boolean completeSynchronously) [0x00040] in <3b45427d81d44b4aa3f01d405febfb3f>:0
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.ServiceBus.ServiceBusConnection+<CreateConnectionAsync>d__44.MoveNext () [0x00090] in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\ServiceBusConnection.cs:225
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1+<OnCreateAsync>d__6[T].MoveNext () [0x00077] in <3b45427d81d44b4aa3f01d405febfb3f>:0
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Amqp.Singleton`1+<GetOrCreateAsync>d__13[TValue].MoveNext () [0x00154] in <3b45427d81d44b4aa3f01d405febfb3f>:0
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Amqp.Singleton`1+<GetOrCreateAsync>d__13[TValue].MoveNext () [0x001fc] in <3b45427d81d44b4aa3f01d405febfb3f>:0
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.ServiceBus.Amqp.AmqpLinkCreator+<CreateAndOpenAmqpLinkAsync>d__11.MoveNext () [0x00070] in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\Amqp\AmqpLinkCreator.cs:41
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.ServiceBus.Core.MessageReceiver+<CreateLinkAsync>d__101.MoveNext () [0x00188] in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\Core\MessageReceiver.cs:1535
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1+<OnCreateAsync>d__6[T].MoveNext () [0x00077] in <3b45427d81d44b4aa3f01d405febfb3f>:0
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Amqp.Singleton`1+<GetOrCreateAsync>d__13[TValue].MoveNext () [0x00154] in <3b45427d81d44b4aa3f01d405febfb3f>:0
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Amqp.Singleton`1+<GetOrCreateAsync>d__13[TValue].MoveNext () [0x001fc] in <3b45427d81d44b4aa3f01d405febfb3f>:0
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.ServiceBus.Core.MessageReceiver+<OnReceiveAsync>d__86.MoveNext () [0x002c5] in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\Core\MessageReceiver.cs:1068
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.ServiceBus.Core.MessageReceiver+<>c__DisplayClass64_0+<<ReceiveAsync>b__0>d.MoveNext () [0x00038] in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\Core\MessageReceiver.cs:375
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.ServiceBus.RetryPolicy+<RunOperation>d__20.MoveNext () [0x00171] in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\RetryPolicy.cs:83
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.ServiceBus.RetryPolicy+<RunOperation>d__20.MoveNext () [0x002bc] in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\RetryPolicy.cs:108
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.ServiceBus.Core.MessageReceiver+<ReceiveAsync>d__64.MoveNext () [0x001e2] in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\Core\MessageReceiver.cs:389
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.ServiceBus.Core.MessageReceiver+<ReceiveAsync>d__62.MoveNext () [0x0002f] in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\Core\MessageReceiver.cs:323
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.ServiceBus.MessageReceivePump+<MessagePumpTaskAsync>d__11.MoveNext () [0x000ee] in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\MessageReceivePump.cs:64
Tested on multiple devices with different Android versions
Targeting Android API level 28
Based on my testing, the repeated exceptions are generated by the retry logic in the Service Bus library when connection fails. On monodroid the socket API used by the amqp library returns SocketError.Success even when there is no network connectivity. I will update the code to throw correct exception instead of a NullReferenceException.
I am using this library through the service bus SDK for Xamarin.Android and when I turn my internet connection off, I get an endless loop of exceptions with the following stacktrace:
{System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Azure.Amqp.Transport.TcpTransport..ctor (System.Net.Sockets.Socket socket, Microsoft.Azure.Amqp.Transport.TcpTransportSettings transportSettings) [0x0004c] in <…}
Tested on multiple devices with different Android versions
Targeting Android API level 28
The text was updated successfully, but these errors were encountered: