keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
390 stars 108 forks source link

bug(developer): kmcmplib wasm mode is not getting sentry call stacks #11091

Open mcdurdin opened 6 months ago

mcdurdin commented 6 months ago

See e.g. https://keyman.sentry.io/issues/5097542930/events/48cdbb5c426544f3943f86110dc8f0ac/

Error: The compiler memory buffer overflowed
  File "C:\BuildAgent\work\7ac43416c45637e9\keyman\developer\src\common\web\utils\src\KeymanSentry.ts", line 50, col 36, in Function.reportException
    const eventId = await Sentry.captureException(e);
  File "C:\BuildAgent\work\7ac43416c45637e9\keyman\developer\src\kmc\src\util\NodeCompilerCallbacks.ts", line 142, col 20, in NodeCompilerCallbacks.reportMessage
    KeymanSentry.reportException(event.exceptionVar ?? event.message, false);
  File "C:\BuildAgent\work\7ac43416c45637e9\keyman\common\web\types\src\util\compiler-interfaces.ts", line 467, col 19, in CompilerFileCallbacks.reportMessage
    this.parent.reportMessage({filename: this.filename, ...event});
  File "C:\BuildAgent\work\7ac43416c45637e9\keyman\developer\src\kmc-kmn\src\compiler\compiler.ts", line 224, col 20, in compilerMessageCallback
    this.callbacks.reportMessage(mapErrorFromKmcmplib(line, code, msg));
  File "C:\BuildAgent\work\7ac43416c45637e9\keyman\developer\src\kmc-kmn\src\import\kmcmplib\wasm-host.js", line 884, col 236, in wasm_msgproc
    '{snip} ion') { console.log(`[${line}: ${msgcode}: ${UTF8ToString(text)}]`); return 0; } else { return proc(line, msgcode, UTF8ToString(text)); } }
  File "wasm://wasm/014f8a32:wasm-function[135]:0xc8ed", in wasm_CompilerMessageProc(int, unsigned int, char const*, void*)
  File "wasm://wasm/014f8a32:wasm-function[61]:0x3255", in AddCompileError(unsigned int)
  File "wasm://wasm/014f8a32:wasm-function[48]:0x22dd", in CompileKeyboardBuffer(unsigned char*, int, FILE_KEYBOARD*)
mcdurdin commented 5 months ago

Follow on from:

mcdurdin commented 5 months ago

See #11151; this is still blocked by https://github.com/getsentry/symbolicator/issues/969#issuecomment-2033717006 -- note that that issue is closed but subsequent errors reported post-closure.

Moving to review in 18.0 cycle.

This means we don't get full line-level symbolication of call stacks, but we do get symbol names, so it's not completely the end of the world.

mcdurdin commented 5 months ago

This is not yet fixed, see #11151.

mcdurdin commented 5 months ago

https://github.com/getsentry/symbolicator/releases/tag/24.4.1 or https://github.com/getsentry/symbolicator/releases/tag/24.4.0 may have the support needed for this.