Skip to content

PeptideMapper crashes when peptide input file contains empty lines #68

@cbielow

Description

@cbielow

Hi,

invoking PeptideMapper with a peptide file with empty lines causes:

Start mapping using 1 threads
 0%
10% 30% 50% 60%Error: mapping went wrong
Exception in thread "main" java.lang.NullPointerException
        at java.base/java.util.Objects.requireNonNull(Objects.java:209)
        at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:263)
        at java.base/java.nio.file.Path.of(Path.java:147)
        at java.base/java.nio.file.Paths.get(Paths.java:69)
        at com.compomics.cli.peptide_mapper.PeptideMapperCLI.handleError(PeptideMapperCLI.java:380)
        at com.compomics.cli.peptide_mapper.PeptideMapperCLI.runMapping(PeptideMapperCLI.java:467)
        at com.compomics.cli.peptide_mapper.PeptideMapperCLI.handleParameters(PeptideMapperCLI.java:364)
        at com.compomics.cli.peptide_mapper.PeptideMapperCLI.main(PeptideMapperCLI.java:81)

One empty line at the end of the file seems ok, though. Adding two at the end, or one in the middle, yields the above error.
It may not be obvious why the crash occurs to new users.
Maybe this can be fixed or yield a better error message?

Metadata

Metadata

Assignees

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