Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
875
Unhandled exception error from WinSpellChecker when pasting in text
posted

I am getting and Unhandled exception when I paste certain text into a Textbox that has the WinSpellChecker hooked up to it.  It states "Specified argument was out of the range of valid values.  Parameter name: Following(34) offset out of bounds."

 To reproduce this in VS 2005  (I am using version 7.3.20073.1041 of the WinSpellChecker)

-  Create a new Windows Form

-  Drop a Textbox on the form  and a WinSpellChecker

-  Set the Textbox's  property SpellChekerSettings Enabled = True

-  Run the application and then PASTE the following text as an example (including the semi-colon)             

                    This will crash&burn Spellchecker;

Right after the text is pasted I receive the error.  If I type the same text in the text box it does not cause an error.  There are no hidden characters in the string.  I typed the text into a new session of Notepad and then copied and pasted it into my test application and it still crashes.  If I don't include the semi-colon when I copy the text, it does not crash.  Below is the stack trace I am receiving.

 Thanks,

Jeff

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Following(34) offset out of bounds
   at Infragistics.Win.UltraWinSpellChecker.FrameWorkSpecific.SimpleTextBoundary.Following(Int32 offset)
   at Infragistics.Win.UltraWinSpellChecker.FrameWorkSpecific.AdvancedTextBoundary.FollowingProxy(Int32 offset)
   at Infragistics.Win.UltraWinSpellChecker.FrameWorkSpecific.AdvancedTextBoundary.Following(Int32 offset)
   at Infragistics.Win.UltraWinSpellChecker.SpellChecker.GetNextWord()
   at Infragistics.Win.UltraWinSpellChecker.SpellChecker.GetNextWord()
   at Infragistics.Win.UltraWinSpellChecker.SpellChecker.PreCheck()
   at Infragistics.Win.UltraWinSpellChecker.SpellChecker.Check(String text, Int32 startPosition)
   at Infragistics.Win.UltraWinSpellChecker.SpellChecker.Check(String text)
   at Infragistics.Win.UltraWinSpellChecker.UltraSpellChecker.CheckTextSubString(String text, Int32 startIndex, Int32 length, Object spellCheckTarget)
   at Infragistics.Win.UltraWinSpellChecker.UltraSpellChecker.CheckNewText(String newText, TextChangeInfo changeInfo, Object spellCheckTarget)
   at Infragistics.Win.UltraWinSpellChecker.AsYouTypeManager.SpellCheckText(String newText, TextChangeInfo changeInfo, Int32 indexInExcludedWord)
   at Infragistics.Win.UltraWinSpellChecker.AsYouTypeManager.SpellCheckNewText(Boolean allowErrorAtCursor)
   at Infragistics.Win.UltraWinSpellChecker.AsYouTypeManager.SpellCheckNewText()
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
   at System.Windows.Forms.TextBox.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

 

Parents Reply Children
No Data