Bug #78049 "Replace All" throws an exception in MySQL Workbench every second time
Submitted: 13 Aug 2015 7:04 Modified: 23 Jun 2016 13:56
Reporter: Roman Illin Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:6.3.3.0 Build 592 OS:Windows
Assigned to: CPU Architecture:Any
Tags: REPLACE, workbench

[13 Aug 2015 7:04] Roman Illin
Description:
I need to execute certain set of queries for a lot of primary keys. I use "Replace All" to update these primary keys. I do not close "Find and replace" panel each time. First replacements(around 15) are ok, but then each second replace throws the following exception, though replacement is done as well:

09:01:57 [ERR][      Workbench]: Der Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
Parametername: index
Exception = System.ArgumentOutOfRangeException
Message = Der Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
Parametername: index
FullText = System.ArgumentOutOfRangeException: Der Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
Parametername: index
   bei System.Collections.ArrayList.get_Item(Int32 index)
   bei System.Windows.Forms.ToolStripItemCollection.get_Item(Int32 index)
   bei MySQL.Utilities.FindPanel.AddRecentSearchItem()
   bei MySQL.Utilities.FindPanel.button_Click(Object sender, EventArgs e)
   bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
   bei System.Windows.Forms.Button.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

How to repeat:
Create some query.
Open Find and Replace Window.
Replace anything couple of times and execute query.
After around 15 replacements this bug starts to occur.
[13 Aug 2015 12:16] MySQL Verification Team
Please try version 6.3.4. Thanks.
[14 Sep 2015 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[6 Apr 2016 14:34] Ronald Vallenduuk
I have a very similar issue. Every now and then, after a long time using workbench, using Find throws an error. After the error Find no longer works and I need to restart.
Stack trace:
Exception = System.ArgumentOutOfRangeException
Message = Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
FullText = System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.ArrayList.get_Item(Int32 index)
   at System.Windows.Forms.ToolStripItemCollection.get_Item(Int32 index)
   at MySQL.Utilities.FindPanel.AddRecentSearchItem()
   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 System.Windows.Forms.TextBox.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I'm using workbench 6.3.5 build 201 CE (64 bits).
[23 Jun 2016 13:56] MySQL Verification Team
I couldn't repeat with version 6.3.7.