Bug #102465 Empty view and crash when opening Client Connections in 8.0.23 (regression)
Submitted: 3 Feb 2021 9:16 Modified: 8 Feb 2021 8:01
Reporter: Mauro Molinari Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S2 (Serious)
Version:8.0.23, 8.0.27, 8.0.29, 8.0.30 OS:Ubuntu (Kubuntu 20.04)
Assigned to: CPU Architecture:x86 (Intel Core i5 Haswell)
Tags: admin, Client Connections, columnLabel, crash, exception

[3 Feb 2021 9:16] Mauro Molinari
Description:
In 8.0.23 whenever I open the Client Connections view I get an empty grey view, with just the buttons and controls below the area where the list of client connections (processlist) should be shown. In the console I get:

Traceback (most recent call last):
  File "/usr/lib/mysql-workbench/modules/wb_admin_utils.py", line 327, in page_activated
    self.set_body_contents(self.create_ui())
  File "/usr/lib/mysql-workbench/modules/wb_admin_connections.py", line 572, in create_ui
    self.refresh()
  File "/usr/lib/mysql-workbench/modules/wb_admin_connections.py", line 1054, in refresh
    query_result = self.get_process_list()
  File "/usr/lib/mysql-workbench/modules/wb_admin_connections.py", line 844, in get_process_list
    return self.get_process_list_old()
  File "/usr/lib/mysql-workbench/modules/wb_admin_connections.py", line 886, in get_process_list_old
    value = result.stringByName(field)
  File "/usr/share/mysql-workbench/libraries/workbench/db_utils.py", line 213, in stringByName
    return modules.DbMySQLQuery.resultFieldStringValueByName(self.result, name)
SystemError: DbMySQLQuery.resultFieldStringValueByName(): MySQL_ResultSet::isNull: invalid value of 'columnLabel'

In the log I just see:
09:39:55 [ERR][wb_admin_utils.py:page_activated:333]: Exception activating the page - DbMySQLQuery.resultFieldStringValueByName(): MySQL_ResultSet::isNull: invalid value of 'columnLabel'

Then, if I hit on "Refresh", MySQL Workbench crashes. In the console I see:

(mysql-workbench-bin:38442): glibmm-ERROR **: 09:37:36.864: 
unhandled exception (type std::exception) in signal handler:
what: basic_string::_M_construct null not valid

Downgrading to MySQL Workbench 8.0.22 fixes the problem.

I'm using MySQL Server 5.5. I know it's currently not fully supported, but I hoped the problem were a more general one not bound to the server version.

How to repeat:
Open a database connection.
Open Server | Client Connections
See the missing processlist table.
Click on "Refreh" on the bottom of the view.
[3 Feb 2021 18:12] Jason Brunette
See Bug 102337 and Bug 102315.

The issue is that Workbench 8.0.23's "Client Connections" feature only works if the Performance Schema is enabled, because Workbench 8.0.23 now always queries against the performance_schema, even if it isn't enabled.

Fix: Workbench needs to fallback to using the "SHOW FULL PROCESSLIST;" query if the Performance Schema is not enabled.
[4 Feb 2021 12:38] MySQL Verification Team
Hello Mauro Molinari,

Thank you for the bug report.
I tried to reproduce your issue on Ubuntu 20.04 with workbench 8.0.23 but I am not seeing any issues at my end. 

Regards,
Ashwini Patil
[4 Feb 2021 13:11] Mauro Molinari
Hi Ashwini,
have you read Jason's comment here and on bug 102337?
Did you try to reproduce with a MySQL server with Performance Schema disabled?
[8 Feb 2021 8:01] MySQL Verification Team
Hello Mauro Molinari,

Thank you for the valuable feedback.
Verified as described after disabling Performance Schema on windows. Thank you!

Regards,
Ashwini Patil
[8 Feb 2021 10:52] MySQL Verification Team
Bug #102337 marked as duplicate of this one.
[3 May 2021 12:03] Remko de Keijzer
Issue still exists in 8.0.24 on Ubuntu 20.04 x86_64
[16 Dec 2021 11:20] Harrinson Mosquera
Hello,

Is there any other workaround for avoiding this problem?

I can't disable Performance Schema on my schemas.

Thanks a lot!
[19 Jan 2022 12:21] MySQL Verification Team
Bug #106211 marked as duplicate of this one.
[3 Feb 2022 16:10] Adam Latchem
Using MySQL Workbench 8.0.28 I was able to fix this by changing line modules\wb_admin_connections.py:346 from:

                            ("DB", mforms.StringColumnType, "DB", 100),

to

                            ("db", mforms.StringColumnType, "DB", 100),
[4 Feb 2022 6:15] Dmitry Kochin
I confirm than Adam Latchem's fix resolves the issue. Thank you very much
[27 Feb 2022 21:03] Brjánn Ljótsson
This bug seems to prevent me from editing MySQL users and I had to downgrade to 8.0.22. Any idea when it will be fixed?
[12 Apr 2022 1:11] David Bigham
I can also confirm that Adam Latchem's fix resolves the Client Connection issue, but does not fix the editing of Users and Privileges issue mentioned by Brjánn Ljótsson.
[23 May 2022 12:51] MySQL Verification Team
Bug #107357 marked as duplicate of this one.
[3 Jun 2022 18:39] Brjánn Ljótsson
After upgrading my MacOS to the latest version, MySQL Workbench 8.0.22 crashes. So I had to install 8.0.29 and now I can't create new MySQL users anymore. Any idea when this will be fixed?
[3 Jun 2022 18:42] Brjánn Ljótsson
I can't even edit users...
[29 Jul 2022 9:48] Jaime Alarcón
Hi, 

Reproduced also in Version 8.0.30, without performance schema enabled (performance_schema	OFF):

Mysql workbench log:
11:36:50 [INF][      WBContext]: System info:
 	MySQL Workbench Community (GPL) for Windows version 8.0.30 CE build 2054668 (64 bit)
	Configuration Directory: C:\Users\jmlr002\AppData\Roaming\MySQL\Workbench
	Data Directory: C:\Program Files\MySQL\MySQL Workbench 8.0 CE
	Cairo Version: 1.17.4
	OS: Microsoft Windows 10 Enterprise
	...
	Installed display drivers: igdumdim64.dll,igd10iumd64.dll,igd10iumd64.dll,igd12umd64.dll

11:36:50 [INF][      Workbench]: UI is up
11:36:50 [INF][      Workbench]: Running the application
11:37:01 [INF][SQL Editor Form]: Opened connection 'test' to Source distribution version 5.7.33-log
11:37:04 [INF][        WQE.net]: Launching SQL IDE
11:37:09 [INF][        WQE.net]: SQL IDE UI is ready
11:37:17 [ERR][wb_admin_utils.py:page_activated:352]: Exception activating the page - DbMySQLQuery.resultFieldStringValueByName(): MySQL_ResultSet::isNull: invalid value of 'columnLabel'Exception activating the page - DbMySQLQuery.resultFieldStringValueByName(): MySQL_ResultSet::isNull: invalid value of 'columnLabel'Unhandled exception in Python code: 
11:38:34 [ERR][         python]: Error forwarding notification to Python
Traceback:
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\workbench\notifications.py", line 35, in _the_observer
            for obs, nam, obj in self.observers:
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\Python\Lib\traceback.py", line 121, in format_exception
            type(value), value, tb, limit=limit).format(chain=chain))
  File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\Python\Lib\traceback.py", line 476, in __init__
            if (exc_value and exc_value.__cause__ is not None
NameError: 'str' object has no attribute '__cause__'
11:43:47 [ERR][wb_admin_utils.py:page_activated:352]: Exception activating the page - DbMySQLQuery.resultFieldStringValueByName(): MySQL_ResultSet::isNull: invalid value of 'columnLabel'Exception activating the page - DbMySQLQuery.resultFieldStringValueByName(): MySQL_ResultSet::isNull: invalid value of 'columnLabel'Unhandled exception in Python code:
[1 Sep 2022 15:28] Brjánn Ljótsson
This bug also seems to prevent me from exporting some databases. In the "Data Export" view, some databases are listed as having zero (0) tables. If I click export anyway, I get the following error

Error Fetching Table List From [DATABASE-NAME] (DbMySQLQuery.resultFieldStringValueByName(): MySQL_ResultSet::isNull: invalid value of 'columnLabel')
[1 Sep 2022 16:35] Adam Latchem
submitted pull request for my fix to the original issue on this ticket
https://github.com/mysql/mysql-workbench/pull/33
[15 Sep 2022 4:52] MySQL Verification Team
Bug #108486 marked as duplicate of this one
[22 Sep 2022 9:04] JL B. Schneider-Electric
Workbench 8.0.30 under W10-64.
I am unable to view client connections, I get an unhandled exception.
[2 Nov 2022 15:41] OCA Admin
Contribution submitted via Github - Bugfix #102465 
(*) Contribution by Alan Farquharson (Github Farkie, mysql-workbench/pull/35#issuecomment-1300633751): I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: git_patch_1108251146.txt (text/plain), 1.29 KiB.

[15 Jul 14:14] Sander Bouwhuis
The bug is STILL there!
Unfortunately for me, changing the "DB" to "db" doesn't fix it for me.
How can such a long-standing bug STILL not be fixed?