Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate node 12 issues #1

Closed
2 tasks done
s1hofmann opened this issue Jan 7, 2020 · 5 comments
Closed
2 tasks done

Investigate node 12 issues #1

s1hofmann opened this issue Jan 7, 2020 · 5 comments
Assignees
Labels
3rd party Issue is linked to or blocked by 3rd party dependencies

Comments

@s1hofmann
Copy link
Member

s1hofmann commented Jan 7, 2020

This issue is linked to nut-js#98 regarding segfaults on macOS using the current node LTS version (lts/erbium).

According to an issue comment, this behaviour also shows in RobotJS, which libnut is based off.
It has been reported that when using node v12.12, no segfault happens

Actions to perform:

  • Root cause analysis on why segfaults occur on node > v12.12
  • Investigate possible solutions
@s1hofmann s1hofmann self-assigned this Jan 7, 2020
@s1hofmann
Copy link
Member Author

Update:

  • Root cause:
    So far I've been able to debug the affected call. CGEventCreateKeyboardEvent(...) on line 125 in keypress.c.
    In my tests I also realised that the error occurs in node v12.13.1 and above. No segfaults occur up until v12.13.0.

  • Investigate possible solutions: WIP

@s1hofmann
Copy link
Member Author

Simple debug snippet:

const libnut = require(".");

libnut.keyTap("enter");
console.log("done");

@s1hofmann
Copy link
Member Author

Update:

  • Root cause: An update to libuv introduced with node v12.13.1 causes this issue. It persists up until node v13.6.0. node v13.7.0 introduced an update to libuv v1.34.1, which resolved the issue again. Backporting this version to latest lts/erbium (v12.16.0) also solves the issue here.

  • Possible solution: Unfortunately, we will have to wait for libuv v1.34.1 to reach the node 12 release line.

@s1hofmann s1hofmann added the 3rd party Issue is linked to or blocked by 3rd party dependencies label Feb 17, 2020
@s1hofmann
Copy link
Member Author

Corresponding node issue: nodejs/node#31623

@s1hofmann
Copy link
Member Author

Tested with build of 12.16.2-proposal, issue is resolved.

s1hofmann added a commit that referenced this issue May 31, 2024
* Ported fix from bolt to libnut

* Updated ci workflows with npm auth

* Increase timeout between window switches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party Issue is linked to or blocked by 3rd party dependencies
Projects
None yet
Development

No branches or pull requests

1 participant