Abdelrhman-AK / WinPaletter

Advanced Windows Appearance Editor
Other
1.38k stars 58 forks source link

❌ There is a System.ArgumentException error #224

Closed MorganNilsson-Upwork closed 8 months ago

MorganNilsson-Upwork commented 8 months ago

I was messing about and tried different themes found in Store. After trying the Windows 98 I went back to the AMOLED theme, and I got this error. I've tried running "sfc /scannow" and Dism. But I can't seem to get it to work again. I cannot do anything, and no theme works, I just get this error.

//General information
//...........................................................
   Report.Date = "14 March 2024 11:26:26";
   OS = "Windows 11, 10.0.22631.3296, 64-bit";
   WinPaletter.Version = "1.0.8.7, Beta, Build: Release";
   WinPaletter.Language = "English";
   WinPaletter.Debugging = false;

//Error details
//...........................................................
   Exception.message = "Font 'Segoe UI Black' cannot be found.";
   Exception.type = "System.ArgumentException";
   Exception.stack.trace =
   {
      at System.Drawing.FontFamily.CreateFontFamily(String name, FontCollection fontCollection)
      at System.Drawing.FontFamily..ctor(String name)
      at WinPaletter.Paths.Help(Rectangle Rectangle, ArrowStyle Style, Single Scale)
      at WinPaletter.Paths.Draw(CursorOptions CursorOptions)
      at WinPaletter.UI.Controllers.CursorControl.OnPaint(PaintEventArgs e)
      at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
      at System.Windows.Forms.Control.OnPrint(PaintEventArgs e)
      at System.Windows.Forms.Control.WmPrintClient(Message& m)
      at System.Windows.Forms.Control.WndProc(Message& m)
      at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
      at System.Windows.Forms.ContainerControl.WndProc(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
      at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   };
   Exception.target.void_function = "System.Drawing.CreateFontFamily()";
   Exception.assembly = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
   Exception.assembly.file = "C:\\Windows\\Microsoft.Net\\assembly\\GAC_MSIL\\System.Drawing\\v4.0_4.0.0.0__b03f5f7f11d50a3a\\System.Drawing.dll";
   Exception.HRESULT = -2147024809;
   Win32.exception.message = "Invalid window reference (handle)";
   Exception.type = "System.ComponentModel.Win32Exception";
   Win32.exception.Marshal.GetLastWin32Error = 1400;
   Win32.exception.HRESULT = -2147467259;
MorganNilsson-Upwork commented 8 months ago

Edit. I'm too dumb.. The solution (if I had the ability to read...) was to reinstall the font from here: https://www.dafontfree.net/segoe-ui-black-regular-font/f63033.htm

And everything is back to normal!

Abdelrhman-AK commented 8 months ago

This font should have been installed by default in Windows 11, but it was deflected in the Windows 98 theme and so WinPaletter was deceived. I'll fix this scenario.