Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Fri, 1 Aug 2008 02:58:19 -0700,    group: microsoft.public.dotnet.framework        back       


WPF RichTextBox Control   
Hi,

We've got a WinForms application which uses a WPF Rich Text Box (via 
WindowsFormsIntegration) which is failing on certain user's machines, but 
works fine on all others. If we clear their NT profile (we use roaming 
profiles), the issue goes away. Of course this is not a suitable workaround 
for a large number of users.

To ensure it wasn't any other components causing the issue, I created a 
simple application that just has the WPF RichTextBox within a WinForms 
application and the same exception occurs for the users which can't use our 
main application.

The exception is as below. Any help would be appreciated.


Thanks.

NullReferenceException: Object reference not set to an instance of an object.

Stacktrace
at System.Windows.Documents.TextStore.OnGotFocus()
at System.Windows.Documents.TextEditor.OnGotKeyboardFocus(Object sender, 
KeyboardFocusChangedEventArgs e)
at 
System.Windows.Controls.Primitives.TextBoxBase.OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
at System.Windows.UIElement.OnGotKeyboardFocusThunk(Object sender, 
KeyboardFocusChangedEventArgs e)
at 
System.Windows.Input.KeyboardFocusChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object 
target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, 
RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, 
RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, 
Int32 timestamp)
at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject 
newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, 
Boolean askNew, Boolean forceToNullIfFailed)
at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean 
askOld, Boolean askNew)
at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
at System.Windows.UIElement.Focus()
at System.Windows.Documents.TextEditorMouse.MoveFocusToUiScope(TextEditor 
This)
at System.Windows.Documents.TextEditorMouse.OnMouseDown(Object sender, 
MouseButtonEventArgs e)
at 
System.Windows.Controls.Primitives.TextBoxBase.OnMouseDown(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseDownThunk(Object sender, 
MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate 
genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object 
target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, 
RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, 
RoutedEventArgs args, Boolean reRaised)
at System.Windows.ContentElement.RaiseEventImpl(RoutedEventArgs args)
at System.Windows.ContentElement.RaiseEvent(RoutedEventArgs args, Boolean 
trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, 
InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, 
Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, 
Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(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, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, 
Delegate callback, Object args, Boolean isSingleParameter, Delegate 
catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority 
priority, TimeSpan timeout, Delegate method, Object args, Boolean 
isSingleParameter)
at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, 
Delegate method, Object arg)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr 
wParam, IntPtr lParam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at 
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 
dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 
reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 
reason, ApplicationContext context)
at System.Windows.Forms.Application.Run()
at xxx.xxx.xxx.Program.Main(String[] args) in d:\xxx\Program.cs:line 135
date: Fri, 1 Aug 2008 02:58:19 -0700   author:   Anthony Meehan am

Re: WPF RichTextBox Control   
On Aug 1, 1:58 pm, Anthony Meehan <an...@nospam.nospam> wrote:
> Hi,
>
> We've got a WinForms application which uses a WPF Rich Text Box (via
> WindowsFormsIntegration) which is failing on certain user's machines, but
> works fine on all others. If we clear their NT profile (we use roaming
> profiles), the issue goes away. Of course this is not a suitable workaround
> for a large number of users.
>
> To ensure it wasn't any other components causing the issue, I created a
> simple application that just has the WPF RichTextBox within a WinForms
> application and the same exception occurs for the users which can't use our
> main application.
>
> The exception is as below. Any help would be appreciated.

It looks like a genuine bug, and it's probably best to report it to VS
Connect, and possibly contact Microsoft directly if you need urgent
resolution:

https://connect.microsoft.com/VisualStudio/Feedback
date: Fri, 1 Aug 2008 03:29:11 -0700 (PDT)   author:   Pavel Minaev

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us