This is a migrated thread and some comments may be shown as answers.
Dispatcher.LegacyInvokeImpl nullReferenceException
7 Answers 42 Views
This is a migrated thread and some comments may be shown as answers.
mark
Top achievements
Rank 1
mark asked on 08 Oct 2013, 11:58 PM

I am getting a pretty tough error that is coming from ItemsControlExtensions used by the TileList control. I get this error when I run the my application using Narrator.


I found an article about this on StackOverflow where somebody encountered this issue on some custom controls they had in their own solution that caused the error. But in my case, I am using Telerik. So I am kind of stuck unless Telerik fixes it.



Here is the link to the stack over flow find.



http://stackoverflow.com/questions/16245732/nullreferenceexception-from-presentationframework-dll



All I am trying to do is launch the app. The app uses a TileList control as well as a RadAutoCompleteBox, RadComboBox, and RadGridView.



When I run the app on Windows 8 I get two errors when the application starts:



First Error:

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.NullReferenceException

Stack:

   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

   at System.Windows.Threading.DispatcherOperation.InvokeImpl()

   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

   at System.Windows.Threading.DispatcherOperation.Invoke()

   at System.Windows.Threading.Dispatcher.ProcessQueue()

   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)

   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)

   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)

   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)

   at System.Windows.Application.RunInternal(System.Windows.Window)

   at System.Windows.Application.Run()



Error 2:

Faulting application name: xxx.exe, version: 1.0.0.0, time stamp: 0x525495d8

Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000

Exception code: 0xc0000005

Fault offset: 0x000007fe546901ab

Faulting process id: 0x1e5c

Faulting application start time: 0x01cec47f37ad9317

Faulting application path: C:\Users\xxx\Desktop\xxx\Sprint1b\xxx.exe

Faulting module path: unknown

Report Id: 7f5853ab-3072-11e3-bef0-5c514f0c8fb3

Faulting package full name:

Faulting package-relative application ID:





I am able to run the app on Windows 7 and Windows 8.1 BUT when I run narrator on Windows 8.1 I get this error:



   at Telerik.Windows.Controls.ItemsControlExtensions.<GetContainers>d__0`1.MoveNext() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Common\ItemsControlExtensions.cs:line 45

   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()

   at Telerik.Windows.Automation.Peers.RadAutoCompleteBoxAutomationPeer.GetChildrenCore() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\AutoCompleteBox\AutomationPeers\RadAutoCompleteBoxAutomationPeer.cs:line 173

   at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()

   at System.Windows.Automation.Peers.AutomationPeer.GetChildren()

   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)

   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)

   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)

   at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent)

   at System.Windows.Automation.Peers.AutomationPeer.ValidateConnected(AutomationPeer connectedPeer)

   at MS.Internal.Automation.ElementProxy.StaticWrap(AutomationPeer peer, AutomationPeer referencePeer)

   at System.Windows.Automation.Peers.AutomationPeer.RaiseAutomationEvent(AutomationEvents eventId)

   at System.Windows.Automation.Peers.SelectorAutomationPeer.RaiseSelectionEvents(SelectionChangedEventArgs e)

   at System.Windows.Controls.Primitives.Selector.SelectionChanger.End()

   at System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(ItemInfo info, Boolean assumeInItemsCollection)

   at System.Windows.Controls.Primitives.Selector.OnSelectedIndexChanged(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.SetCurrentValueInternal(DependencyProperty dp, Object value)

   at System.Windows.Controls.TabControl.OnGeneratorStatusChanged(Object sender, EventArgs e)

   at System.EventHandler.Invoke(Object sender, EventArgs e)

   at System.Windows.Controls.ItemContainerGenerator.SetStatus(GeneratorStatus value)

   at System.Windows.Controls.ItemContainerGenerator.Generator.System.IDisposable.Dispose()

   at System.Windows.Controls.Panel.GenerateChildren()

   at System.Windows.Controls.Primitives.TabPanel.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)

   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.Controls.Control.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)

   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)

   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)

   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)

   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.Controls.Border.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.Controls.Control.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)

   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)

   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.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)

7 Answers, 1 is accepted

Sort by
0
Ventzi
Telerik team
answered on 11 Oct 2013, 09:17 AM
Hi Mark,

 Unfortunately the NullReferenceException in the first error is caused by internal framework code where we haven't any influence. 
You have already opened support ticket for the second error and we would kindly ask you to continue our conversation there.

Regards,
Ventzi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
mark
Top achievements
Rank 1
answered on 11 Oct 2013, 03:24 PM

I thought it was pretty clear that the null reference exception was happening here:


at Telerik.Windows.Controls.ItemsControlExtensions.<GetContainers>d__0`1.MoveNext() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Common\ItemsControlExtensions.cs:line 45





This appears to be Telerik Code from the Telerik WPF Controls Scrum team. I find it highly unlikely Microsoft WPF developers are leaving their local source code paths within the official release of WPF.

0
Ventzi
Telerik team
answered on 16 Oct 2013, 08:22 AM
Hello Mark,

I will repeat our reply from the support ticket regarding the same issue:

Indeed the provided stack trace of the NullReferenceException shows that the error leads to our code, but there could be various reasons and cases which can cause it. Without reproducing the issue at our side we cannot do much to help.

I would ask you to continue our conversation there.  Thank you for the understanding.

Regards,
Ventzi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Guy
Top achievements
Rank 2
answered on 24 Jan 2014, 09:39 AM
Hi

We are experiencing the same thing on Windows 8 and 8.1, with or without the Narrator active. On Windows 7 we also get this exception thrown if the Narrator is active.

Was there a resolution to this issue in your support ticket?

Thanks,

Guy
0
Yana
Telerik team
answered on 29 Jan 2014, 08:02 AM
Hello Guy,

I have checked the support ticket regarding this case and it seems that we did not manage to reproduce the reported issue. So if you could provide us with more information about your scenario and/or some sample code, it will be of great help.

Regards,
Yana
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Guy
Top achievements
Rank 2
answered on 05 Feb 2014, 02:41 PM
Hi

The Q3 2013 SP2 release seems to have resolved this problem. I'd imagine it was this item in your change log:

"NullReferenceException is thrown when RadAutoCompleteBox is initially collapsed and automation peers are turned on"

Thanks,

Guy
0
Yana
Telerik team
answered on 05 Feb 2014, 03:29 PM
Hello,

I am glad that the issue is resolved.

Regards,
Yana
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Asked by
mark
Top achievements
Rank 1
Answers by
Ventzi
Telerik team
mark
Top achievements
Rank 1
Guy
Top achievements
Rank 2
Yana
Telerik team
Share this question
or