Powershell – Unable to change the SharePoint 2010 main site collection administrator

I have a problem that prevents changing the main administrator of the site collection of a site set on my user account.

In the Central Administration Console, when changing the name, the error message appears.

enter the description of the image here

The execution of the set-spsite command in PowerShell indicates that there is a NullReferenceException exception.

any idea on how to solve this problem will be much appreciated.