bids-validator
bids-validator copied to clipboard
ENOBUFS when calling bin/bids-validator outside of project.
Not sure if its an issue with my setup or something else. Happened while testing microscopy PR #1359. If I called bin/bids-validator with an absolute path while outside of the bids-validator package directory it would fail with an ENOBUFS error number. Default esbuild buffer is 16mb. I doubled it to 32 and the call succeeded. Environment variable I set:
export ESBUILD_MAX_BUFFER=33554432
Looking at #1359, it reads the TIFF into memory and creates a duplicate copy to validate the TIFF header. In the browser this is probably okay (ArrayBuffer works with shallow copies) but it could run into heap limits or buffer issues like this on Node. Looks like it could instead read the first part of the file and still do all the later validation, that might be a good fix.
Thanks @nellh I'll add that to my review.
I did a fresh clone and install and couldn't recreate, figure its good to leave a trace of this fix somewhere since I didn't find too much online.