Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

Big dataset problem #261

@ntraut

Description

@ntraut

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions