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://es.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.
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.
I have logged this with development under ID: 181271 and I have also created a support ticket on your behalf: CAS-143042-Y3P1Y5 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
I have also modified your sample, so now the exception is not thrown. Basically I added null check for the ActiveNode in the Button's Click event. You can use this workaround until our developers investigate the issue.
Hi Stephan,
We are already using this workaround in our applications. But we are keen to know why this behavior occurs only when you start a 'Narrator' application.
I hope you will get back with the answer for these queries in the support ticket .
Thank you for the support.
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.
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.
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