dnbaker / dashing2

Dashing 2 is a fast toolkit for k-mer and minimizer encoding, sketching, comparison, and indexing.
MIT License
62 stars 7 forks source link

Specifying `--verbose` tends to give segmentation fault #60

Closed BenLangmead closed 2 years ago

BenLangmead commented 2 years ago
$ dashing2 sketch --verbose
#Calling Dashing2 version v2.1.11-1-g3b71 with command '/home/blangme2/scr16_blangme2/langmead/dashing2/dashing2-64 /home/blangme2/scr16_blangme2/langmead/dashing2/dashing2-64 sketch --verbose'
Segmentation fault (core dumped)
$ dashing2 cmp --verbose
#Calling Dashing2 version v2.1.11-1-g3b71 with command '/home/blangme2/scr16_blangme2/langmead/dashing2/dashing2-64 /home/blangme2/scr16_blangme2/langmead/dashing2/dashing2-64 cmp --verbose'
Segmentation fault (core dumped)
dnbaker commented 2 years ago

I don't think there's a verbose option currently. We could add it in (maybe change the VERBOSE_ONLY macro to be controlled by a runtime parameter instead of a macro) or add in some logging and control it via a flag.

dnbaker commented 2 years ago

This should be fixed now. (The --verbose option doesn't do anything currently, but there's no segfault.) Similarly, there is now a check for unexpected CLI arguments, so an error will be thrown instead of SEGV.