Bug #101772 unexpected exception has been raised by one of the MYSQL workbench modules.
Submitted: 26 Nov 2020 15:42 Modified: 26 Nov 2020 17:10
Reporter: maheen s Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.22 OS:Windows
Assigned to: CPU Architecture:Any

[26 Nov 2020 15:42] maheen s
Description:
we are sorry for the inconvenience but an unexpected exception has been raised by one of the MYSQL workbench modules.in order to fix this issue we would kindly ask you to file a bug report. you can do that by pressing the [report Bug]button below.

please make sure to include a detailed description of your actions that lead to this problem.
thanks a lot for taking the time to help us improve MYSQL workbench!

The MYSQL workbench team.Exception = System.TypeInitializationException
Message = The type initializer for 'HtmlRenderer.Utils.FontsUtils' threw an exception.
FullText = System.TypeInitializationException: The type initializer for 'HtmlRenderer.Utils.FontsUtils' threw an exception. ---> System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at HtmlRenderer.Utils.FontsUtils..cctor()
   --- End of inner exception stack trace ---
   at HtmlRenderer.Utils.FontsUtils.IsFontExists(String family)
   at HtmlRenderer.Parse.CssParser.ParseFontFamilyProperty(String propValue)
   at HtmlRenderer.Parse.CssParser.AddProperty(String propName, String propValue, Dictionary`2 properties)
   at HtmlRenderer.Parse.CssParser.ParseCssBlockProperties(String blockSource)
   at HtmlRenderer.Parse.CssParser.ParseCssBlockImp(String className, String blockSource)
   at HtmlRenderer.Parse.DomParser.CascadeStyles(CssBox box, HtmlContainer htmlContainer, CssData& cssData, Boolean& cssDataChanged)
   at HtmlRenderer.Parse.DomParser.CascadeStyles(CssBox box, HtmlContainer htmlContainer, CssData& cssData, Boolean& cssDataChanged)
   at HtmlRenderer.Parse.DomParser.CascadeStyles(CssBox box, HtmlContainer htmlContainer, CssData& cssData, Boolean& cssDataChanged)
   at HtmlRenderer.Parse.DomParser.GenerateCssTree(String html, HtmlContainer htmlContainer, CssData& cssData)
   at HtmlRenderer.HtmlContainer.SetHtml(String htmlSource, CssData baseCssData)
   at HtmlRenderer.HtmlPanel.set_Text(String value)
   at mforms.MenuItem.callback(MenuItem* )
   at MenuItemEventTarget.MenuItemClick(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Exception = System.TypeInitializationException
Message = The type initializer for 'HtmlRenderer.Utils.FontsUtils' threw an exception.
FullText = System.TypeInitializationException: The type initializer for 'HtmlRenderer.Utils.FontsUtils' threw an exception. ---> System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at HtmlRenderer.Utils.FontsUtils..cctor()
   --- End of inner exception stack trace ---
   at HtmlRenderer.Utils.FontsUtils.IsFontExists(String family)
   at HtmlRenderer.Parse.CssParser.ParseFontFamilyProperty(String propValue)
   at HtmlRenderer.Parse.CssParser.AddProperty(String propName, String propValue, Dictionary`2 properties)
   at HtmlRenderer.Parse.CssParser.ParseCssBlockProperties(String blockSource)
   at HtmlRenderer.Parse.CssParser.ParseCssBlockImp(String className, String blockSource)
   at HtmlRenderer.Parse.DomParser.CascadeStyles(CssBox box, HtmlContainer htmlContainer, CssData& cssData, Boolean& cssDataChanged)
   at HtmlRenderer.Parse.DomParser.CascadeStyles(CssBox box, HtmlContainer htmlContainer, CssData& cssData, Boolean& cssDataChanged)
   at HtmlRenderer.Parse.DomParser.CascadeStyles(CssBox box, HtmlContainer htmlContainer, CssData& cssData, Boolean& cssDataChanged)
   at HtmlRenderer.Parse.DomParser.GenerateCssTree(String html, HtmlContainer htmlContainer, CssData& cssData)
   at HtmlRenderer.HtmlContainer.SetHtml(String htmlSource, CssData baseCssData)
   at HtmlRenderer.HtmlPanel.set_Text(String value)
   at mforms.MenuItem.callback(MenuItem* )
   at MenuItemEventTarget.MenuItemClick(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

How to repeat:
I was trying to open MYSQL connection , but I couldn't open it , it is throwing an error.

Suggested fix:
Please help to fix this bug
[26 Nov 2020 17:10] MySQL Verification Team
Thank you for the bug report. Duplicate of https://bugs.mysql.com/bug.php?id=99627, try the solution commented there.