Remove malloc(): corrupted top size workaround

Update your imagick if you get it
This commit is contained in:
Christopher Monsanto 2021-12-21 11:33:06 -05:00
parent 2902ddeb37
commit ac3dbe0178

View File

@ -38,15 +38,8 @@ const proc = cp.spawn("magick", [
stdio: ['pipe', 'inherit', 'inherit']
});
// Write one at a time to avoid "malloc(): corrupted top size" error
for (const entry of sheet.entries) {
if (!proc.stdin.write(entry + "\n")) {
// imagick doesn't like it when it receives the input too fast. This
// seems to avoid a realloc() invalid next size error.
await new Promise(resolve => {
proc.stdin.once('drain', resolve);
});
}
proc.stdin.write(entry + "\n");
}
proc.stdin.end();