Bug #60375 Error on "send SQL to Editor" - Create Statement
Submitted: 7 Mar 2011 14:52 Modified: 15 Mar 2011 15:49
Reporter: Christian Benner Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:5.2.32 Rev. 7496 OS:Windows (Windows 7 64 Bit)
Assigned to: CPU Architecture:Any

[7 Mar 2011 14:52] Christian Benner
Description:
By clicking "send SQL to Editor" via ContextMenu the Workbench is reporting an error.

How to repeat:
Click with right mousebutton on a table. The ContextMenu will be shown.
Choose "Send SQL to Editor" and "Create Statement".
[8 Mar 2011 12:10] Valeriy Kravchuk
What version of server, x.y.z, are you working with?

When you'll see this error again, please, right click somewhere in the error dialog box with no text and use Copy stack trace to clipboard context menu item. Send stack trace to this report.
[8 Mar 2011 12:22] Christian Benner
Server Version is 
Server version:         5.1.54-community-log MySQL Community Server (GPL)

but the same on

Name:    <remotehostname>
Host:    <remotehostname>:3306
Server:  MySQL
Version: 5.5.8-log

Exception = System.ArgumentOutOfRangeException
Message = Der Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
Parametername: startIndex
FullText = System.ArgumentOutOfRangeException: Der Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
Parametername: startIndex
   bei System.String.ToCharArray(Int32 startIndex, Int32 length)
   bei ScintillaNet.Scintilla.ScintillaNet.INativeScintilla.SendMessageDirectWithLength(UInt32 msg, Int32 wParam, String lParam)
   bei ScintillaNet.Scintilla.ScintillaNet.INativeScintilla.AddText(Int32 length, String s)
   bei MySQL.Grt.Db.Sql.SqlEditor.DoInsertText(String text)
   bei MySQL.Grt.RunWrappedDelegate1<int\,int\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> >\,System::String ^\,MySQL::Grt::DelegateSlot1<int\,int\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> >\,System::String ^>::ManagedDelegate>.native_callback(basic_string<char\,std::char_traits<char>\,std::allocator<char> >* a1)
   bei sigc.pointer_functor1<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,int>.()(pointer_functor1<std::basic_string<char\,std::char_traits<char>\,std::allocator<char> > const \&\,int>* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* _A_a1)
   bei sigc.adaptor_functor<sigc::pointer_functor1<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,int> >.operator()<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &>(adaptor_functor<sigc::pointer_functor1<std::basic_string<char\,std::char_traits<char>\,std::allocator<char> > const \&\,int> >* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* _A_arg1)
   bei sigc.internal.slot_call1<sigc::pointer_functor1<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,int>,int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &>.call_it(slot_rep* rep, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* a_1)
   bei MySQL.Grt.ListModel.activate_popup_item_for_nodes(String name, List`1 nodes)
   bei MySQL.GUI.Workbench.ModelOverviewForm.PopupActionHandler(Object sender, EventArgs e)
   bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   bei System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
   bei System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Exception = System.ArgumentOutOfRangeException
Message = Der Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
Parametername: startIndex
FullText = System.ArgumentOutOfRangeException: Der Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
Parametername: startIndex
   bei System.String.ToCharArray(Int32 startIndex, Int32 length)
   bei ScintillaNet.Scintilla.ScintillaNet.INativeScintilla.SendMessageDirectWithLength(UInt32 msg, Int32 wParam, String lParam)
   bei ScintillaNet.Scintilla.ScintillaNet.INativeScintilla.AddText(Int32 length, String s)
   bei MySQL.Grt.Db.Sql.SqlEditor.DoInsertText(String text)
   bei MySQL.Grt.RunWrappedDelegate1<int\,int\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> >\,System::String ^\,MySQL::Grt::DelegateSlot1<int\,int\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> >\,System::String ^>::ManagedDelegate>.native_callback(basic_string<char\,std::char_traits<char>\,std::allocator<char> >* a1)
   bei sigc.pointer_functor1<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,int>.()(pointer_functor1<std::basic_string<char\,std::char_traits<char>\,std::allocator<char> > const \&\,int>* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* _A_a1)
   bei sigc.adaptor_functor<sigc::pointer_functor1<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,int> >.operator()<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &>(adaptor_functor<sigc::pointer_functor1<std::basic_string<char\,std::char_traits<char>\,std::allocator<char> > const \&\,int> >* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* _A_arg1)
   bei sigc.internal.slot_call1<sigc::pointer_functor1<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,int>,int,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &>.call_it(slot_rep* rep, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* a_1)
   bei MySQL.Grt.ListModel.activate_popup_item_for_nodes(String name, List`1 nodes)
   bei MySQL.GUI.Workbench.ModelOverviewForm.PopupActionHandler(Object sender, EventArgs e)
   bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   bei System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
   bei System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
[9 Mar 2011 12:36] MySQL Verification Team
I couldn't repeat on Vista 64-bit.
[9 Mar 2011 12:46] Alfredo Kojima
Can you attach the create statement for the table you get a crash? Does it have comments in German or soemthing?
[9 Mar 2011 14:23] Christian Benner
I've tested out on

Server:  MySQL
Version: 5.5.8-log

In case of german "umlauts" (either on Table or Column comment) the "send SQL to Editor" will crash.

If you alter the table and replace the äöü with "ae" "oe" "ue" (wich are the equivalent therefor) the function works properly.

Hope this will help you to find out whats going wrong there.
Best regards
Chris
[15 Mar 2011 15:49] MySQL Verification Team
I was able to repeat with the test case provided by bug:

http://bugs.mysql.com/bug.php?id=60475

I am marking this bug as duplicate since the above one has a repeatable test case.
Thanks.