Bug #77906 Closing all tabs (with Control+W) in an open connection causes NPE
Submitted: 31 Jul 2015 17:56 Modified: 16 Oct 2015 19:18
Reporter: Sarah Whelan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:6.3.4.0 Build 828 (32bit) OS:Windows (8.1 64 bit)
Assigned to: CPU Architecture:Any
Tags: close, closing, npe, tabs

[31 Jul 2015 17:56] Sarah Whelan
Description:
I have a bunch of tabs open (but this happens regardless of number of starting tabs) I got to close all of them so Control+W to close them. Once I have all of them closed if I hit Control+W again I get an NPE.

How to repeat:
1. Open one or more tabs.
2. Close all of them (with clicking x or Control+W)
3. Hit Control+W again

Suggested fix:
Add a null check on action listener for Control+W action.
[1 Aug 2015 6:08] MySQL Verification Team
Hello Sarah Whelan,

Thank you for the report.
Observed this with WB 6.3.4 on Win7.

Thanks,
Umesh
[1 Aug 2015 6:15] MySQL Verification Team
//
11:37:06 [INF][        WQE.net]: Launching SQL IDE
11:37:07 [INF][        WQE.net]: SQL IDE UI is ready
11:37:30 [ERR][      Workbench]: Value cannot be null.
Parameter name: value
Exception = System.ArgumentNullException
Message = Value cannot be null.
Parameter name: value
FullText = System.ArgumentNullException: Value cannot be null.
Parameter name: value
   at System.Windows.Forms.TabControl.TabPageCollection.IndexOf(TabPage page)
   at MySQL.Controls.FlatTabControl.CloseTabPage(TabPage page)
   at MySQL.GUI.Workbench.MainForm.PerformCommand(String command)
   at boost.detail.function.void_function_invoker1<void (__cdecl*)(std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &),void,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >.invoke(function_buffer* function_ptr, basic_string<char\,std::char_traits<char>\,std::allocator<char> >* a0)
   at mforms.MenuItem.callback(MenuItem* )
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ToolStripManager.ProcessShortcut(Message& m, Keys shortcut)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
[4 Aug 2015 4:21] MySQL Verification Team
Bug #77921 marked as duplicate of this
[10 Sep 2015 7:44] MySQL Verification Team
Bug #78387 marked as duplicate of this
[16 Oct 2015 19:18] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 6.3.5 release, and here's the changelog entry:

Executing Control + W to close all tabs, and then executing it again (with
all tabs already closed), would emit a Null Pointer Exception.

Thank you for the bug report.
[27 Oct 2015 16:38] MySQL Verification Team
Bug #78984 marked as duplicate of this
[18 Dec 2015 17:46] MySQL Verification Team
Bug #79705 marked as duplicate of this
[11 Apr 2016 5:38] MySQL Verification Team
Bug #81018 marked as duplicate of this