Hi,
We have a XBAP application built using WPF using Infragistic V 13.1.We are using Infragistics XamDataTree to show a tree structure with many nested items. Certain users are reporting Application crash issue when trying to open the Tree structure.
We tried to reproduce the scenario in our local but was not able to do it. We read something about UI AutomationPeer and tried to reproduce the same issue in Win8/Win7 machines by running the "Narrator"(available with the windows) application and our application . We were successfully able to reproduce the below exception which our users are facing . Please guide us on this issue.
Application Crashed: Unhandled Exception Occured; System.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.AutomationPeers.XamDataTreeNodeControlAutomationPeer.GetChildrenCore() at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren() at System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit) at System.Windows.Automation.Peers.AutomationPeer.UpdateChildren() at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree() at System.Windows.Automation.Peers.AutomationPeer.UpdatePeer(Object arg) 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)
I am posting few more details regarding the issue we are facing -
Infragistic version Used - 13.1.20131.1109
The issue happens intermittently in the client machines. And we were able to reproduce this in our local Win8 env when we ran the narrator and moved through nodes and child nodes.
The error occurs randomly when we click either on parent node or child node.
Hello Chaithra,
Thank you for your post. I have been looking into and I can say that there was a similar issue logged in our internal system, which is now fixed in the last version of 13.1, so I can suggest you download the last service release and see if your issue will be fixed. You can download it by logging to our web site and going to Account \Keys & Downloads.
https://ko.infragistics.com/my-account/keys-and-downloads/
Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
I downloaded the latest service release named "NetAdvantage for WPF 2013 Vol.1 - Service Release" and ran my application along with the Narrator application.
The Infragistic DLL version has been updated to 13.1.20131.2406.
But I still get an error although a different one this time, when I randomly click on different nodes in the Tree.
Application Crashed: Unhandled Exception Occured; System.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.Controls.Menus.IntermediateNodesManager.get_DataCount() at Infragistics.Controls.Menus.NodesManager.Infragistics.IProvideDataItems<Infragistics.Controls.Menus.XamDataTreeNode>.get_DataCount() at Infragistics.Collections.BindableItemCollection`1.GetCount() at Infragistics.Collections.CollectionBase`1.get_Count() at Infragistics.Collections.CollectionBaseEnumerator`1.System.Collections.IEnumerator.MoveNext() at Infragistics.AutomationPeers.XamDataTreeNodeAutomationPeer.GetChildrenCore() at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren() at System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit) at System.Windows.Automation.Peers.AutomationPeer.UpdateChildren() at System.Windows.Automation.Peers.AutomationPeer.ResetChildrenCache() at Infragistics.AutomationPeers.XamDataTreeNodeAutomationPeer.Node_PropertyChanged(Object sender, PropertyChangedEventArgs e) at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e) at Infragistics.DependencyObjectNotifier.OnPropertyChanged(String propertyName) at Infragistics.Controls.Menus.XamDataTreeNode.OnElementReleased(XamDataTreeNodeControl element) at Infragistics.DependencyObjectRecyclingContainer`1.Infragistics.ISupportRecycling.OnElementReleased(FrameworkElement elem) at Infragistics.RecyclingManager.PanelInfo.OnElementReleased(ISupportRecycling item, FrameworkElement element) at Infragistics.RecyclingManager.PanelInfo.ReleaseElement(ISupportRecycling obj) at Infragistics.RecyclingManager.ReleaseElement(ISupportRecycling obj, Panel parent) at Infragistics.Controls.Menus.Primitives.NodesPanel.ReleaseNode(XamDataTreeNode node, Boolean removeManager) 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.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)
Is it possible for you to end as an isolated sample project, where this is reproduced, so we could be able to investigate this further for you? Also it will be great if you tell us the exact steps that we need to follow.
I am working on the sample application to reproduce the scenario . Will get back with it soon.
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Hi Stefan,
I have attached a sample application created in VS2010 named XamTreeSampleApplication.
I ran this application in Win8 and started the narrator application also. After few random clicks on the tree view we get an error which says "Object reference not set to
instance of an object"
We did some analysis and found that we are reloading the nodes everytime the user clicks hence the error comes. But I am still not sure the reason behind the error.
It would be helpful if you could let us know why the error is generated in this scenario.
Hello,
The stacktrace of your exception is a different one, so I can suggest you write a new thread and if possible attach an isolated sample application where the issue is reproducible, so we could be able to investigate this further for you.
We have a similar issue reported by some users but with a different Stacktrace - On 2014.2 (14.2.20142.2024) with the newest service-release.
We found out that this only happens if the narrator-app or the on-screen-keyboard is running.
This is the Exception:
System.NullReferenceException wurde nicht behandelt. HResult=-2147467261 Message=Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. Source=InfragisticsWPF4.Controls.Menus.XamDataTree.v14.2 StackTrace: bei Infragistics.AutomationPeers.XamDataTreeAutomationPeer.GetNodesInView() bei Infragistics.AutomationPeers.XamDataTreeAutomationPeer.Owner_LayoutUpdated(Object sender, EventArgs e) bei System.Windows.ContextLayoutManager.fireLayoutUpdateEvent() bei System.Windows.ContextLayoutManager.UpdateLayout() bei System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg) bei System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() bei System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() bei System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) bei System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) bei System.Windows.Threading.DispatcherOperation.InvokeImpl() bei System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Windows.Threading.DispatcherOperation.Invoke() bei System.Windows.Threading.Dispatcher.ProcessQueue() bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) bei System.Windows.Threading.Dispatcher.Run() bei System.Windows.Application.RunDispatcher(Object ignore) bei System.Windows.Application.RunInternal(Window window) bei System.Windows.Application.Run(Window window) bei System.Windows.Application.Run() bei Test.App.Main() in c:\Sandbox\Test\src\Test\obj\x86\Debug\App.g.cs:Zeile 0. bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() bei System.Threading.ThreadHelper.ThreadStart_Context(Object state) bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading.ThreadHelper.ThreadStart()
Is this related to this issue or should I create a new thread for this?
BR
Hello Kayla,
We have shipped out a new service release where your issue is resolved. I'd be glad to find out if you had tested it out and if it had met your requirements.
You can download the Service Releases by logging to our web site and going to Account \Keys & Downloads.
Thank you for the provided information.
It should be noted that this also affects applications running on Windows Server 2012 R2 RDS's. We've been able to repro the crash with both 14.1 and 14.2 with the same stack trace.