barricklab / breseq

breseq is a computational pipeline for finding mutations relative to a reference sequence in short-read DNA resequencing data. It is intended for haploid microbial genomes (<20 Mb). breseq is a command line tool implemented in C++ and R.
http://barricklab.org/breseq
GNU General Public License v2.0
137 stars 21 forks source link

Terminal width of 80 #348

Closed swplotner closed 9 months ago

swplotner commented 1 year ago

when breseq start with a narrow terminal, the following is observable, it outputs the copyright stuff and then hangs on outputting the options.

During the hang, the process is at 100% CPU utilization and won't stop. Doing an strace on the PID reveals nothing hence, no system calls... I attached to the process with gdb and did a single step and that reveals:

0x0000000000470ffc in breseq::AnyOption::word_wrap(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, int) ()

has anyone else observed this?

If I change my terminal to 132 width everything works great invoking breseq, it shows the copyright stuff and the options correctly.

jeffreybarrick commented 1 year ago

Oh jeez. I can reproduce this and will fix it ASAP. I think this explains why my update for Bioconda is failing tests. Thanks!

swplotner commented 1 year ago

I have done a simple "hack" to test this by changing the line: terminal_width = (ws.ws_col==0) ? 80 : ws.ws_col; to terminal_width = 132; in the src/c/breseq/anyoption.cpp and recompiled the code and the hang disappears.

jeffreybarrick commented 9 months ago

Fixed in current version on Bioconda