Windows >
Software Development for Windows Client Forums
>
Application Compatibility for Windows Development
>
NullReferenceException on RemoveInflatedListener error on WPF application after upgrading to Vista Service Pack 2
NullReferenceException on RemoveInflatedListener error on WPF application after upgrading to Vista Service Pack 2
- If installed on a machine with Service Pack 2 for Windows Vista my WPF application throws the following error:
System.NullReferenceException was unhandled by user code
Message="Object reference not set to an instance of an object."
Source="PresentationFramework"
For any other OS/Service Pack combination works great including Windows 7.
On the stack trace the first few lines go like this:
StackTrace:
at System.Windows.DeferredResourceReference.RemoveInflatedListener(ResourceReferenceExpression listener)
at System.Windows.ResourceReferenceExpression.InvalidateCacheValue()
at System.Windows.ResourceReferenceExpression.InvalidateMentorCache()
at System.Windows.ResourceReferenceExpression.InvalidateExpressionValue(Object sender, EventArgs e)
at System.Windows.TreeWalkHelper.InvalidateResourceReferences(DependencyObject d, ResourcesChangeInfo info)
at System.Windows.TreeWalkHelper.OnResourcesChanged(DependencyObject d, ResourcesChangeInfo info, Boolean raiseResourceChangedEvent)
at System.Windows.FrameworkElement.OnAncestorChangedInternal(TreeChangeInfo parentTreeState)
at System.Windows.TreeWalkHelper.OnAncestorChanged(FrameworkElement fe, FrameworkContentElement fce, TreeChangeInfo info)
at System.Windows.TreeWalkHelper.OnAncestorChanged(DependencyObject d, TreeChangeInfo info)
If the machine is rolled back to Vista SP1, the application works perfectly. Does anyone have a similar experience with Vista Service Pack 2?
The only reference that I found on the internet about something similar is this: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/f416d9cd-9295-4d67-a3f6-89306f2fef03
All Replies
- Hello danielp,Thanks for your post.It's hard to guess what cause that exception, to troubleshoot the issue could you please try to debug the application and see where the exception was thrown and paste the code here? It would be more helpful if you could send me a simple project that can reproduce this issue to my mailbox(v-rzhang[at]microsoft.com), I will dig into the project and keep you updated.Thanks,Rong-Chun Zhang
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. - With the help of Microsoft tech support we found what was causing the issue. In our WPF application we are using a 3rd party component from Infragistics, specifically the XamOutlookBar. This control works perfectly unless you set its theme to Office2k7Black and you run the application under Windows Vista Service Pack 2. Once you set the theme back to the default and the problem goes away. We are talking with Infragistics to find a solution and we will posted here once we have it.
- Have you got any progress on this issue?Thanks,Rong-Chun Zhang
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. - I have not received any answers yet. They are probably working on a fix for the next release. I will let you know as soon as I have an answer.
Daniel Pereira - Thank you! Look forward to hearing from you.Thanks,Rong-Chun Zhang
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.


