Hello.
I'm using Infragistics WPF4 v11.2 and getting following exceptions every once in a while:
First one
System.NullReferenceException: Object reference not set to an instance of an object.at Infragistics.DragDrop.WeakReferenceExtensions.Contains(IList`1 list, DependencyObject item)at Infragistics.DragDrop.DragDropManager.OnDragSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)at Infragistics.Controls.Menus.XamDataTreeNodeControl.set_Node(XamDataTreeNode value)at Infragistics.Controls.Menus.XamDataTreeNodeControl.OnAttached(XamDataTreeNode node)at Infragistics.Controls.Menus.XamDataTreeNode.OnElementAttached(XamDataTreeNodeControl element)at Infragistics.DependencyObjectRecyclingContainer`1.Infragistics.ISupportRecycling.OnElementAttached(FrameworkElement elem)at Infragistics.RecyclingManager.PanelInfo.AttachElement(ISupportRecycling obj)at Infragistics.Controls.Menus.Primitives.NodesPanel.RenderNode(XamDataTreeNode node, Double availableWidth)at Infragistics.Controls.Menus.Primitives.NodesPanel.MeasureOverride(Size availableSize)at System.Windows.FrameworkElement.MeasureCore(Size availableSize)at System.Windows.UIElement.Measure(Size availableSize)at Infragistics.Controls.Menus.Primitives.NodesPanel.MeasureOverride(Size availableSize)at System.Windows.FrameworkElement.MeasureCore(Size availableSize)at System.Windows.UIElement.Measure(Size availableSize)at System.Windows.ContextLayoutManager.UpdateLayout()at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)at System.Windows.Interop.HwndTarget.OnResize()at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)at MS.Win32.UnsafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)at System.Windows.Window.ShowHelper(Object booleanBox)at System.Windows.Window.Show()at HFA.View.Utils.ApplicationUtils.<>c__DisplayClass2.<ShowWindowOnNewThread>b__0() in c:\BuildAgent\work\3bc9df67e650ff91\Core\UI\View\Utils\ApplicationUtils.cs:line 96at System.Threading.ThreadHelper.ThreadStart_Context(Object state)at System.Threading.ExecutionContext.runTryCode(Object userData)at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)at System.Threading.ThreadHelper.ThreadStart()
And second one
[2013-01-14 15:28:28,055] ERROR [HFA.Photon.App] - Dispatcher[2013-01-14 15:28:28,055] ERROR [HFA.Photon.App] - Exception has been thrown by the target of an invocation.[2013-01-14 15:28:28,055] ERROR [HFA.Photon.App] - System.Reflection.TargetInvocationException[2013-01-14 15:28:28,118] ERROR [HFA.Photon.App] - at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)at System.Delegate.DynamicInvokeImpl(Object[] args)at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)[2013-01-14 15:28:28,118] ERROR [HFA.Photon.App] - Inner Exception: [2013-01-14 15:28:28,118] ERROR [HFA.Photon.App] - Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index[2013-01-14 15:28:28,118] ERROR [HFA.Photon.App] - System.ArgumentOutOfRangeException[2013-01-14 15:28:28,133] ERROR [HFA.Photon.App] - at System.ThrowHelper.ThrowArgumentOutOfRangeException()at Infragistics.Collections.WeakList`1.GetItemHelper(Int32 index)at Infragistics.Windows.Internal.ThrottleTimer.OnTimerTick_Sync()
I'm not sure what is triggering these exceptions. I only have logs from production users.
Please advise how to avoid this.
Hello,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Unfortunately I'm not able to reproduce this issue by myself. That's why I don't have any sample project for this. But I receive this exception from our production environment (~50 users) at least once a week. If I was able to reproduce that I would isolate the cause. But I have no idea what cause the issue exactly.
Is it possible to turn on some kind of logging for infragistics components? My guess is that user works with XamDataGrid or DockManager. If we knew what exactly is happening inside these components it would help us.
I'm working on huge application that includes dozen of different views, DockManager, DataGrid, DataTree, Tiles and a bunch of simple editors all from Infragistics. I can't share this application with you because I'm not allowed to publish it according to my job contract. Even I was allowed, this application would not run on your side, because it is bounded to a very specific environment.
It is a huge work to create any kind of sample project that emulates original application as is. Also even if we had had such project it would have taken inappropriate amount of time to reproduce the issue. I have 20 users working with application every single day for 8 hours and I have automated reporting system, that notifies me when something bad happens. Under these circumstances I get like 2 incidents we are talking about in a month. How long do you think it may take to reproduce that in sample project on your side?
What I can see in exceptions that I posted is that first was is occured while element was adding to xamDataTree and another one was occured while some timer was fired. But both of them are week references related. One hint I may offer you is that I'm using different Infragistincs components on different threads. I mean I have one application window on one thread and another one on another thread. Actually I have 3 different UI threads in my appication. All of them are in the same domain. And any of thme has Infragistics controls. If you are sharing some kind data between different components it could be related.
I have forwarded your issue to our engineering team and after some investigation they conclude that this seems to be caused by the Drag & Drop Framework used in the XamDataTree, but they need more details about your scenario. Could you please give us more details about your scenario where you use the XamDataTree and tell us if you show XamDataTree on window running on another thread?
Looking forward for your reply.
As I mentioned before, I have 3 UI threads. One of them is main thread and there are no xamDataTrees on this thread. However both of two remaining threads use XamDataTree and one of these threads can have multiple instances of xamDataTree. As far as I can see drag'n'drop is not enabled in both cases. At least can't drag anything out of the Tree or drop anything there. Basically both trees just show binded data and allow user to select an item within a tree.
This is first tree setup in xaml:
<ig:XamDataTree x:Name="algoDataTree" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ItemsSource="{Binding Path=Algos}" BorderThickness="0"> <ig:XamDataTree.CheckBoxSettings> <ig:CheckBoxSettings CheckBoxVisibility="Visible"/> </ig:XamDataTree.CheckBoxSettings>
<ig:XamDataTree.GlobalNodeLayouts> <ig:NodeLayout Key="AlgoLayout" TargetTypeName="AlgoViewModel" CheckBoxMemberPath="IsChecked" IsExpandedMemberPath="IsExpanded" DisplayMemberPath="DisplayName"/>
<ig:NodeLayout Key="AlgoInstanceLayout" TargetTypeName="AlgoInstanceViewModel" CheckBoxMemberPath="IsChecked" DisplayMemberPath="DisplayName"/>
</ig:XamDataTree.GlobalNodeLayouts></ig:XamDataTree>
And this is another one:
<ig:XamDataTree x:Name="algosTree" Grid.Row="0" Grid.Column="0" ItemsSource="{Binding Path=AlgoPositionCountersViewModel.Algos}" SelectedNodesCollectionChanged="algoDataTree_SelectedNodesCollectionChanged" BorderThickness="1" Margin="0,0,2,0">
<ig:XamDataTree.GlobalNodeLayouts>
<ig:NodeLayout Key="AlgoLayout" TargetTypeName="AlgoInstanceWithPositionsViewModel" IsExpandedMemberPath="IsExpanded" DisplayMemberPath="DisplayName" />
<ig:NodeLayout Key="PositionLayout" TargetTypeName="PositionViewModel" DisplayMemberPath="DisplayName"/>
I have logged this with development under ID: 144007 and I have also created a support ticket on your behalf: CAS-117802-G0F5Y9 and have linked the development issue to it, so that you can get automatically updated, when a Service Release containing the fix is available for download. You can get the new version from our website’s “My IG”, “My Keys & Downloads” tags: https://es.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
You can also monitor the support ticket’s progress through the “My Support Activity” tag: https://es.infragistics.com/Membership/MySupport.aspx
Please note that since our developers are not able to reproduce your beahvior they will make changes in our code based on the inforamtion they got from the exceptions, and it might resolve the issue that you are currently facing. Once we have it, we will provide you with it, to verify if the mentioned issue is still existing or not.
Thanks Stefan