Bug Report T295876
Visible to All Users

ArgumentOutOfRangeException is raised on focusing a RichEditControl document when SpellChecker is assigned to RichEditControl

created 9 years ago

hi !

i have got a random error ( application crash) when my client use the richeditcontrol :

Visual Basic
Consultez la fin de ce message pour plus de détails sur l'appel du débogage juste-à-temps (JIT) à la place de cette boîte de dialogue. ************** Texte de l'exception ************** System.ArgumentOutOfRangeException: L'index était hors limites. Il ne doit pas être négatif et doit être inférieur à la taille de la collection. Nom du paramètre : index à System.ThrowHelper.ThrowArgumentOutOfRangeException() à DevExpress.Office.UndoableIndexBasedObject`2.get_InfoCore() à DevExpress.Office.UndoableIndexBasedObject`2.get_Info() à DevExpress.XtraRichEdit.Model.CharacterPropertiesMerger..ctor(CharacterProperties initialProperties) à DevExpress.XtraRichEdit.Model.TextRunBase.GetMergedCharacterProperties() à DevExpress.XtraRichEdit.Model.TextRunBase.get_MergedCharacterFormattingCacheIndex() à DevExpress.XtraRichEdit.Model.TextRunBase.get_MergedCharacterFormatting() à DevExpress.XtraRichEdit.Model.VisibleTextFilter.IsRunVisibleCore(RunIndex runIndex) à DevExpress.XtraRichEdit.Model.VisibleTextFilter.IsRunVisible(RunIndex runIndex) à DevExpress.XtraRichEdit.SpellChecker.SpellCheckerManager.IsRangeVisible(DocumentModelPosition start, DocumentModelPosition end) à DevExpress.XtraRichEdit.SpellChecker.SpellCheckerManager.ProcessModifiedWord() à DevExpress.XtraRichEdit.SpellChecker.SpellCheckerManager.OnSelectionChanged(Object sender, EventArgs e) à System.EventHandler.Invoke(Object sender, EventArgs e) à DevExpress.XtraRichEdit.Model.DocumentModel.RaiseInnerSelectionChanged() à DevExpress.XtraRichEdit.Model.DocumentModel.OnSelectionChanged(Object sender, EventArgs e) à DevExpress.XtraRichEdit.Model.Selection.OnSelectionChanged(Object sender, EventArgs e) à DevExpress.XtraRichEdit.Model.SelectionItem.RaiseChanged() à DevExpress.XtraRichEdit.Model.SelectionItem.OnChangedCore() à DevExpress.XtraRichEdit.Model.SelectionItem.DevExpress.Utils.IBatchUpdateHandler.OnLastEndUpdate() à DevExpress.Utils.BatchUpdateHelper.EndUpdate() à DevExpress.XtraRichEdit.Model.Selection.EndUpdate() à DevExpress.XtraRichEdit.Model.DocumentModel.OnEndUpdate() à DevExpress.Utils.BatchUpdateHelper.EndUpdate() à DevExpress.XtraRichEdit.Commands.Internal.PlaceCaretToPhysicalPointCommand.ExecuteCore() à DevExpress.XtraRichEdit.Mouse.DefaultMouseHandlerState.BeginCharacterSelectionCore(RichEditHitTestResult hitTestResult) à DevExpress.XtraRichEdit.Mouse.DefaultMouseHandlerState.BeginCharacterSelection(RichEditHitTestResult hitTestResult) à DevExpress.XtraRichEdit.Mouse.DefaultMouseHandlerState.HandleMouseDown(RichEditHitTestResult hitTestResult) à DevExpress.XtraRichEdit.Mouse.DefaultMouseHandlerState.HandleMouseDown(Point physicalPoint) à DevExpress.XtraRichEdit.Mouse.DefaultMouseHandlerState.OnMouseDown(MouseEventArgs e) à DevExpress.Utils.MouseHandler.HandleMouseDown(MouseEventArgs e) à DevExpress.Utils.MouseHandler.OnMouseDown(MouseEventArgs e) à DevExpress.Services.Implementation.MouseHandlerService.OnMouseDown(MouseEventArgs e) à DevExpress.XtraRichEdit.Internal.InnerRichEditControl.OnMouseDown(MouseEventArgs e) à DevExpress.XtraRichEdit.RichEditControl.OnMouseDown(MouseEventArgs e) à System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) à System.Windows.Forms.Control.WndProc(Message& m) à DevExpress.XtraRichEdit.RichEditControl.WndProc(Message& m) à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

hard for me to give you more details or an example for reproduce the bug…

i have search in the forum and it seems that you have many problems with ThrowArgumentOutOfRangeException  and UndoableIndexBasedObject`2

After the internal error , the richeditcontrol is no more accessible and blank ( like in suspendlayout)

thanks for help.

Thomas

Show previous comments (4)
DevExpress Support Team 9 years ago

    Hello Traineau,
    In fact, even if we add null reference checking to the mentioned constructor, there can be another "NullReference" exception, without any additional detailed message. Instead of adding such patches for each exception case, it is more correct to determine the exact cause of the issue and fix it.
    Also, it is not quite clear whether the issue is caused by some bottlenecks in our source code, or the cause of the issue lies in the specifics of the scenario in which the RichEditControl is used. We would really appreciate if you can stably reproduce the issue and provide us with a corresponding sample project so that we can replicate the problematic behavior on our side.
    We are looking forward to your response.

    E E
    ELA SOFTWARE TEAM 9 years ago

      here is a project file with the error :
      click on "button1" => "button2" => "button1" => click in the richedit =>ERROR
      the problem occurs when the richedit has a spellchecker, the error is causing with the RTF of ressource.string2 i think.
      Thanks

      DevExpress Support Team 9 years ago

        Hello Traineau,
        Thank you for your project, I was able to reproduce this exception.
        I passed this ticket to our developers for further research. Please bear with us. We will notify you as soon as we make any progress.

        Answers approved by DevExpress Support

        created 9 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.