keyman
keyman copied to clipboard
bug(windows): Exception EZipException in module kmcomapi.dll at 00539B6D. File not available to elevated admin
Sentry Issue: KEYMAN-WINDOWS-10N
Exception EZipException in module kmcomapi.dll at 00539B6D.
File must be open.
kmcomapi 0x2f939b6d System.Zip.TZipFile.GetFileCount (System.Zip.pas:1)
kmcomapi 0x2f66b30a utilhandleexception.CaptureStackTrace (utilhandleexception.pas:59)
kmcomapi 0x2f66b434 utilhandleexception.LogException (utilhandleexception.pas:81)
kmcomapi 0x2f958781 keymanautoobject.TKeymanAutoObject.SafeCallException (keymanautoobject.pas:173)
kmcomapi 0x2f4095ef System.@HandleAutoException (System.pas:1)
ntdll 0x779cfc23 ExecuteHandler
ntdll 0x779c9e45 KiUserExceptionDispatcher
kmcomapi 0x2f939b6c System.Zip.TZipFile.GetFileCount (System.Zip.pas:1)
kmcomapi 0x2f94ef56 keymanpackagesinstalled.TKeymanPackagesInstalled.Install2 (keymanpackagesinstalled.pas:139)
kmshell 0x2c8cff01 Keyman.Configuration.UI.InstallFile.TInstallFile.Execute (Keyman.Configuration.UI.InstallFile.pas:168)
kmshell 0x2c8cf7ee Keyman.Configuration.UI.InstallFile.TInstallFile.Execute (Keyman.Configuration.UI.InstallFile.pas:50)
kmshell 0x2c97e539 initprog.RunKMCOM (initprog.pas:533)
kmshell 0x2c97de50 initprog.Run (initprog.pas:340)
kmshell 0x2c992cee kmshell.kmshell
KERNEL32.DLL 0x766988b7 $push_thunk$cdecl$u$u
KERNEL32.DLL 0x765fed7b BaseThreadInitThunk
ntdll 0x778c595f #__RtlUserThreadStart
ntdll 0x778c5917 #_RtlUserThreadStart
ntdll 0x779857cb _RtlUserThreadStart$pop_thunk
Ref: https://community.software.sil.org/t/kmp-does-not-install-directly-into-keyman-for-windows-but-works-everywhere-else/6027/2
This crash happens when the current user selects a file that is not available to the elevated Administrator. Two possible mitigations:
- Address the crash by testing for file existence before continuing, in the admin account run, probably in
TKeymanPackagesInstalled.Install2
, and wrap it with a error dialog, maybe inTInstallFile.Execute
- Consider improving the install process by copying the file to a known-accessible location (though what this location is may be hard to determine in advance)
I'd probably be comfortable with item 1 above and making sure the message makes it clear what to do to get the file installed.
Just noting that my initial attempts to try and reproduce the crash; in order, to have testable steps to test a fix against; have been unsuccessful. This may just be a case for implementing option 1 above and then doing suitable regression tests for installing keyboard packages.
Sentry issue: KEYMAN-WINDOWS-1N0
Sentry issue: KEYMAN-WINDOWS-1MZ
I noticed that some of the failing command line calls recorded in sentry have a trailing =
on the keyboard name not sure if this is normal or not. OK digger deeper I can see this is =
is deliberate and is meant have the BCP47Code so these cases I am seeing have the don't have the BCP47Code
"C:\Program Files (x86)\Keyman\Keyman Desktop\kmshell.exe" -log "C:\Users\MyUser\AppData\Local\Temp\kmnD5AE.log" -s -i "W:\MyKeyboard\mykeyboard_ver17.kmp=" -nowelcome -default-lang en-US 0409
Windows settings that results in map network drives beening unavailable in elevated command prompts. https://learn.microsoft.com/en-us/troubleshoot/windows-client/networking/mapped-drives-not-available-from-elevated-command
PR #7207