Commit graph

65 commits

Author SHA1 Message Date
Marc Durdin
3219b44624 chore: sentry.io dsn 2021-10-04 15:01:36 +11:00
Marc Durdin
5d32a61a63 chore(windows): patches for Delphi 10.4
Updates Keyman for Windows and Keyman Developer sources so that they
build under Delphi 10.4. No validation has been performed to ensure that
there are no other issues. The intent here is to get a baseline build
working.

Note also IMSample.vcxproj which has its WinSDK version updated for
VS2019.
2021-07-27 16:57:40 +10:00
Marc Durdin
5246408ac0 chore(windows): make build paths consistent
More iterations on this yak shave.
2021-07-01 10:52:59 +10:00
Marc Durdin
4e56f2eaeb fix(windows): force add sentry binaries 2021-05-29 18:07:38 +10: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
9e53505be0 chore(windows): cef4delphi source units 2021-05-21 15:20:58 +10:00
Marc Durdin
56fdc98a81 chore(windows): Chromium 89.0.18
Updates Chromium Embedded Framework to 89.0.18. Goes with
branch v89.0.18 of https://github.com/keymanapp/CEF4Delphi_Binary

Adds a script to checkout the correct version of CEF from the repo
according to CEF_VERSION.md.
2021-05-21 14:47:18 +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
49f05e879d fix(developer): Support all fonts in Keyboard Fonts dialog
Fixes #2789.

The Keyboard Fonts dialog skipped some fonts which it did not recognise
as valid TrueType fonts. As a bonus, I've rewritten a few parts of it to
make it significantly faster to load.

I also turned off the font formatting for the list, as it was not very
helpful and hurt performance considerably.
2021-03-03 14:24:59 +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
b8da7cf962 chore(windows): remove docbook and libxslt
As we now build help files from Markdown, we no longer
need these two dependencies.
2020-12-04 13:43:46 +11:00
Marc Durdin
9e46b555d9 fix(windows): Rename to Keyman
Fixes #4003.

This addresses the majority of locations where we use the name "Keyman
Desktop" in code. There will be some filenames and paths that do not
change at this point -- particularly at a source level. For now, the
focus is on the user interface changes.

While making these changes, I also made the VERSION and MANIFEST
resources more consistent.
2020-12-02 09:56:14 +11:00
Marc Durdin
9f53e0f0af fix(windows): sentry range check error
In some circumstances, Sentry would get a range check error while
processing the call stack due to DWORD being defined as NativeInt,
not NativeUInt, in old JWA libraries. This would mask the original
exception, and could cause the app to hang.
2020-11-23 10:57:01 +11:00
Marc Durdin
63086e9e9c
Merge pull request #3842 from keymanapp/fix/windows/sporadic-8087-controlword-corruption
fix(windows): sporadic 8087 control word corruption
2020-11-12 15:07:53 +11:00
Marc Durdin
fef2f05144 fix(windows): sporadic 8087 control word corruption
This replaces vectored exception handler code which fixed up the 8087 CW
with a thread-safe version of Set8087CW that avoids the global
variable Default8087CW. We would get occasional situations where
exceptions were raised on 2 threads simultaneously, which could lead to a
race where the first thread set Default8087CW to $1340, and then the second
thread would read that and think that is the default to keep. We want to
avoid touching Default8087CW altogether here.

See also https://stackoverflow.com/a/39684636/1836776 and RSP-13643.
2020-11-09 16:14:11 +11:00
Marc Durdin
3d1601ffe5 fix(windows): SizeOfImage header was wrong for dbg
Fixes #3831.

This fixes both issues reported in the bug (dproj changes ensure
separate .tds, and Makefile changes fix order of execution so that
dbg is generated after sentryprep's cleanup).
2020-11-06 17:36:56 +11:00
Marc Durdin
53a197fba5 chore(windows): Move to Windows SDK 10.0.17763.0
This removes the requirement for the Windows 8.1 SDK.
2020-10-05 14:11:34 +11:00
Marc Durdin
daa65dcd2e fix(windows): Buffer overrun in firstrun
Fixes #3633.

Memory allocation was half its required size due to missing
`sizeof(Char)` calculation.

Also added extra tags to Sentry events for command line and executable,
which made tracing this issue so much easier.
2020-09-29 09:04:07 +10:00
Marc Durdin
fa90628a85 fix(windows): sentry exception reports
This updates Sentry integration to use the exception object which
gives better tracking and consolidation over time, once we learned
how to report the call stack more reliably.
2020-06-12 17:12:21 +10:00
Marc Durdin
afac7b7052 fix(developer): crash when developer starts
Fixes #3004. Fixes a crash when Keyman Developer starts
by double-clicking an associated file type in Explorer.
2020-05-19 11:30:54 +10:00
Marc Durdin
883804f3e5 fix(windows): test for stack precapture was not correct 2020-04-19 16:32:36 +10:00
Marc Durdin
fab07b5dfc fix(windows): flush module cache before capturing exception
Sentry caches the module list so it doesn't need to
rebuild on every event. That's fine for most cases
but when we have an exception we want as much accuracy
as possible, so flush it first
2020-04-18 16:52:40 +10:00
Marc Durdin
28a9e22aa3 fix(windows): Sentry event ids are raw byte never guids now 2020-04-18 15:21:29 +10:00
Marc Durdin
9f5d1ab664 fix(windows): recapture call stack if exceptaddr not same as previous 2020-04-18 15:09:22 +10:00
Marc Durdin
cebb2a6980 chore(windows): sentry 0.2.3 2020-04-08 07:10:47 +10:00
Marc Durdin
40b69950fa fix(windows): support x64, remove sentry.dll 2020-04-05 07:36:50 +10:00
Marc Durdin
e1d3a25f3b fix(windows): update sentry to latest master
Sentry 0.2.2 had a bug with initialization that stopped the random
number generator from working.
2020-04-02 06:15:05 +11: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
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
e99a6677e1 feat(windows): kmcomapi callstacks for sentry 2020-03-27 09:54:48 +11:00
Marc Durdin
4846127985
Merge pull request #2886 from keymanapp/feat/windows/sentry-cpp-wrapper
feat(windows): sentry c++ wrappers
2020-03-25 12:45:07 +11:00
Marc Durdin
2cf8b3a098 fix(windows): force add sentry.lib 2020-03-25 07:50:24 +11:00
Marc Durdin
b75e506782 feat(windows): sentry c++ wrappers 2020-03-25 07:38:29 +11:00
Marc Durdin
9c224a000a fix(windows): whitespace issues 2020-03-24 16:08:04 +11:00
Marc Durdin
1e755385a6 feat(windows): new error notification dialog 2020-03-23 16:50:24 +11:00
Marc Durdin
58a99b305a fix(windows): some sentry symbolication was not working 2020-03-23 07:44:50 +11:00
Marc Durdin
f2f2add7a6 fix(windows): jvcl build failing
Re-enable jcl build so it hopefully fixes the failing
jvcl package build (e.g. Jcl.dpk(33) Fatal: F2084 Internal Error: AV0052D05C-R5071176D-0
received during build)
2020-03-18 20:12:51 +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
9bf1efa6e2 feat(windows): add sentry.dll and build 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
Marc Durdin
f15634a9ed chore: Merge branch 'master' into windows-use-chromium 2020-02-22 11:52:23 +11:00
Marc Durdin
8a99326a06 feat(developer): Add QRCode for debugger url
The keyboard editor and package editor now include
a QRCode which will reference the web debugger to
simplify loading on a mobile device.
2019-12-08 18:14:31 +00:00
Marc Durdin
9c5e30d82a [Windows] Update build scripts, compiler conditionals, and address hints arising with move to Delphi 10.3.2 2019-10-24 20:43:17 +07:00
Marc Durdin
d5e0f138b2 [Developer] Remove dependency on component mode of TBrowse4Folder 2019-10-20 19:50:58 +07:00
Marc Durdin
ae8a8bb376 Add browse4folder.pas to project 2019-10-20 19:43:42 +07:00
Marc Durdin
46049802aa [Windows] More chromium integration; tsysinfo 2019-04-10 13:58:40 +07:00