-
Notifications
You must be signed in to change notification settings - Fork 105
Big dataset problem #261
Description
When the database is too big (~800 subjects), I get this error:
/pasteur/homes/ntraut/local/lib/node_modules/bids-validator/validators/tsv.js:14
var rows = contents.split('\n');
^TypeError: Cannot read property 'split' of undefined
at TSV (/pasteur/homes/ntraut/local/lib/node_modules/bids-validator/validators/tsv.js:14:24)
at /pasteur/homes/ntraut/local/lib/node_modules/bids-validator/validators/bids.js:162:21
at ReadFileContext.callback (/pasteur/homes/ntraut/local/lib/node_modules/bids-validator/utils/files.js:48:17)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:303:13)
This error does not happen in all system environments and is caused by abnormal empty callback returns from fs.readFile. When I reduce the size of the dataset, bids-validator works properly.
I updated all the dependencies to their latest version and now I get this error with large datasets:
/pasteur/homes/ntraut/src/bids-validator/utils/files.js:239
var pathParts = relPath.split('/');
^RangeError: Maximum call stack size exceeded
at String.split (native)
at Object.relativePath (/pasteur/homes/ntraut/src/bids-validator/utils/files.js:239:33)
at /pasteur/homes/ntraut/src/bids-validator/validators/bids.js:120:36
at replenish (/pasteur/homes/ntraut/src/bids-validator/node_modules/async/dist/async.js:881:17)
terateeCallback (/pasteur/homes/ntraut/src/bids-validator/node_modules/async/dist/async.js:866:17)
at /pasteur/homes/ntraut/src/bids-validator/node_modules/async/dist/async.js:843:16
at /pasteur/homes/ntraut/src/bids-validator/validators/bids.js:149:17
at replenish (/pasteur/homes/ntraut/src/bids-validator/node_modules/async/dist/async.js:881:17)
terateeCallback (/pasteur/homes/ntraut/src/bids-validator/node_modules/async/dist/async.js:866:17)
at /pasteur/homes/ntraut/src/bids-validator/node_modules/async/dist/async.js:843:16
at /pasteur/homes/ntraut/src/bids-validator/validators/bids.js:149:17
at replenish (/pasteur/homes/ntraut/src/bids-validator/node_modules/async/dist/async.js:881:17)
terateeCallback (/pasteur/homes/ntraut/src/bids-validator/node_modules/async/dist/async.js:866:17)
at /pasteur/homes/ntraut/src/bids-validator/node_modules/async/dist/async.js:843:16
at /pasteur/homes/ntraut/src/bids-validator/validators/bids.js:149:17
at replenish (/pasteur/homes/ntraut/src/bids-validator/node_modules/async/dist/async.js:881:17)
terateeCallback (/pasteur/homes/ntraut/src/bids-validator/node_modules/async/dist/async.js:866:17)
at /pasteur/homes/ntraut/src/bids-validator/node_modules/async/dist/async.js:843:16
at /pasteur/homes/ntraut/src/bids-validator/validators/bids.js:149:17
at replenish (/pasteur/homes/ntraut/src/bids-validator/node_modules/async/dist/async.js:881:17)
I get this error in all environments I tested when the dataset is big, and I never get the bug when the dataset is small.