Commit graph

34 commits

Author SHA1 Message Date
Marc Durdin
331c9d2d71 chore(windows): move shared general units to common 2022-06-22 13:58:58 +10:00
Marc Durdin
1006be8914 chore(windows): update sentry references 2022-06-06 15:48:24 +10:00
Marc Durdin
f55f3fec1e chore: additional sentry.io links 2021-10-04 15:08:28 +11:00
Marc Durdin
3219b44624 chore: sentry.io dsn 2021-10-04 15:01:36 +11:00
Marc Durdin
9dcb8aa054 fix(windows): use version-specific sentry-db path
Fixes #5188.
2021-05-29 16:23:17 +10:00
Marc Durdin
7235bf2057 fix(windows): sentry.dll version handling
Fixes #5166.

This introduces versioned management of sentry.dll for Keyman for
Windows, Keyman Engine and Keyman Developer. As sentry.dll's ABI is not
backwardly compatible, we have to maintain independent copies of each
DLL for each app.

sentry.dll (or sentry.x64.dll for x64 apps) will be found in the
sentry-0.4.9 folder relative to the running process, except when running
from within the keyman repo tree (based on presence of KEYMAN_ROOT env
var). In those cases, the windows/src/ext/sentry sentry.dll will be
used, allowing us to test new debug time sentry DLLs easily.

A little bit of cleanup and consolidation was also done in the
KeymanPaths.pas unit.
2021-05-28 15:55:06 +10:00
Marc Durdin
7c087ef6ac chore(windows): Update Sentry to 0.4.9
Fixes #4607.

The Sentry 0.4.9 update actually simplifies some things. It does only
build with VS2019 by default, which pushed me to update Keyman build to
the same version, but that's a good thing overall, and was fairly
painless anyway.

Previously, we had our own custom build of sentry-native to make sure
that the C++ runtime libraries were statically linked to sentry.dll, but
this is now configurable in the build options, so we were able to
abandon our fork of the project at
https://github.com/keymanapp/sentry-native, which is good news. (I will
leave the fork there just in case but we'll eventually delete it once we
are convinced that this is robust.)

I have updated sentry.pas to match sentry.h; most of the changes are in
comments but there are a handful of new functions and some small changes
to function signatures.

I retested the Sentry exception scenarios and results can be found at
https://docs.google.com/spreadsheets/d/19xfurbn4cGubSCD68EGuKhcR5HrjaUcY/edit#gid=170604584

There may be an issue with Delphi x64 programs missing symbols from my
machine; something to keep an eye on but not a blocker for this merging,
I think.
2021-05-25 18:34:38 +10:00
Marc Durdin
aebfdecf7a chore(windows): breadcrumbs
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.
2021-03-16 06:57:57 +11:00
Marc Durdin
c8e6ddbe7b fix(developer): run even if sentry unavailable
Fixes #4451.

If sentry.dll is missing, we should continue without error reporting,
rather than crashing out.
2021-02-26 11:45:16 +11:00
Marc Durdin
65cb3aaec2 fix(developer): disable TSentryClient on WINE
Under WINE, on macOS at least, TSentryClient is crashing at
startup, e.g. when calling SymInitialise. In order to have a
working kmcomp.exe on macOS/Linux, we'll just disable Sentry
altogether for now.
2021-01-18 06:36:31 +11:00
Marc Durdin
7ccde0e3ed chore(windows): disable Sentry 'Started' event
We used the 'Started' event when testing Sentry integration. We no
longer need it, but I left it in as commented code so we can re-enable
if/when we do Sentry updates in the future and need to re-test.
2020-12-01 10:45:22 +11:00
Marc Durdin
0aaea62b1c fix(windows): Handle failure on task creation
Fixes #3797.
Fixes KEYMAN-WINDOWS-5H.

Report unexpected errors creating or deleting scheduled task, and ignore
expected errors better, handling a potential race condition where two
processes both attempt to create a folder at the same time.

Note that creating the task should not be a race because we use the
`TASK_CREATE_OR_UPDATE` flag.
2020-10-30 15:47:43 +11:00
Marc Durdin
6d7c92bfff fix(windows): kmshell title and kmbrowserhost sentry
kmshell had no application.title set and this gave incorrect
results for crash report dialog.
kmbrowserhost was acting as a VCL app but it isn't, and the
sentry integration was pulling in all the VCL dependencies which
was a bad outcome. This removes those and handles crashes as a
non-VCL app.
2020-05-11 08:10:26 +10:00
Marc Durdin
ce5db177c2 fix(windows): use consistent sentry db location 2020-05-08 07:46:09 +10:00
Marc Durdin
edc53fb468 fix(windows): use KeymanWindows rather than KeymanDesktop as logger for sentry 2020-04-27 14:00:30 +10:00
Marc Durdin
2d4b2a7af0 fix(windows): attempt to shutdown CEF before exception handler 2020-04-27 12:55:01 +10:00
Marc Durdin
e09b081a34 fix(windows): cleanup release and environment for Sentry 2020-04-20 07:07:39 +10:00
Marc Durdin
d6ddebe64f fix(windows): use correct slug for Keyman Desktop 2020-04-19 16:32:57 +10:00
Marc Durdin
c8c9f780eb fix(windows): add extra detail for console app crashes 2020-04-18 15:22:18 +10:00
Marc Durdin
4548040661
Merge pull request #2923 from keymanapp/feat/windows/test-sentry-integration
feat(windows): Testing Sentry integration
2020-04-08 06:02:00 +07:00
Marc Durdin
5928052d93 feat(windows): use crashpad and better call stacks
Also moves to sentry native 2.0.
2020-04-01 12:02:26 +11:00
Marc Durdin
90f4a5109f feat(windows): report process start to sentry
Also handles -sentry-client-test-exception command line parameter
for console apps and tidies up Sentry instantiation.
2020-03-30 12:21:47 +11:00
Marc Durdin
9eb28cb738 fix(windows): replaces empty eventid with underscore when autoreport errors off
Fixes #2911. This adds a default parameter so the error reporting dialog can show details of the
report. It does not address manual report sending.
2020-03-30 06:47:06 +11:00
Marc Durdin
00e58c13ec feat(windows): user control for upload to sentry 2020-03-27 17:50:51 +11:00
Marc Durdin
d33d429cd2 feat(windows): sentry x64 support 2020-03-27 14:40:59 +11:00
Marc Durdin
9779792059 fix(windows): remove errlogpath and cleanup 2020-03-27 11:23:51 +11:00
Marc Durdin
e99a6677e1 feat(windows): kmcomapi callstacks for sentry 2020-03-27 09:54:48 +11:00
Marc Durdin
62dcadad4d fix(windows): show error if tsysinfo fails to start 2020-03-27 06:55:25 +11:00
Marc Durdin
1e755385a6 feat(windows): new error notification dialog 2020-03-23 16:50:24 +11:00
Marc Durdin
17e2a17c08 fix(windows): sentry proxy support 2020-03-23 07:55:08 +11:00
Marc Durdin
03b421843d fix(windows): various fixes for sentry 2020-03-18 17:25:40 +11:00
Marc Durdin
eade8c34f3 refactor(windows): Use 14.0-style versioning
Moves all version construction to use VERSION.md and
TIER.md and reduces intermediate file usage, so we can
present sensible versions across the project.
2020-03-18 17:25:39 +11:00
Marc Durdin
2121f5ea94 feat(windows): consume new sentry api in delphi projects
Updates Delphi projects to use Sentry API instead of legacy
reporting mechanisms, and strips out existing text-based
reports. Not yet complete: reporting from kmcomapi and
hosted web controls, release number. These are flagged
as build hints.
2020-03-18 17:25:38 +11:00
Marc Durdin
7be25b6e4e feat(windows): Integrate Sentry
First stage of Sentry integration. Adds a basic library
for handling errors through Sentry. Does not include
integration into external handler or Keyman apps as yet.
2020-03-18 17:25:37 +11:00