-
Notifications
You must be signed in to change notification settings - Fork 86
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
Segfault with BetaCoalescent
and ploidy greater than diploid
#2307
Comments
fwiw I can recreate a similar error on msprime 1.3.1 on my mac laptop, although it's telling me |
Confirmed also on Linux, v 1.3.1. Investigating. |
Well the problem is a pretty straighforward. We assume there are at most four "pots" to assign lineages into here: Line 8013 in 657fc8d
But a few lines later we set Line 8025 in 657fc8d
@JereKoskela can you comment here please? Is the correct thing to do here just to malloc Q with num_parental_copies and not just 4 (easy). We would need to do some statistical validation as well I think, as this has clearly never been tested for e.g. triploids. |
Fixes segfault reported in tskit-dev#2307
#2308 fixes the segfault. I'd need some help in figuring out whether it's actually doing the right thing, though. |
Making Statistical validation is not totally straightforward because this is the only implementation for ploidy > 2 of which I'm aware. We could estimate moments of TMRCAs of n = 2, for which the expectation and variance are easy to compute for various ploidies, say 1, ..., 6. |
That sounds great - would you be able to pick this up if I merge #2308? I'll push out a bugfix release in the next couple of days, as we don't really want segfault bugs lying around. |
Sure, I'll put something together. Go ahead and merge. |
Great, thanks a lot. I'll push out the bugfix once we're reasonably sure that the fix works. |
Fixes segfault reported in tskit-dev#2307
The following snippet gives me a segfault:
The text was updated successfully, but these errors were encountered: