SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

crash when double-clic a button in designer mode

Last post 11-05-2007 11:13 PM by asl. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-31-2007 11:14 PM

    • agasca
    • Top 500 Contributor
    • Joined on 03-27-2006
    • San Luis Potosi, Mexico
    • Posts 10

    crash when double-clic a button in designer mode

     Hi.

    i'm using SharpDevelop 2.2.1.2648. in winxp

    i have a button in a form and when double-clickign it,
    sharp develop crash.

     i have a sample proyect to see this behavoir if you need it.

     This is the exception:

     SharpDevelop Version : 2.2.1.2648
    .NET Version         : 2.0.50727.832
    OS Version           : Microsoft Windows NT 5.1.2600 Service Pack 2
    Current culture      : Spanish (Mexico) (es-MX)
    Current UI language  : es-ES
    Working Set Memory   : 64032kb
    GC Heap Memory       : 19911kb

    Unhandled exception terminated the workbench
    Exception thrown:
    System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: startIndex
       at System.String.CtorCharArrayStartLength(Char[ value, Int32 startIndex, Int32 length)
       at ICSharpCode.TextEditor.Document.GapTextBufferStrategy.GetText(Int32 offset, Int32 length)
       at ICSharpCode.TextEditor.Document.DefaultDocument.GetText(Int32 offset, Int32 length)
       at ICSharpCode.FormsDesigner.CSharpDesignerGenerator.GetCursorLine(IDocument document, IMethod method)
       at ICSharpCode.FormsDesigner.AbstractDesignerGenerator.InsertComponentEvent(IComponent component, EventDescriptor edesc, String eventMethodName, String body, String& file, Int32& position)
       at ICSharpCode.FormsDesigner.FormsDesignerViewContent.ShowSourceCode(IComponent component, EventDescriptor edesc, String eventMethodName)
       at ICSharpCode.FormsDesigner.Services.EventBindingService.ShowCode(IComponent component, EventDescriptor edesc, String methodName)
       at System.ComponentModel.Design.EventBindingService.ShowCodeIdle(Object sender, EventArgs e)
       at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
       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 ICSharpCode.SharpDevelop.Commands.StartWorkbenchCommand.Run(IList`1 fileList)
       at ICSharpCode.SharpDevelop.Sda.CallHelper.RunWorkbenchInternal(Object settings)

    thanks.

    alejandro 

     

  • 11-05-2007 7:03 AM In reply to

    • agasca
    • Top 500 Contributor
    • Joined on 03-27-2006
    • San Luis Potosi, Mexico
    • Posts 10

    Bug reproduction: crash when double-clic a button in designer mode

    1. create new windows application solution
    2. in ManForm.cs, switch to design view an put a button control (button1).
    3. double clic the button, void Button1Click(object sender, EventArgs e) is created.
    4. save. close MainForm.cs
    5. open MainForm.Designer.cs (don't touch anyting here)
    6. look the position of the last closing brace (mine is in line 64)
    7. close MainForm.Designer.cs
    8. open MainForm.cs in code view
    9. insert newlines before void Button1Click, so its line position is *equal* to the line of the last closing bracket in MainForm.Designer.cs.    Example, if the line of the last closing brace in MainForm.Designer.cs is 64, we must move  Button1Click, in MainForm.cs, to this position:

    64        void Button1Click(object sender, EventArgs e)
    65        {
    66           
    67        }

    1. swith to design view.
    2. double clic in button1
    3. #dev crash with this exception:

    SharpDevelop Version : 2.2.0.2595
    .NET Version         : 2.0.50727.832
    OS Version           : Microsoft Windows NT 5.1.2600 Service Pack 2
    Current culture      : Spanish (Mexico) (es-MX)
    Current UI language  : es-ES
    Working Set Memory   : 65952kb
    GC Heap Memory       : 16528kb

    Unhandled exception terminated the workbench
    Exception thrown:
    System.ArgumentOutOfRangeException: El índice estaba fuera del intervalo. Debe ser un valor no negativo e inferior al tamaño de la colección.
    Nombre del parámetro: startIndex
       en System.String.CtorCharArrayStartLength(Char[ value, Int32 startIndex, Int32 length)
       en ICSharpCode.TextEditor.Document.GapTextBufferStrategy.GetText(Int32 offset, Int32 length)
       en ICSharpCode.TextEditor.Document.DefaultDocument.GetText(Int32 offset, Int32 length)
       en ICSharpCode.FormsDesigner.CSharpDesignerGenerator.GetCursorLine(IDocument document, IMethod method)
       en ICSharpCode.FormsDesigner.AbstractDesignerGenerator.InsertComponentEvent(IComponent component, EventDescriptor edesc, String eventMethodName, String body, String& file, Int32& position)
       en ICSharpCode.FormsDesigner.FormsDesignerViewContent.ShowSourceCode(IComponent component, EventDescriptor edesc, String eventMethodName)
       en ICSharpCode.FormsDesigner.Services.EventBindingService.ShowCode(IComponent component, EventDescriptor edesc, String methodName)
       en System.ComponentModel.Design.EventBindingService.ShowCodeIdle(Object sender, EventArgs e)
       en System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
       en System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       en System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       en System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       en System.Windows.Forms.Application.Run(Form mainForm)
       en ICSharpCode.SharpDevelop.Commands.StartWorkbenchCommand.Run(IList`1 fileList)
       en ICSharpCode.SharpDevelop.Sda.CallHelper.RunWorkbenchInternal(Object settings)  

    thanks.

    Alejandro. 

  • 11-05-2007 11:13 PM In reply to

    • asl
    • Top 10 Contributor
    • Joined on 12-14-2005
    • Posts 401

    Re: Bug reproduction: crash when double-clic a button in designer mode

    Added Bug Report: SD2-1382

Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.