Automattic / Automattic/node-canvas

doesn't work for node.js with pointer-compression

Open
#2,228 0 comments 1 reaction 0 assignees View on GitHub
Help wanted
Dominant language
JavaScript
Stars
10.7k
Forks
1.2k
Avg merge
4d 8h
Merged PRs (30d)
1

Description

## Issue

Using `canvas` with pointer compression node.js builds (from [unofficial-builds](https://unofficial-builds.nodejs.org/download/release/v18.12.1/)) always leads to a segmentation fault.

## Steps to Reproduce

```js
console.log('before');
const Canvas = require('canvas');
console.log('after');
```

with pointer compression node.js we got:

```sh
before
Segmentation fault
```

It's probably not guranteed for node-canvas to work on any build, especially unofficial ones, yet the problem looks unexpected, because some other binary addons work well with the node version.

## Environment
* node-canvas 2.11.2
* node js with pointer compression from [unofficial-builds](https://unofficial-builds.nodejs.org/download/release/v18.12.1/) 18.12.1, 18.15.0
* Debian Linux 11

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the crash with the shown require('canvas') example under the pointer-compression Node.js 18.12.1 or 18.15.0 builds on Debian 11, and compare it with a standard Node.js build. Trace the failure during addon loading; done means the canvas addon no longer segfaults with the affected pointer-compression builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.