"Conversations" error on legacy CS 4.1.40407.4157

Hi all,

Apologies if this is not the best place to post this question, but I really need help and I can see nowhere else to go.

I run a non-commercial free forum site who is running on old Community Server  4.1.40407.4157 (free version) for quite a few years now, and really never felt a compelling reason to upgrade since it has been serving us very well and running smoothly without any problems since ever.

The good days seem to be over however, as from a few weeks ago we started to get a "NullReferenceException: Object reference not set to an instance of an object." error 99% of the time we click on "Conversations" to see the conversation list.

I'm really totally lost about this error, I can only suspect this was caused by some Microsoft .Net update/patch recently published, as nobody touches the server code since day one.

Any help would be greatly appreciated.

Here's the complete track trace as it appears on the server side:

Server Error in '/cafe' Application.

Object reference not set to an instance of an object.

 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]

  CommunityServer.Components.UserSorter.Compare(User x, User y) +459

  System.Collections.Generic.ArraySortHelper`1.SwapIfGreaterWithItems(T[] keys, IComparer`1 comparer, Int32 a, Int32 b) +102

  System.Collections.Generic.ArraySortHelper`1.QuickSort(T[] keys, Int32 left, Int32 right, IComparer`1 comparer) +136

  System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer) +105

[InvalidOperationException: Failed to compare two elements in the array.]

  System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer) +349

  System.Array.Sort(T[] array, Int32 index, Int32 length, IComparer`1 comparer) +207

  System.Collections.Generic.List`1.Sort(Int32 index, Int32 count, IComparer`1 comparer) +95

  CommunityServer.Users.Filter(List`1 usersToFilter, UserQuery query) +102

  CommunityServer.Messages.Controls.ConversationParticipantUserList.get_DataSource() +472

  System.Web.UI.WebControls.Repeater.ConnectToDataSourceView() +184

  System.Web.UI.WebControls.Repeater.GetData() +14

  System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +214

  CommunityServer.Controls.WrappedRepeater.CreateControlHierarchy(Boolean useDataSource) +146

  CommunityServer.Controls.PreTemplatedWrappedRepeaterBase.CreateControlHierarchy(Boolean useDataSource) +372

  System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53

  CommunityServer.Controls.WrappedRepeater.OnDataBinding(EventArgs e) +15

  System.Web.UI.WebControls.Repeater.DataBind() +75

  CommunityServer.Controls.WrappedRepeater.DataBind() +144

  CommunityServer.Controls.PreTemplatedWrappedRepeaterBase.DataBind() +30

  System.Web.UI.Control.DataBindChildren() +205

  System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +159

  System.Web.UI.Control.DataBind() +15

  System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +124

  System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +435

  CommunityServer.Controls.WrappedRepeater.CreateControlHierarchy(Boolean useDataSource) +146

  CommunityServer.Controls.PreTemplatedWrappedRepeaterBase.CreateControlHierarchy(Boolean useDataSource) +372

  System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53

  CommunityServer.Controls.WrappedRepeater.OnDataBinding(EventArgs e) +15

  System.Web.UI.WebControls.Repeater.DataBind() +75

  CommunityServer.Controls.WrappedRepeater.DataBind() +144

  CommunityServer.Controls.PreTemplatedWrappedRepeaterBase.DataBind() +30

  System.Web.UI.Control.DataBindChildren() +205

  System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +159

  System.Web.UI.Control.DataBind() +15

  System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +124

  System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +435

  CommunityServer.Controls.WrappedRepeater.CreateControlHierarchy(Boolean useDataSource) +146

  CommunityServer.Controls.PreTemplatedWrappedRepeaterBase.CreateControlHierarchy(Boolean useDataSource) +372

  System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53

  CommunityServer.Controls.WrappedRepeater.OnDataBinding(EventArgs e) +15

  System.Web.UI.WebControls.Repeater.DataBind() +75

  CommunityServer.Controls.WrappedRepeater.DataBind() +144

  CommunityServer.Controls.PreTemplatedWrappedRepeaterBase.DataBind() +30

  CommunityServer.Controls.PreTemplatedWrappedRepeaterBase.OnLoad(EventArgs e) +32

  System.Web.UI.Control.LoadRecursive() +74

  System.Web.UI.Control.LoadRecursive() +163

  System.Web.UI.Control.LoadRecursive() +163

  System.Web.UI.Control.LoadRecursive() +163

  System.Web.UI.Control.LoadRecursive() +163

  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2603

Version Information: Microsoft .NET Framework Version:2.0.50727.5477; ASP.NET Version:2.0.50727.5479

  • In reply to joao.prates:

    Thank you all, your hints were precious to me and did help out in the end!

    It turns out that I had some cs_UserProfile rows missing, i.e. not all cs_Users had a corresponding profile created, and this was what was causing all the problems.

    I used a fresh user profile as a template and created profile rows for all banned users, and sure as hell everything felt into place!

    Once again, thank you Rick and specially Robert for giving some clues to what was happening.

    In the end it was not a column that was being returned with an unexpected NULL value, it was an empty result set from the profiles.

    Cheers,

Related