infinite loop in metastats?

Hi! I’m just helping someone run Mothur 1.33.3, and it looks like metastats is getting stuck in an infinite loop at mothurfisher.cpp:165. The loop looks like this:

for(j=max-1; p<0.99999999*prob; j–)
{
sright += p;
p=myhyper(j);
}

What seems to be happening is that j becomes negative, causing the exp() function at mothurfisher.cpp:95 to always return zero (possible underflow?), and so the above loop condition (p<0.99999999*prob) is always met. Do you have any insight on what might be causing this, and whether you think it is a user error or code issue? Thanks so much!!

– Haruna :slight_smile:

This code was from the original developers, but we haven’t seen this problem before - could you send us an example where it is getting triggered? Sorry for the delay!

Did anyone find a fix for that?
I have the same problem but it seems to be dependant on the design file I am using…

ALSO, the exact same files will not work in v1.34.4 they will work just fine in 1.31.2 so probably just some bug
let me know if you want me to send you the files!

If you can send us an example dataset that is doing this, we can take a look. Please include the url to this post so we can connect the issue.
Pat

Thanks for reporting this bug. The fix will be part of 1.35.0.