Skip to content

System.NullReferenceException: Object reference not set to an instance of an object. #1472

@paulb2015

Description

@paulb2015

Software versions
MySqlConnector version: 2.2.7
Server type (MySQL, MariaDB, Aurora, etc.) and version: MySQL 5.7.41 & MySQL 8.0.36
.NET version: 4.8

Describe the bug
Our application is crashing with the following exception. This exception appears to be happening on a background thread within MySqlConnector which results in an application crash as we can't handle the exception. So far we are unable to replicate this issue as its quite rare. We are planning on upgrading the connector to the latest version, but we haven't noticed any particular fix for this issue.

Exception
System.NullReferenceException: Object reference not set to an instance of an object.
at MySqlConnector.Core.ServerSession.<>c__DisplayClass99_0.b__0() in /_/src/MySqlConnector/Core/ServerSession.cs:line 1102
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.CancellationCallbackInfo.ExecuteCallback()
at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions