Bug #70140 Reentrant call exception in Workbench when inserting new row
Submitted: 23 Aug 2013 17:55 Modified: 6 Nov 2013 0:18
Reporter: Ed Segall Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:6.0.6 CE OS:Windows (Windows 7 Ultimate 64-bit)
Assigned to: CPU Architecture:Any

[23 Aug 2013 17:55] Ed Segall
MySQL Workbench Unexpected Error dialog box ("MySQL Workbench has encountered a problem") popped up. 

Message: "Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function."

After I closed this box, a second dialog box popped up. It said the same things as the first one. 

After I closed the second box, a third one popped up. It said "Operation is not valid because it results in a reentrant call to the BeginEdit function."

After I closed the third box, the Workbench seemed normal. However, when I tried clicking on the "Insert new row" button, the same series of three dialog boxes popped up. 

How I reached this point:
- Selected a table in the Catalog tab of the Catalog Tree pane. 

- Selected "Edit Table..." from the context menu.

- Clicked "Insert new row" button on Inserts tab of table editor. 

How to repeat:
Start Workbench. 

Click New Model (circled "+") symbol. 

Double-click New Diagram. 

Click Place a New Table icon.

Click on diagram field to place table. 

Use context menu to edit table. 

On Columns tab, click twice under Column Name to add one new column. Leave default name and type.

Click "Inserts" tab. 

Click "Insert new row" button. 

Click on diagram field. Row will show a NULL value in the (only) column. 

Click "Insert new row" again. First error popup will appear. Close it; second appears. Close again, third appears.
[24 Aug 2013 19:21] MySQL Verification Team
Thank you for the bug report.

Exception = System.InvalidOperationException
Message = Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function.
FullText = System.InvalidOperationException: Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function.
   at System.Windows.Forms.DataGridView.SetCurrentCellAddressCore(Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick)
   at System.Windows.Forms.DataGridView.set_CurrentCell(DataGridViewCell value)
   at System.Windows.Forms.DataGridView.OnClearingColumns()
   at System.Windows.Forms.DataGridViewColumnCollection.Clear()
   at MySQL.Controls.GridView.ProcessModelChange()
   at MySQL.Grt.Db.RecordsetView.ProcessModelChange()
   at MySQL.Grt.RunWrappedDelegate0<int\,int\,MySQL::Grt::DelegateSlot0<int\,int>::ManagedDelegate>.native_callback()
   at boost.detail.function.function_invoker0<int (__cdecl*)(void),int>.invoke(function_buffer* function_ptr)
   at MySQL.Grt.ListModel.refresh()
   at MySQL.GUI.Workbench.Plugins.DbMysqlTableEditor.insertsTabPage_Enter(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnEnter(EventArgs e)
   at System.Windows.Forms.TabPage.OnEnter(EventArgs e)
   at System.Windows.Forms.TabPage.FireEnter(EventArgs e)
   at System.Windows.Forms.TabControl.OnEnter(EventArgs e)
   at MySQL.Controls.FlatTabControl.OnEnter(EventArgs e)
   at System.Windows.Forms.Control.NotifyEnter()
   at System.Windows.Forms.ContainerControl.UpdateFocusedControl()
[30 Oct 2013 20:22] Armando Lopez Valencia
Posted by developer:
Verified in:
Windows 7x64
Ubuntu 12.04x64
MySQL Server 5.6
No error displayed after following the steps provided.
[6 Nov 2013 0:18] Philip Olson
Fixed as of MySQL Workbench 6.0.8, and here's the changelog entry:

After selecting a table in the "Catalog" tab of the "Catalog Tree" pane,
choosing "Insert new row" from the "Edit Table..." context menu would emit
an unexpected error.

Thank you for the bug report.