Fixes#4988.
Fixes KEYMAN-WINDOWS-3F.
This relates to #4976 and is a stop-gap until we implement that. It will
reduce the number of reported errors (both to us and the end user) but
does not address the core issue, which requires a more significant
refactor.
Fixes#4939.
Fixes KEYMAN-WINDOWS-70.
Fixes KEYMAN-WINDOWS-71.
Fixes KEYMAN-WINDOWS-BR.
Fixes KEYMAN-WINDOWS-6J.
I am speculating a little here, because the root cause is not visible in
the crash report, but it appears that if keyman32.dll is renamed, that
the UnregisterControllerWindows function attempts to reload keyman32.dll
which means that (a) it no longer has a list of registered controllers,
and (b) it may fail to reload.
Instead of throwing an exception, we now only log this error in
development mode. The error is not likely to cause significant trouble
for end users as they are shutting down Keyman anyway at this point.
The resolution if there is any uncertainty during an upgrade is to
restart Windows. This is less than ideal but avoids file locks and
problems with in-memory DLLs. (Future versions of Keyman will schedule
upgrades to happen automatically after a restart before Keyman has been
started, in an effort to avoid this kind of trauma.)
Fixes#4803.
This fixes part of #4803 - namely the obtrusive warning flagging that
there are mismatched modifier types in the keyboard. Instead of making
the change during tab switching, it simply shows a warning message in
the design view of the keyboard, which the developer can choose to
ignore.
This does not address the removal of comments or the switch of character
formats which is part of that conversion routine. That is a more complex
change to the parser.
Fixes#4874.
Opening product help from the tray menu would end up at a broken page.
Given the title of the link is "Help Contents", I have opted to open at
the help contents... (rather than the alternative of context/tray-menu).
Fixes#4848.
This error arose because the form was destroyed after kmshell.dpr
completes, which meant that sentry had already been destroyed. The
sentry call was simply to record a breadcrumb of the form being closed.
The fix is to move the lifecycle of the form into the `OpenTextEditor`
function. `OpenTextEditor` is used only by `initprog.RunKMCOM` and so it
is safe to remove the ApplicationRunning path of the code, which
simplifies the lifecycle of the form.
Fixes#4893.
Fixes KEYMAN-WINDOWS-50.
Fixes KEYMAN-WINDOWS-4Z.
Profile repair was using legacy code for re-establishing Keyman TIP
profiles after they had been modified by a third party app or Windows.
However, with Keyman 14's new profile registration pattern, this is both
less likely to occur and also easier to resolve (just disabling and
re-enabling the keyboard should do it).
Thus, I have opted to disable the profile repair code as, with the way
it stands at present, it may well make things worse, even aside from the
crash, because of disparities between user and admin TSF settings.
May fix#4889.
In some situations, Keyman is unable to precisely match the user's
default language with its own keyboard settings. In this situation,
Keyman may crash when attempting to install the TIP, or may give a
spurious error such as "Too many transient languages" or similar.
I have been unable to reproduce the crash described in #4889 on my
machines so this is an attempted fix.
This does fix a bug with default languages in any case so is a good fix
to include: if the user's default language is not found in Keyman's LCID
table, then Keyman would fail to install the TIP when the keyboard is
installed and would return an error message (but not crash).
Fixes#4886.
This patch includes 5 separate fixes for the various scenarios we
encountered during package installation.
1. RunTools.pas: don't attempt to install TIPs if package is not also
being installed.
2. Keyman.Setup.System.OnlineResourceCheck.pas, OnlineUpdateCheck.pas:
handle online update check for packages with spaces or periods in the
id (legacy packages only).
3. Keyman.Setup.System.InstallInfo.pas: Handle browsers renaming
downloaded files with `(n)` and `[n]` patterns as well as the current
` (n)` pattern.
4. Keyman.Setup.System.InstallInfo.pas: Handle browsers renaming
downloaded files with `_n` pattern. See code comments for details.
5. Keyman.Configuration.System.TIPMaintenance.pas: Avoid crashing if
`kmshell -install-tips-for-packages` is passed an invalid package
name.
The crash is actually fixed in point 5 above, but the root causes are
addressed in the other points.
Fixes#4830.
There remain some additional buffer size checks we should be doing in
`GetXString` but this will address the current issue by using the
standard maximum buffer size.
Fixes#4751.
Fixes KEYMAN-WINDOWS-76.
Fixes KEYMAN-WINDOWS-79.
Fixes KEYMAN-WINDOWS-7B.
Fixes KEYMAN-WINDOWS-7E.
Fixes KEYMAN-WINDOWS-7F.
Fixes KEYMAN-WINDOWS-7K.
Fixes KEYMAN-WINDOWS-7N.
Fixes KEYMAN-WINDOWS-80.
This resolves an issue where the TLangSwitchRefreshWatcher thread would
terminate early on Win7 (as it had no work to do), and free itself, but
then the main form would reference it post-free. Responsibility for free
has been moved to the main form.
This would result in various exceptions as state is corrupted at this
point.
This does not trigger a build failure; validation warnings currently always pass.
Info messages are currently suppressed with -s which also suppresses the banner,
which is more plumbing than we should change just now.
Some of our Sentry reports are difficult to track down. Adding user
interaction breadcrumbs to Keyman Configuration (to start with) may
simplify this. I may add more breadcrumbs to other projects now that
this is available.
Fixes#4520.
Start Keyman after Setup finishes only if Keyman is not already running.
The pattern in this code change is found in a few places. It would be
nice to centralise that in a unit somewhere but I don't want to do
that much refactoring at this point in beta.