We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

ArgumentOutOfRangeException when adding text with AppendText

Thread ID:

Created:

Updated:

Platform:

Replies:

45852 Jun 29,2006 08:08 AM Jul 18,2006 06:07 AM Windows Forms 3
loading
Tags: EditControl
Eldritch Palmer
Asked On June 29, 2006 08:08 AM

I can''t reliably reproduce this error, but this occurs sporadically when adding text to the edit control using AppendText. The only way text is added to the control is with AppendText. This is all code that''s related to the editcontrol in the form: editControl1.ShowOutliningCollapsers = false; editControl1.Text = string.Empty; editControl1.SaveOnClose = false; editControl1.UseXPStyle = true; editControl1.WordWrap = false; editControl1.ShowLineNumbers = false; editControl1.Languages.Clear (); editControl1.Language.Lexems.Clear (); editControl1.Language.Splits.Clear (); editControl1.Language.ResetCaches (); editControl1.ConvertOnLoad = false; editControl1.ReadOnly = false; Here''s the stack trace of the exception {System.ArgumentOutOfRangeException: Stream offset is out of range. Parameter name: streamOffset Actual value was 297. at Syncfusion.Windows.Forms.Edit.Implementation.IO.StreamsWrapper.GetParsePoint(Int64 streamOffset) at Syncfusion.Windows.Forms.Edit.Implementation.Parser.LexemLine.GetLineLexems(Int64& lPositionBeforeNewLine) at Syncfusion.Windows.Forms.Edit.Implementation.Parser.RenderedLine.GetLineLexems(Int64& lPositionBeforeNewLine) at Syncfusion.Windows.Forms.Edit.Implementation.Parser.LexemLine.GetLineEndStack() at Syncfusion.Windows.Forms.Edit.Implementation.Parser.UncachedLexemLine.get_LineEndStack() at Syncfusion.Windows.Forms.Edit.Implementation.Parser.LexemParser.InsertText(String str, CoordinatePoint point) at Syncfusion.Windows.Forms.Edit.StreamEditControl.TextInsertInternal(Int32 iLine, Int32 iColumn, String str, Boolean update, Boolean bUseTabStops) at Syncfusion.Windows.Forms.Edit.StreamEditControl.AppendText(String text) at Syncfusion.Windows.Forms.Edit.EditControl.AppendText(String text) at EssentialGridTest.Form1.log(String text, Boolean appendNewline) in e:\Pers\Projects\EssentialGridTest\EssentialGridTest\Form1.cs:line 48 at EssentialGridTest.Form1.log(String text) in e:\Pers\Projects\EssentialGridTest\EssentialGridTest\Form1.cs:line 44 at EssentialGridTest.Form1.logStyleInfo(String name, GridStyleInfo style) in e:\Pers\Projects\EssentialGridTest\EssentialGridTest\Form1.cs:line 121 at EssentialGridTest.Form1.button1_Click(Object sender, EventArgs e) in e:\Pers\Projects\EssentialGridTest\EssentialGridTest\Form1.cs:line 111 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.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.DebuggableCallback(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(Form mainForm) at EssentialGridTest.Program.Main() in e:\Pers\Projects\EssentialGridTest\EssentialGridTest\Program.cs:line 17 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()}

Eldritch Palmer
Replied On June 29, 2006 11:13 AM

I''m using v4.2.0.37 by the way >I can''t reliably reproduce this error, but this occurs sporadically when adding text to the edit control using AppendText. >The only way text is added to the control is with AppendText. > >This is all code that''s related to the editcontrol in the form: > editControl1.ShowOutliningCollapsers = false; > editControl1.Text = string.Empty; > editControl1.SaveOnClose = false; > editControl1.UseXPStyle = true; > editControl1.WordWrap = false; > editControl1.ShowLineNumbers = false; > editControl1.Languages.Clear (); > editControl1.Language.Lexems.Clear (); > editControl1.Language.Splits.Clear (); > editControl1.Language.ResetCaches (); > editControl1.ConvertOnLoad = false; > editControl1.ReadOnly = false; > > >Here''s the stack trace of the exception > > >{System.ArgumentOutOfRangeException: Stream offset is out of range. >Parameter name: streamOffset >Actual value was 297. > at Syncfusion.Windows.Forms.Edit.Implementation.IO.StreamsWrapper.GetParsePoint(Int64 streamOffset) > at Syncfusion.Windows.Forms.Edit.Implementation.Parser.LexemLine.GetLineLexems(Int64& lPositionBeforeNewLine) > at Syncfusion.Windows.Forms.Edit.Implementation.Parser.RenderedLine.GetLineLexems(Int64& lPositionBeforeNewLine) > at Syncfusion.Windows.Forms.Edit.Implementation.Parser.LexemLine.GetLineEndStack() > at Syncfusion.Windows.Forms.Edit.Implementation.Parser.UncachedLexemLine.get_LineEndStack() > at Syncfusion.Windows.Forms.Edit.Implementation.Parser.LexemParser.InsertText(String str, CoordinatePoint point) > at Syncfusion.Windows.Forms.Edit.StreamEditControl.TextInsertInternal(Int32 iLine, Int32 iColumn, String str, Boolean update, Boolean bUseTabStops) > at Syncfusion.Windows.Forms.Edit.StreamEditControl.AppendText(String text) > at Syncfusion.Windows.Forms.Edit.EditControl.AppendText(String text) > at EssentialGridTest.Form1.log(String text, Boolean appendNewline) in e:\Pers\Projects\EssentialGridTest\EssentialGridTest\Form1.cs:line 48 > at EssentialGridTest.Form1.log(String text) in e:\Pers\Projects\EssentialGridTest\EssentialGridTest\Form1.cs:line 44 > at EssentialGridTest.Form1.logStyleInfo(String name, GridStyleInfo style) in e:\Pers\Projects\EssentialGridTest\EssentialGridTest\Form1.cs:line 121 > at EssentialGridTest.Form1.button1_Click(Object sender, EventArgs e) in e:\Pers\Projects\EssentialGridTest\EssentialGridTest\Form1.cs:line 111 > at System.Windows.Forms.Control.OnClick(EventArgs e) > at System.Windows.Forms.Button.OnClick(EventArgs e) > at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) > at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) > at System.Windows.Forms.Control.WndProc(Message& m) > at System.Windows.Forms.ButtonBase.WndProc(Message& m) > at System.Windows.Forms.Button.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.DebuggableCallback(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(Form mainForm) > at EssentialGridTest.Program.Main() in e:\Pers\Projects\EssentialGridTest\EssentialGridTest\Program.cs:line 17 > at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) > at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) > at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() > at System.Threading.ThreadHelper.ThreadStart_Context(Object state) > at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) > at System.Threading.ThreadHelper.ThreadStart()}

Administrator [Syncfusion]
Replied On June 30, 2006 06:12 AM

Hi Palmer, I have tested for this issue using v4.2.0.37 and was not able to see the problem.Please refer to the test sample attached here and let me know if I am missing something.If I have not understood your specifications correctly, could you please modify the sample to show the problem ? Regards, Ebenezer.P

AppendText.zip

Administrator [Syncfusion]
Replied On July 18, 2006 06:07 AM

Hi Ebenezer, Sorry for the late reply. Your test sample doesn''t look particularly different from mine. Unfortunately I can''t reliably reproduce the problem, it just pops up sporadically. I''ll get back to you if I ever manage to get a reliable repro sample. >Hi Palmer, > >I have tested for this issue using v4.2.0.37 and was not able to see the problem.Please refer to the test sample attached here and let me know if I am missing something.If I have not understood your specifications correctly, could you please modify the sample to show the problem ? > >Regards, >Ebenezer.P >

AppendText.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;