Bug #103435 Crash when attempt to open routine
Submitted: 23 Apr 2021 2:23 Modified: 23 May 2021 6:05
Reporter: Samuel George Greenberger Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:8.0 OS:Windows
Assigned to: CPU Architecture:x86
Tags: crash

[23 Apr 2021 2:23] Samuel George Greenberger
Description:
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at MySQLRoutineEditorBE.{ctor}(MySQLRoutineEditorBE* , Ref<db_mysql_Routine>* )
   at MySQL.Grt.Db.MySQLRoutineEditorWrapper..ctor(GrtValue arglist)
   at MySQL.GUI.Workbench.Plugins.DbMysqlRoutineEditor.ReinitWithArguments(GrtValue value)
   at MySQL.GUI.Workbench.Plugins.DbMysqlRoutineEditor..ctor(GrtManager manager, GrtValue value)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at MySQL.GUI.Workbench.MainForm.OpenPlugin(GrtManager GrtManager, GrtModule GrtModule, String AssemblyName, String ClassName, GrtValue GrtList, GUIPluginFlags flags)
   at MySQL.Workbench.WbFrontendCallbacks.open_editor_wrapper(Module* module, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* str2, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* str3, BaseListRef* grt_list, GUIPluginFlags flags)
   at std._Func_impl_no_alloc<unsigned __int64 (__cdecl*)(grt::Module *,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,grt::BaseListRef const &,enum bec::GUIPluginFlags),unsigned __int64,grt::Module *,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,grt::BaseListRef,enum bec::GUIPluginFlags>._Do_call(_Func_impl_no_alloc<unsigned __int64 (__cdecl\*)(grt::Module \*\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> > const \&\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> > const \&\,grt::BaseListRef const \&\,enum bec::GUIPluginFlags)\,unsigned __int64\,grt::Module \*\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> >\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> >\,grt::BaseListRef\,enum bec::GUIPluginFlags>* , Module** <_Args_0>, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* <_Args_1>, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* <_Args_2>, BaseListRef* <_Args_3>, GUIPluginFlags* <_Args_4>)
   at MySQL.Grt.ListModelWrapper.activate_node(NodeIdWrapper node)
   at MySQL.GUI.Workbench.ModelOverviewForm.listViewDoubleClick(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnDoubleClick(EventArgs e)
   at System.Windows.Forms.ListView.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr 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 MySQL.GUI.Workbench.Program.Main(String[] Args)

C:\Program Files\MySQL\MySQL Workbench 8.0>MySQLWorkbench.exe -log-level=debug

C:\Program Files\MySQL\MySQL Workbench 8.0>
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at MySQLRoutineEditorBE.{ctor}(MySQLRoutineEditorBE* , Ref<db_mysql_Routine>* )
   at MySQL.Grt.Db.MySQLRoutineEditorWrapper..ctor(GrtValue arglist)
   at MySQL.GUI.Workbench.Plugins.DbMysqlRoutineEditor.ReinitWithArguments(GrtValue value)
   at MySQL.GUI.Workbench.Plugins.DbMysqlRoutineEditor..ctor(GrtManager manager, GrtValue value)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at MySQL.GUI.Workbench.MainForm.OpenPlugin(GrtManager GrtManager, GrtModule GrtModule, String AssemblyName, String ClassName, GrtValue GrtList, GUIPluginFlags flags)
   at MySQL.Workbench.WbFrontendCallbacks.open_editor_wrapper(Module* module, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* str2, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* str3, BaseListRef* grt_list, GUIPluginFlags flags)
   at std._Func_impl_no_alloc<unsigned __int64 (__cdecl*)(grt::Module *,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,grt::BaseListRef const &,enum bec::GUIPluginFlags),unsigned __int64,grt::Module *,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,grt::BaseListRef,enum bec::GUIPluginFlags>._Do_call(_Func_impl_no_alloc<unsigned __int64 (__cdecl\*)(grt::Module \*\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> > const \&\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> > const \&\,grt::BaseListRef const \&\,enum bec::GUIPluginFlags)\,unsigned __int64\,grt::Module \*\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> >\,std::basic_string<char\,std::char_traits<char>\,std::allocator<char> >\,grt::BaseListRef\,enum bec::GUIPluginFlags>* , Module** <_Args_0>, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* <_Args_1>, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* <_Args_2>, BaseListRef* <_Args_3>, GUIPluginFlags* <_Args_4>)
   at MySQL.Grt.ListModelWrapper.activate_node(NodeIdWrapper node)
   at MySQL.GUI.Workbench.ModelOverviewForm.listViewDoubleClick(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnDoubleClick(EventArgs e)
   at System.Windows.Forms.ListView.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr 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 MySQL.GUI.Workbench.Program.Main(String[] Args)

How to repeat:
Open the wmb file and select routine
[23 Apr 2021 6:05] MySQL Verification Team
Hello Samuel,

Thank you for the report and feedback.
I tried on WB 8.0.24 with a dummy model file but not seeing any issues. Do you mind sharing the .wmb file which is causing problem at your end? Please mark it as private after posting here. Thank you.

regards,
Umesh
[24 May 2021 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".