{"action":"closed","issue":{"url":"https://api.github.com/repos/Azure/azure-service-bus-dotnet/issues/599","repository_url":"https://api.github.com/repos/Azure/azure-service-bus-dotnet","labels_url":"https://api.github.com/repos/Azure/azure-service-bus-dotnet/issues/599/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-service-bus-dotnet/issues/599/comments","events_url":"https://api.github.com/repos/Azure/azure-service-bus-dotnet/issues/599/events","html_url":"https://github.com/Azure/azure-service-bus-dotnet/issues/599","id":377078851,"node_id":"MDU6SXNzdWUzNzcwNzg4NTE=","number":599,"title":"System.ObjectDisposedException thrown by MessageReceiver.OnReceiveAsync","user":{"login":"NickMoores","id":7027190,"node_id":"MDQ6VXNlcjcwMjcxOTA=","avatar_url":"https://avatars3.githubusercontent.com/u/7027190?v=4","gravatar_id":"","url":"https://api.github.com/users/NickMoores","html_url":"https://github.com/NickMoores","followers_url":"https://api.github.com/users/NickMoores/followers","following_url":"https://api.github.com/users/NickMoores/following{/other_user}","gists_url":"https://api.github.com/users/NickMoores/gists{/gist_id}","starred_url":"https://api.github.com/users/NickMoores/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickMoores/subscriptions","organizations_url":"https://api.github.com/users/NickMoores/orgs","repos_url":"https://api.github.com/users/NickMoores/repos","events_url":"https://api.github.com/users/NickMoores/events{/privacy}","received_events_url":"https://api.github.com/users/NickMoores/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-03T18:05:51Z","updated_at":"2018-12-06T08:43:38Z","closed_at":"2018-12-06T08:43:38Z","author_association":"NONE","body":"## Actual Behavior\r\n1. Call RegisterMessageHandler on a MessageReceiver with AutoComplete=true. Provide an onExceptionHandler that logs to an ILogger.\r\n2. After several days of receiving messages in a windows service, the following exception was provided to the onExceptionHandler, and then emitted twice more in the same hour, before the windows service was stopped manually.\r\n\r\n```\r\nSystem.ObjectDisposedException: Cannot access a disposed object.\r\nObject name: '$cbs'.\r\n   at Microsoft.Azure.ServiceBus.Core.MessageReceiver.<OnReceiveAsync>d__86.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.ServiceBus.Core.MessageReceiver.<>c__DisplayClass64_0.<<ReceiveAsync>b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.ServiceBus.RetryPolicy.<RunOperation>d__20.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at Microsoft.Azure.ServiceBus.RetryPolicy.<RunOperation>d__20.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.ServiceBus.Core.MessageReceiver.<ReceiveAsync>d__64.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.ServiceBus.Core.MessageReceiver.<ReceiveAsync>d__62.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.ServiceBus.MessageReceivePump.<MessagePumpTaskAsync>d__11.MoveNext()\r\n```\r\n\r\n## Expected Behavior\r\n1. No ObjectDisposedException thrown.\r\n\r\n## Versions  \r\n- OS platform and version: Windows Server 2016\r\n- .NET Version: .NET Framework 4.7.1\r\n- NuGet package version or commit ID: Microsoft.Azure.ServiceBus, 3.1.1"}}
{"actor":{"display_login":"NickMoores"}}