Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--read-likelihood crashes #37

Closed
jnalanko opened this issue Oct 15, 2024 · 4 comments
Closed

--read-likelihood crashes #37

jnalanko opened this issue Oct 15, 2024 · 4 comments

Comments

@jnalanko
Copy link
Contributor

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
Copy link
Collaborator

tmaklin commented Oct 16, 2024

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

@jnalanko
Copy link
Contributor Author

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

@jnalanko
Copy link
Contributor Author

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

tmaklin added a commit that referenced this issue Oct 16, 2024
Initialize pointers (fixes issue #37)
@tmaklin
Copy link
Collaborator

tmaklin commented Oct 16, 2024

great, this is now fixed in v2.2.1

@tmaklin tmaklin closed this as completed Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants