Follow-up to #451 (which adds super.<vfunc>() chain-up).
Symptom
tests/register-class__vfunc_chain_up.js crashes the test process on macOS (arm64, all of Node 20/22/24) with no JS output — mocha reports the test failed with an empty error, i.e. a native crash rather than an assertion failure. Ubuntu and Windows (Node 20/22/24) and local Linux all pass.
The crash is in the chain-up native call itself: CallVFunc → g_vfunc_info_invoke(vfuncInfo, parentGType, ...). It is not the construction-timing case — the test was changed to chain up post-construction (from a regular method, with a live instance) and it still crashes on macOS only.
Notes
g_vfunc_info_invoke is not used anywhere else in node-gtk, so there's no existing macOS coverage of this girepository-1.0 entry point.
- macOS CI installs gobject-introspection 1.86.0 via Homebrew (the new girepository era); a behavior/ABI difference in
g_vfunc_info_invoke there is a prime suspect.
- The instance is valid (non-null) at the call site by this point, and the same code path works on Linux/Windows, so the marshalling of
in_args[0] (the instance) and the void return appears correct on those platforms.
Workaround in #451
The test is skipped on process.platform === 'darwin' so CI stays green; the feature ships working on Linux and Windows. This issue tracks getting chain-up working (and the test un-skipped) on macOS.
To investigate
- Reproduce on a macOS box / a
tmate CI debug session with lldb to get the crashing frame inside g_vfunc_info_invoke.
- Compare against resolving the parent impl with
g_vfunc_info_get_address(vfuncInfo, parentGType) + a hand-rolled ffi_call (node-gtk already has the cif/ffi machinery in src/function.cc) — this may behave differently on macOS than g_vfunc_info_invoke.
Follow-up to #451 (which adds
super.<vfunc>()chain-up).Symptom
tests/register-class__vfunc_chain_up.jscrashes the test process on macOS (arm64, all of Node 20/22/24) with no JS output — mocha reports the test failed with an empty error, i.e. a native crash rather than an assertion failure. Ubuntu and Windows (Node 20/22/24) and local Linux all pass.The crash is in the chain-up native call itself:
CallVFunc→g_vfunc_info_invoke(vfuncInfo, parentGType, ...). It is not the construction-timing case — the test was changed to chain up post-construction (from a regular method, with a live instance) and it still crashes on macOS only.Notes
g_vfunc_info_invokeis not used anywhere else in node-gtk, so there's no existing macOS coverage of this girepository-1.0 entry point.g_vfunc_info_invokethere is a prime suspect.in_args[0](the instance) and the void return appears correct on those platforms.Workaround in #451
The test is skipped on
process.platform === 'darwin'so CI stays green; the feature ships working on Linux and Windows. This issue tracks getting chain-up working (and the test un-skipped) on macOS.To investigate
tmateCI debug session withlldbto get the crashing frame insideg_vfunc_info_invoke.g_vfunc_info_get_address(vfuncInfo, parentGType)+ a hand-rolledffi_call(node-gtk already has the cif/ffi machinery insrc/function.cc) — this may behave differently on macOS thang_vfunc_info_invoke.