Console
Console copied to clipboard
System.NullReferenceException arises when SXA site manager is under load
Expected Behavior
No errors arise.
Actual Behavior
SXA site manager breaks when CM server is under load. The following errors arises: Exception: System.NullReferenceException Message: Object reference not set to an instance of an object. Source: Spe at Spe.Client.Controls.PowerShellListView.get_FilteredItems() at Spe.Client.Controls.PowerShellListView.set_CurrentPage(Int32 value) at Spe.Client.Applications.PowerShellResultViewerList.UpdatePage(Int32 newPage)
Steps to Reproduce the Problem
SPE 6.0. Unfortunately, I was not able to reproduce this issue on the clean SXA 1.10 + Sitecore 9.3, because it is necessary that a lot of people work simultaneously in the SXA site manager. I simply investigated the provided memory dump file.
I have provided the customer with the following fix for this issue: public class PowerShellListView : Listview { static object locker = new object(); ----------------------------- _public List<BaseListViewCommand.DataObject> FilteredItems { get { lock (locker) { if (filteredItems == null) { // your code } } } } This fix helped to solve the issue.