Segmentation Fault when retrieving window title
See original GitHub issueVersion Node v17.0.1 nut.js v2.0.1
Short overview Trying to retrieve title of any window results in Seg Fault and no other information, program ends immediately.
Issue occurs on
- Virtual machine
- Docker container
- Dev/Host system
Detailed error description Seg fault is occurring on Big Sur any time I attempt to find a window title, either through getWindows or getActiveWindow.
Steps to reproduce error Run this script:
import { getActiveWindow } from '@nut-tree/nut-js';
(async () => {
const window = await getActiveWindow();
const title = await window.title;
console.log(title);
})();
Expected Result:
Terminal
Actual Result:
zsh: segmentation fault node index.js
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Segmentation Fault when retrieving value from pointer in ...
in C, when calling malloc() , 1) do not cast the returned value as it is a void* so can be assigned to...
Read more >Segmentation fault - Wikipedia
Segmentation faults are a common class of error in programs written in languages like C that provide low-level memory access and few to...
Read more >Identify what's causing segmentation faults (segfaults)
A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core...
Read more >Why is rasterio getting a segmentation fault trying to read a ...
My code with the segfault was using ... with rasterio.open(orig_data_file) as f: data = f.read(1, window=window).
Read more >Debugging Segmentation Faults - Google Sites
Segmentation faults are referred to as segfault, access violation or bus error. Hardware notifies the operating system about memory access violation. The OS ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Root cause: Reading the
kCGWindowName
property requires an application to be givenScreen Recording
permissions. If this is not the case, it’ll just returnnil
which caused the segfault.Fixed in release
2.3.0
that just went live.Status update:
This issue had me banging my head for several months now. I might have finally tracked down the root cause 💪
Still WIP