Project

General

Profile

Actions

Bug #5836

open
JK PA

Editbox breaks after sending mutiple lines, then typing causes an exception

Bug #5836: Editbox breaks after sending mutiple lines, then typing causes an exception

Added by Jonathan Kay 1 day ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Interface
Target version:
Start date:
04/27/2026
Due date:
% Done:

0%

Estimated time:
Operative System:
All
Regression:
Yes

Description

When pasting (or typing) a mutiline text string into the editbox, after sending the text, the text insertion cursor moves several pixels to the left, and then when typing into the textbox, the following exception is caused:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Void ThrowArgumentOutOfRangeException(System.ExceptionArgument, System.ExceptionResource)

   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at AdiIRC.GUI.Controls.EditControl.set_SelectedText(String value)
   at AdiIRC.GUI.Controls.EditControl.OnKeyPress(KeyPressEventArgs e)
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Control.WmKeyChar(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at AdiIRC.GUI.Controls.EditControl.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

You can avoid the issue occurring by immediately clicking into the editbox area after sending, which moves the text insertion cursor several pixels to the right, and typing will then not result in an exception.
See this APNG animation below - observe the text insertion cursor in the editbox before pasting, after, and when clicking back into the editbox:

(See Notes below for more observations.)

Repro

  1. Open AdiIRC
  2. Dismiss Quick Connection window
  3. Copy the following to your clipboard:
    /echo -ag test
    /echo -ag test
  4. Select the status window editbox if not already in focus, and press Ctrl-V or right-click and choose Paste
  5. After the text appears in the editbox, press Enter or right-click and choose Submit
  6. Immediately press any key into the editbox, you should get the exception above

Notes

  • You can paste/send another multiline string, but only one line will be sent and it will not appear in the editbox.
  • Recovery is possible without re-opening the window. Once the editbox is broken and Continue is pressed at the exception dialog, if you paste more text into the editbox, and then resize the window, the editbox will fix itself until the next mutiline attempt.
  • If you write multiline text using alt-enter, the same issue occurs.
  • Changing how many lines are showing in the editbox in Options doesn't workaround the issue.

Screenshot

Show repro after pasting and then typing


Files

vmconnect_2026-04-27_23-37-06.png (92.6 KB) vmconnect_2026-04-27_23-37-06.png Show repro after pasting and then typing Jonathan Kay, 04/28/2026 05:37 AM
ezgif.com-apng-maker.png (52.5 KB) ezgif.com-apng-maker.png Jonathan Kay, 04/28/2026 06:36 AM

No data to display

Actions

Also available in: PDF Atom