Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(developer): exporting CSS from on-screen keyboard causes Developer to crash if Keyman for Windows is not installed #11199

Closed
1 of 8 tasks
alex-larkin opened this issue Apr 10, 2024 · 7 comments · Fixed by #11244
Assignees
Milestone

Comments

@alex-larkin
Copy link

alex-larkin commented Apr 10, 2024

Describe the bug

Hello,

When trying to export the On-Screen keyboard, Keyman Developer crashes. The same happens whether I select "Images and CSS in subdirectory" or "Images and CSS in same directory."

image

Reproduce the bug

After the crash I find an empty folder called "[filename]_xml_files" and a file called [filename].xml. In my case, this is what the file contained:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE visualkeyboard SYSTEM "http://www.tavultesoft.com/keymandev/visualkeyboard.dtd">
<visualkeyboard>
  <header>
    <version>7.0</version>
    <kbdname>teclado_quechua</kbdname>
    <flags><key102/><displayunderlying/><usealtgr/></flags>
    <ansifont><font name="Arial" size="-12"/></ansifont>
    <unicodefont><font name="Arial" size="-12"/></unicodefont>
    <layout></layout>
    <filename>do delete again</filename>  </header>
  <keys>
    <key vkey="K_Q" shift="RA" unicode="1" text="@"/>
    <key vkey="K_RBRKT" shift="RA" unicode="1" text="~"/>
    <key vkey="K_HYPHEN" shift="RA" unicode="1" text="\"/>
    <key vkey="K_BKQUOTE" shift="RA" unicode="1" text="¬"/>
    <key vkey="K_COMMA" shift="RA" unicode="1" text="&lt;"/>
    <key vkey="K_PERIOD" shift="RA" unicode="1" text="&gt;"/>
    <key vkey="K_SLASH" shift="RA" unicode="1" text="ː"/>
    <key vkey="K_oE2" shift="" unicode="1" text="&lt;"/>
    <key vkey="K_QUOTE" shift="" unicode="1" text="{"/>
    <key vkey="K_COMMA" shift="" unicode="1" text=","/>
    <key vkey="K_HYPHEN" shift="" unicode="1" text="&apos;"/>
    <key vkey="K_PERIOD" shift="" unicode="1" text="."/>
    <key vkey="K_SLASH" shift="" unicode="1" text="-"/>
    <key vkey="K_0" shift="" unicode="1" text="0"/>
    <key vkey="K_1" shift="" unicode="1" text="1"/>
    <key vkey="K_2" shift="" unicode="1" text="2"/>
    <key vkey="K_3" shift="" unicode="1" text="3"/>
    <key vkey="K_4" shift="" unicode="1" text="4"/>
    <key vkey="K_5" shift="" unicode="1" text="5"/>
    <key vkey="K_6" shift="" unicode="1" text="6"/>
    <key vkey="K_7" shift="" unicode="1" text="7"/>
    <key vkey="K_8" shift="" unicode="1" text="8"/>
    <key vkey="K_9" shift="" unicode="1" text="9"/>
    <key vkey="K_COLON" shift="" unicode="1" text="ñ"/>
    <key vkey="K_EQUAL" shift="" unicode="1" text="¿"/>
    <key vkey="K_A" shift="" unicode="1" text="a"/>
    <key vkey="K_B" shift="" unicode="1" text="b"/>
    <key vkey="K_C" shift="" unicode="1" text="c"/>
    <key vkey="K_D" shift="" unicode="1" text="d"/>
    <key vkey="K_E" shift="" unicode="1" text="e"/>
    <key vkey="K_F" shift="" unicode="1" text="f"/>
    <key vkey="K_G" shift="" unicode="1" text="g"/>
    <key vkey="K_H" shift="" unicode="1" text="h"/>
    <key vkey="K_I" shift="" unicode="1" text="i"/>
    <key vkey="K_J" shift="" unicode="1" text="j"/>
    <key vkey="K_K" shift="" unicode="1" text="k"/>
    <key vkey="K_L" shift="" unicode="1" text="l"/>
    <key vkey="K_M" shift="" unicode="1" text="m"/>
    <key vkey="K_N" shift="" unicode="1" text="n"/>
    <key vkey="K_O" shift="" unicode="1" text="o"/>
    <key vkey="K_P" shift="" unicode="1" text="p"/>
    <key vkey="K_Q" shift="" unicode="1" text="q"/>
    <key vkey="K_R" shift="" unicode="1" text="r"/>
    <key vkey="K_S" shift="" unicode="1" text="s"/>
    <key vkey="K_T" shift="" unicode="1" text="t"/>
    <key vkey="K_U" shift="" unicode="1" text="u"/>
    <key vkey="K_V" shift="" unicode="1" text="v"/>
    <key vkey="K_W" shift="" unicode="1" text="w"/>
    <key vkey="K_X" shift="" unicode="1" text="x"/>
    <key vkey="K_Y" shift="" unicode="1" text="y"/>
    <key vkey="K_Z" shift="" unicode="1" text="z"/>
    <key vkey="K_BKSLASH" shift="" unicode="1" text="}"/>
    <key vkey="K_RBRKT" shift="" unicode="1" text="+"/>
    <key vkey="K_BKQUOTE" shift="" unicode="1" text="|"/>
    <key vkey="K_oE2" shift="S" unicode="1" text="&gt;"/>
    <key vkey="K_1" shift="S" unicode="1" text="!"/>
    <key vkey="K_QUOTE" shift="S" unicode="1" text="["/>
    <key vkey="K_3" shift="S" unicode="1" text="#"/>
    <key vkey="K_4" shift="S" unicode="1" text="$"/>
    <key vkey="K_5" shift="S" unicode="1" text="%"/>
    <key vkey="K_7" shift="S" unicode="1" text="/"/>
    <key vkey="K_9" shift="S" unicode="1" text=")"/>
    <key vkey="K_0" shift="S" unicode="1" text="="/>
    <key vkey="K_8" shift="S" unicode="1" text="("/>
    <key vkey="K_EQUAL" shift="S" unicode="1" text="¡"/>
    <key vkey="K_COLON" shift="S" unicode="1" text="Ñ"/>
    <key vkey="K_COMMA" shift="S" unicode="1" text=";"/>
    <key vkey="K_PERIOD" shift="S" unicode="1" text=":"/>
    <key vkey="K_SLASH" shift="S" unicode="1" text="_"/>
    <key vkey="K_2" shift="S" unicode="1" text="&quot;"/>
    <key vkey="K_A" shift="S" unicode="1" text="A"/>
    <key vkey="K_B" shift="S" unicode="1" text="B"/>
    <key vkey="K_C" shift="S" unicode="1" text="C"/>
    <key vkey="K_D" shift="S" unicode="1" text="D"/>
    <key vkey="K_E" shift="S" unicode="1" text="E"/>
    <key vkey="K_F" shift="S" unicode="1" text="F"/>
    <key vkey="K_G" shift="S" unicode="1" text="G"/>
    <key vkey="K_H" shift="S" unicode="1" text="H"/>
    <key vkey="K_I" shift="S" unicode="1" text="I"/>
    <key vkey="K_J" shift="S" unicode="1" text="J"/>
    <key vkey="K_K" shift="S" unicode="1" text="K"/>
    <key vkey="K_L" shift="S" unicode="1" text="L"/>
    <key vkey="K_M" shift="S" unicode="1" text="M"/>
    <key vkey="K_N" shift="S" unicode="1" text="N"/>
    <key vkey="K_O" shift="S" unicode="1" text="O"/>
    <key vkey="K_P" shift="S" unicode="1" text="P"/>
    <key vkey="K_Q" shift="S" unicode="1" text="Q"/>
    <key vkey="K_R" shift="S" unicode="1" text="R"/>
    <key vkey="K_S" shift="S" unicode="1" text="S"/>
    <key vkey="K_T" shift="S" unicode="1" text="T"/>
    <key vkey="K_U" shift="S" unicode="1" text="U"/>
    <key vkey="K_V" shift="S" unicode="1" text="V"/>
    <key vkey="K_W" shift="S" unicode="1" text="W"/>
    <key vkey="K_X" shift="S" unicode="1" text="X"/>
    <key vkey="K_Y" shift="S" unicode="1" text="Y"/>
    <key vkey="K_Z" shift="S" unicode="1" text="Z"/>
    <key vkey="K_6" shift="S" unicode="1" text="&amp;"/>
    <key vkey="K_HYPHEN" shift="S" unicode="1" text="?"/>
    <key vkey="K_BKSLASH" shift="S" unicode="1" text="]"/>
    <key vkey="K_RBRKT" shift="S" unicode="1" text="*"/>
    <key vkey="K_BKQUOTE" shift="S" unicode="1" text="°"/>
  </keys>
</visualkeyboard>

Running Windows 10:

Edition	Windows 10 Pro
Version	22H2
Installed on	‎1/‎05/‎2021
OS build	19045.4170
Experience	Windows Feature Experience Pack 1000.19054.1000.0

Keyman Developer error messages:

  Details for error report for Keyman app:
  Application Identifier: tike-16.0.147
  Error Identifier: 602FE9ADF6C741334BA95F2DDFF4843D
  
  Details for error report for Keyman app:
  Application Identifier: tike-16.0.147
  Error Identifier: 3E1CD0872F1249F2BE21ECF05B0D3997
  
  Details for error report for Keyman app:
  Application Identifier: tike-16.0.147
  Error Identifier: 38AC51408B4A4E916930D85147E0AB6F

Details for error report for Keyman app:
  Application Identifier: tike-16.0.147
  Error Identifier: 21C6926C87E04325774A7CEC0D378028

Please let me know if you need my project file or any other information.

Thanks!

Expected behavior

I expect KD to generate the CSS file and related images (if selected) without crashing.

Related issues

Prior to attempting the CSS export I had selected, "Fill from layout."

Keyman apps

  • Keyman for Android
  • Keyman for iPhone and iPad
  • Keyman for Linux
  • Keyman for macOS
  • Keyman for Windows
  • Keyman Developer
  • KeymanWeb
  • Other - give details at bottom of form

Keyman version

16.0.147

Operating system

Windows 10 Pro

Device

Asus Laptop

Target application

No response

Browser

No response

Keyboard name

Teclado Quechua

Keyboard version

0.9

Language name

Quechua (que)

Additional context

My keyboard is beta and isn't yet in the repository.

@Meng-Heng
Copy link
Collaborator

Hello @alex-larkin,

Is there a way we can download the latest edition of the entire keyboard package?

This is a really detailed report but I wish I had refer you to the community site as there would be more visibility and suits your topic better.

@alex-larkin
Copy link
Author

Hello! Here is the file:

https://drive.google.com/file/d/1zPlDaf-JRHFmHJEVZb0xbZkZ8yHP57NN/view?usp=sharing

Sorry for the delay! I hope this helps. Please let me know how it goes.

Thanks again.

@jahorton jahorton changed the title bug: exporting CSS from on-screen keyboard causes KD to crash bug(developer): exporting CSS from on-screen keyboard causes KD to crash Apr 11, 2024
Copy link

sentry-io bot commented Apr 11, 2024

darcywong00 - I think tied to this Sentry issue

Sentry Issue: KEYMAN-DEVELOPER-1P9

@alex-larkin
Copy link
Author

Is there I workaround I could use in the meantime? I am looking for a way to get keyboard graphics for my documentation.

Thanks!

@mcdurdin
Copy link
Member

stack trace

OS Version: Windows 10.0.19041 (3636)
Report Version: 104


Application Specific Information:
Exception EAccessViolation in module tike.exe at 009D586C.
Access violation at address 00DD586C in module 'tike.exe'. Read of address 00000000.


Thread 0
0   tike.exe                        0xdd586c            VisualKeyboardExportHTML.TVisualKeyboardExportHTML.ExportToFile (VisualKeyboardExportHTML.pas:159)
1   tike.exe                        0xddb8bd            UframeOnScreenKeyboardEditor.TframeOnScreenKeyboardEditor.ExportToFile (UframeOnScreenKeyboardEditor.pas:1381)
2   tike.exe                        0xdd913c            UframeOnScreenKeyboardEditor.TframeOnScreenKeyboardEditor.cmdExportOnScreenKeyboardClick (UframeOnScreenKeyboardEditor.pas:585)
3   tike.exe                        0x5760e8            Vcl.Controls.TControl.Click (Vcl.Controls.pas:7536)
4   tike.exe                        0x57a643            Vcl.Controls.TWinControl.WndProc (Vcl.Controls.pas:10278)
5   tike.exe                        0x599568            Vcl.StdCtrls.TButtonControl.WndProc (Vcl.StdCtrls.pas:5307)
6   tike.exe                        0x57a7a7            Vcl.Controls.DoControlMsg (Vcl.Controls.pas:10347)
7   tike.exe                        0x57a643            Vcl.Controls.TWinControl.WndProc (Vcl.Controls.pas:10278)
8   tike.exe                        0x579c0e            Vcl.Controls.TWinControl.MainWndProc (Vcl.Controls.pas:9977)
9   tike.exe                        0x48bcf9            System.Classes.StdWndProc (System.Classes.pas:17929)
10  USER32.dll                      0x75f512ba          _InternalCallWinProc
11  USER32.dll                      0x75f47a59          UserCallWinProcCheckWow
12  USER32.dll                      0x75f47659          DispatchClientMessage
13  USER32.dll                      0x75f4bb5e          __fnDWORD
14  ntdll.dll                       0x770f507c          KiUserCallbackDispatcher
15  USER32.dll                      0x75f45d4e          SendMessageW
16  COMCTL32.dll                    0x6d636617          Button_NotifyParent
17  COMCTL32.dll                    0x6d675f32          Button_WndProc
18  USER32.dll                      0x75f512ba          _InternalCallWinProc
19  USER32.dll                      0x75f47a59          UserCallWinProcCheckWow
20  USER32.dll                      0x75f47215          CallWindowProcAorW
21  USER32.dll                      0x75f45a0a          CallWindowProcW
22  tike.exe                        0x57a752            Vcl.Controls.TWinControl.DefaultHandler (Vcl.Controls.pas:10319)
23  tike.exe                        0x57a643            Vcl.Controls.TWinControl.WndProc (Vcl.Controls.pas:10278)
24  tike.exe                        0x599568            Vcl.StdCtrls.TButtonControl.WndProc (Vcl.StdCtrls.pas:5307)
25  tike.exe                        0x48bcf9            System.Classes.StdWndProc (System.Classes.pas:17929)
26  USER32.dll                      0x75f512ba          _InternalCallWinProc
27  USER32.dll                      0x75f47a59          UserCallWinProcCheckWow
28  USER32.dll                      0x75f46390          DispatchMessageWorker
29  USER32.dll                      0x75f45eaf          DispatchMessageW
30  tike.exe                        0x6869cf            Vcl.Forms.TApplication.ProcessMessage (Vcl.Forms.pas:10747)

@mcdurdin
Copy link
Member

This is happening because Keyman Engine is not available, so the OSK files are not available for export.

Workaround: install Keyman for Windows (preferably same version).

To fix this, we'll need to include the OSK files with Keyman Developer, in path that can be found per function GetOSKXSLPath in VisualKeyboardExportHTML.pas:

function GetOSKXSLPath: string;
begin
with TRegistryErrorControlled.Create do // I2890
try
RootKey := HKEY_LOCAL_MACHINE;
if OpenKeyReadOnly(SRegKey_KeymanEngine_LM) and ValueExists(SRegValue_RootPath)
then Result := IncludeTrailingPathDelimiter(ReadString(SRegValue_RootPath)) + 'xml\osk\'
else Result := ExtractFilePath(ParamStr(0)) + 'xml\osk\';
finally
Free;
end;
Result := GetDebugPath('Debug_OSKXSLPath', Result, True);
end;

For consistency, we should verify the file location exists and use the one relative to the executable filename as default -- so that we are not depending on a possibly different version of Keyman Engine to Keyman Developer.

@mcdurdin mcdurdin modified the milestones: 18.0, B17S6 Apr 17, 2024
@mcdurdin mcdurdin self-assigned this Apr 17, 2024
@alex-larkin
Copy link
Author

Thanks Marc!

Ah yes, I can see how that could have happened. I'll try the workaround sometime in the coming few weeks, as I am in the most of a move. Thanks again!

@mcdurdin mcdurdin changed the title bug(developer): exporting CSS from on-screen keyboard causes KD to crash bug(developer): exporting CSS from on-screen keyboard causes Developer to crash if Keyman for Windows is not installed Apr 18, 2024
mcdurdin added a commit that referenced this issue Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants