Bug #97444 Closing query tab while query runs in other tab may trigger index out of range
Submitted: 31 Oct 2019 11:38 Modified: 31 Oct 2019 12:15
Reporter: Fredric Johansson Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.17, 8.0.18, 8.0.23, 8.0.28, 8.0.29 OS:Any
Assigned to: CPU Architecture:Any

[31 Oct 2019 11:38] Fredric Johansson
Description:
If you have query running in a query tab and close a a query tab to the left of it Workbench will encounter an Index out of range when trying to update the busy symbol for the tab:

Info from the log:
12:16:42 [ERR][      Workbench]: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
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.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at MySQL.Controls.FlatTabControl.SetBusy(Int32 index, Boolean busy)
   at MySQL.GUI.Workbench.SqlIdeForm.SetBusyTab(Int32 tab)
   at boost.detail.function.void_function_invoker1<void (__cdecl*)(int const &),void,int const &>.invoke(function_buffer* function_ptr, Int32* a0)
   at boost.function1<void,int const &>.()(function1<void\,int const \&>* , Int32* a0)
   at wb.WBContext.flush_idle_tasks(WBContext* , Boolean )
   at MySQL.Workbench.WbContext.flush_idle_tasks(Boolean force)
   at MySQL.GUI.Workbench.Program.timer_Tick(Object sender, EventArgs e)

How to repeat:
1. Open a number of query tabs
2. Start a query in the rightmost tab
3. While the query is still running close one or more tabs to the left
[31 Oct 2019 12:15] MySQL Verification Team
Hello Fredric Johansson,

Thank you for the report.
Observed this with WB 8.0.18.

regards,
Umesh
[29 Nov 2019 7:30] MySQL Verification Team
Bug #97752 marked as duplicate of this one.
[9 Apr 2020 12:36] MySQL Verification Team
Bug #99218 marked as duplicate of this one
[1 Sep 2020 23:48] Samuel Tobung
Is there a way this issue can be fixed?
[29 Apr 2021 12:00] MySQL Verification Team
Bug #103518 marked as duplicate of this one
[30 May 2021 14:49] Niromy Niro
To avoid this bug, Close the tabs from the right to left.
[19 Jul 2021 12:36] MySQL Verification Team
Bug #104347 marked as duplicate of this one.
[5 Aug 2021 12:32] MySQL Verification Team
Bug #104543 marked as duplicate of this one.
[17 Aug 2021 15:10] Dharam Gusai
What is the solution ??
[7 Dec 2021 13:28] MySQL Verification Team
Bug #105821 marked as duplicate of this one.
[25 Feb 2022 12:08] MySQL Verification Team
Bug #106573 marked as duplicate of this one.
[25 Apr 2022 12:58] MySQL Verification Team
Bug #107118 marked as duplicate of this one.
[5 Sep 2022 12:00] MySQL Verification Team
Bug #108377 marked as duplicate of this one.
[12 Sep 2022 12:39] MySQL Verification Team
Bug #108463 marked as duplicate of this one.
[26 Sep 2022 10:30] MySQL Verification Team
Bug #108602 marked as duplicate of this one.
[16 Mar 2023 13:09] MySQL Verification Team
Bug #110393 marked as duplicate of this one
[2 Jun 2023 17:22] Matthew Roberts
Same issue on 8.0.33.. I note this was submitted 2019, could we look at a resolution?
[14 Aug 2023 12:32] MySQL Verification Team
Bug #112050 marked as duplicate of this one
[30 Jan 2:17] Nicholas Fergis
OK so, same thing happended to me. but now, i cannot run any queries. and there are several tabs i cannot close. how do i over this issue so i can work?
[2 Apr 8:54] Jay Mehta
This bug is still present