The problem Mishun had few posts earlier seems to be caused by a decimal separator in config.txt. I had this problem too and was able to fix it by replacing . with ,
I believe that in the code values from config.txt are first read as strings and then converted to numbers with function that natively uses OS region/culture settings to parse values. Therefore, if user's OS has region/culture, where decimal separator is anything other than dot (.), values from config end up being incorrect, probably defaulting to zero. There are no errors, mod works, but sex never ends as probabilities are always zero.
Changing values to 1 fixed the problem for Mishun not because it represents 100%, but because 1 doesn't have decimal separator in it.
My system also uses comma as separator and I also had problem with infinite sex. And I was able to fix it by replacing all the dots with commas in config.
TLDR:
if sexEndChancePerSecondRatio=0.004 causes infinite sex, try changing it to sexEndChancePerSecondRatio=0,004