PROBIC / mSWEEP

mSWEEP High-resolution sweep metagenomics using fast probabilistic inference
MIT License
13 stars 2 forks source link

--read-likelihood crashes #37

Closed jnalanko closed 3 days ago

jnalanko commented 4 days ago

Hi,

I'm trying to run mSWEEP with precomputed log-likelihoods. It is crashing here:

Thread 1 "mSWEEP" received signal SIGSEGV, Segmentation fault.
main (argc=6, argv=0x7fffffffe138) at mSWEEP/src/mSWEEP.cpp:365
365       log_likelihoods->from_file(reference->n_groups(i), &infile.stream());

The reason for the crash is that log_likelihoods is a null pointer. It seems that it never gets initialized because it's initialized only when computing the likelihood matrix, which doesn't happen since I'm using pre-computed likelihoods. I think it should be initialized to some empty initial value in order to call from_file, but I'm not sure which likelihood template should be used here, so I could not fix it myself yet.

tmaklin commented 3 days ago

Thanks for the report! This happens regardless of the size of the input, right?

jnalanko commented 3 days ago

Not sure, but I found a way to patch this (see pull request).

jnalanko commented 3 days ago

(That pull request also fixes another uninitialized pointer which was causing a crash.)

tmaklin commented 3 days ago

great, this is now fixed in v2.2.1