NohBoard icon indicating copy to clipboard operation
NohBoard copied to clipboard

[WINE] Crash on opening Edit Keyboard or Element Style

Open polyzium opened this issue 7 years ago • 3 comments

As the title says. Using Wine 1.8.4 (32bit prefix) on Arch Linux x86_64. Here's what Wine throws into a terminal when crashed:

System.ArgumentException: The requested FontFamily could not be found [GDI+ status: FontFamilyNotFound]
  at System.Drawing.GDIPlus.CheckStatus (Status status) <0x1d16108 + 0x007ef> in <filename unknown>:0 
  at System.Drawing.FontFamily..ctor (System.String name, System.Drawing.Text.FontCollection fontCollection) <0x1d2c4c8 + 0x00067> in <filename unknown>:0 
  at System.Drawing.FontFamily..ctor (System.String name) <0x1d2c498 + 0x0001f> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Drawing.FontFamily:.ctor (string)
  at ThoNohT.NohBoard.Extra.SerializableFont.op_Implicit (ThoNohT.NohBoard.Extra.SerializableFont src) <0x71bf780 + 0x00033> in <filename unknown>:0 
  at ThoNohT.NohBoard.Controls.KeySubStylePanel.set_SubStyle (ThoNohT.NohBoard.Keyboard.Styles.KeySubStyle value) <0x728d9a8 + 0x000f3> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) ThoNohT.NohBoard.Controls.KeySubStylePanel:set_SubStyle (ThoNohT.NohBoard.Keyboard.Styles.KeySubStyle)
  at ThoNohT.NohBoard.Forms.KeyStyleForm.InitializeComponent () <0x727e288 + 0x009c7> in <filename unknown>:0 
  at ThoNohT.NohBoard.Forms.KeyStyleForm..ctor (ThoNohT.NohBoard.Keyboard.Styles.KeyStyle initialStyle, ThoNohT.NohBoard.Keyboard.Styles.KeyStyle defaultStyle) <0x727df08 + 0x001bf> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) ThoNohT.NohBoard.Forms.KeyStyleForm:.ctor (ThoNohT.NohBoard.Keyboard.Styles.KeyStyle,ThoNohT.NohBoard.Keyboard.Styles.KeyStyle)
  at ThoNohT.NohBoard.Forms.MainForm.mnuEditElementStyle_Click (System.Object sender, System.EventArgs e) <0x727db28 + 0x0011b> in <filename unknown>:0 
  at System.Windows.Forms.ToolStripItem.OnClick (System.EventArgs e) <0x7240590 + 0x00056> in <filename unknown>:0 
  at System.Windows.Forms.ToolStripMenuItem.OnClick (System.EventArgs e) <0x723ff90 + 0x00287> in <filename unknown>:0 
  at System.Windows.Forms.ToolStripMenuItem.HandleClick (Int32 mouse_clicks, System.EventArgs e) <0x723ff48 + 0x0001b> in <filename unknown>:0 
  at System.Windows.Forms.ToolStripItem.FireEvent (System.EventArgs e, ToolStripItemEventType met) <0x722d868 + 0x000b5> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.ToolStripItem:FireEvent (System.EventArgs,System.Windows.Forms.ToolStripItemEventType)
  at System.Windows.Forms.ToolStrip.OnMouseUp (System.Windows.Forms.MouseEventArgs mea) <0x723fce0 + 0x00167> in <filename unknown>:0 
  at System.Windows.Forms.ToolStripDropDown.OnMouseUp (System.Windows.Forms.MouseEventArgs mea) <0x723fcb8 + 0x00017> in <filename unknown>:0 
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) <0x723fb48 + 0x00124> in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) <0x1d1e950 + 0x001c3> in <filename unknown>:0 
  at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) <0x1d82800 + 0x00017> in <filename unknown>:0 
  at System.Windows.Forms.ToolStrip.WndProc (System.Windows.Forms.Message& m) <0x72261d8 + 0x00017> in <filename unknown>:0 
  at System.Windows.Forms.ToolStripDropDown.WndProc (System.Windows.Forms.Message& m) <0x7226188 + 0x0003f> in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x1d1e930 + 0x0001d> in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x1d1e900 + 0x0002b> in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x1d1d000 + 0x0037f> in <filename unknown>:0 

However I couldn't find any info what font it requires.

polyzium avatar Apr 02 '17 17:04 polyzium

On an off note: I'm wondering if you're going to have much luck using this on linux. As I've heard several reports of people trying, and Wine doesn't seem to use a global hook, meaning it won't recognize keypresses if it's not the active window. But please tell me if you have better luck, that would be amazing.

As for your problem, the font name is in the style file you currently loaded. I plan to create some better font handling, reverting to some default font if the current one isn't existing. But if you're not using a special keyboard created by someone else, it should already be a pretty generic font.

The default style in NohBoard/keyboards/global/default.style is set as follows: "FontFamily": "Courier New",

This seems strange though, apparently NohBoard is able to render text in this font, but trying to display it on a label in a dialog window, it crashes.

ThoNohT avatar Apr 03 '17 07:04 ThoNohT

I've not tested it fully under Wine yet, i will when i come home

polyzium avatar Apr 03 '17 08:04 polyzium

Nope it doesn't track keys over a Linux desktop

polyzium avatar Apr 03 '17 13:04 polyzium