SCSM 2016 Console Crash

Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
Hoping someone might have an idea where to look.
When updating items in a specific management pack the console crashes on any changes when it attempts to refresh the list. Its only one specific MP for Notification Subscriptions. Started after moving the MP from 2012 to 2016. Been attempting to determine if broken reference in the MP but no luck. Weird part is all the notifications are working and I can view all content. Only happens when I change a subscription and save the change.
An event will appear in the operations manger log.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: An ItemsControl is inconsistent with its items source.
  See the inner exception for more information. ---> System.Exception: Information for developers (use Text Visualizer to read this):
This exception was thrown because the generator for control 'Microsoft.EnterpriseManagement.UI.Controls.Internal.InnerList Items.Count:3' with name '(unnamed)' has received sequence of CollectionChanged events that do not agree with the current state of the Items collection.  The following differences were detected:
  Accumulated count 2 is different from actual count 3.  [Accumulated count is (Count at last Reset + #Adds - #Removes since last Reset).]

One or more of the following sources may have raised the wrong events:
     System.Windows.Controls.ItemContainerGenerator
      System.Windows.Controls.ItemCollection
       Microsoft.EnterpriseManagement.UI.ViewFramework.VirtualCollectionView
        Microsoft.EnterpriseManagement.UI.ViewFramework.VirtualCollection
(The starred sources are considered more likely to be the cause of the problem.)

The most common causes are (a) changing the collection or its Count without raising a corresponding event, and (b) raising an event with an incorrect index or item parameter.

The exception's stack trace describes how the inconsistencies were detected, not how they occurred.  To get a more timely exception, set the attached property 'PresentationTraceSources.TraceLevel' on the generator to value 'High' and rerun the scenario.  One way to do this is to run a command similar to the following:
   System.Diagnostics.PresentationTraceSources.SetTraceLevel(myItemsControl.ItemContainerGenerator, System.Diagnostics.PresentationTraceLevel.High)
from the Immediate window.  This causes the detection logic to run after every CollectionChanged event, so it will slow down the application.

Thanks

Best Answer

Answers

  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Guess I have to bite the bullet and recreate the MP. Ah well, thanks for the answer.
Sign In or Register to comment.