A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/StackExchange/StackExchange.Redis/pull/1342 below:

rare NullReferenceException from ServerEndPoint.get_LastException() · Issue #1342 · StackExchange/StackExchange.Redis · GitHub

We've been using 2.0.601 for months, and only seen one instance of this - seems pretty rare.

Exception=System.NullReferenceException: Object reference not set to an instance of an object.
   at StackExchange.Redis.ServerEndPoint.get_LastException()
   at StackExchange.Redis.ExceptionFactory.PopulateInnerExceptions(ReadOnlySpan`1 serverSnapshot)
   at StackExchange.Redis.ExceptionFactory.NoConnectionAvailable(Boolean includeDetail, Boolean includePerformanceCounters, RedisCommand command, Message message, ServerEndPoint server, ReadOnlySpan`1 serverSnapshot)
   at StackExchange.Redis.ConnectionMultiplexer.GetException(WriteResult result, Message message, ServerEndPoint server)
   at StackExchange.Redis.ConnectionMultiplexer.ExecuteAsyncImpl[T](Message message, ResultProcessor`1 processor, Object state, ServerEndPoint server)
   at StackExchange.Redis.RedisBase.ExecuteAsync[T](Message message, ResultProcessor`1 processor, ServerEndPoint server)
   at StackExchange.Redis.RedisDatabase.HashGetAllAsync(RedisKey key, CommandFlags flags)
   at StackExchange.Redis.KeyspaceIsolation.WrapperBase`1.HashGetAllAsync(RedisKey key, CommandFlags flags)

I'm sorry that I'm not more familiar with this project to contribute more. My best guess is on this line:

if (tmp2?.LastException != null && tmp2.LastException.Data.Contains("Redis-FailureType") && !tmp2.LastException.Data["Redis-FailureType"].ToString().Equals(nameof(ConnectionFailureType.UnableToConnect)))

The first clause checks that LastException is not null; but maybe it can be set to null on PhysicalBridge.OnFullyEstablished, and then the later checks may be working with null? I'm not sure when that event may fire relative to execution.

Otherwise, maybe there's a way for Data to not be populated?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4