[regression] default starting ease factor for new profiles is 130%

I just noticed that my partner’s profile (created on Anki 2.1.33) had a starting ease factor of 130% in the default option group (and I set up her Anki install and definitely didn’t modify this) and clicking “Reset Defaults” results in the correct default ease factor (250%) being used. I just double-checked and if I create a new profile in Anki 2.1.33 the default option group of the default deck has an ease factor of 130% (and hitting “Reset Defaults” switches it back to 250%).

Not sure when this regression was introduced but this is pretty bad because it means that someone’s entire deck might have an exponentially larger hardness than they expect (and there isn’t a nice user-friendly way of fixing this – even if you modify the ease factor in the database manually the existing intervals will still be based on the old ease factor).

EDIT: This was introduced in Anki 2.1.28.

1 Like

git bisect narrows it down to this commit which migrated the deck configuration to protobuf. I’ll take a look to see where the bug is. This means this bug affects Anki 2.1.28 and later. My reproducing test case is basically just:

% rm -rf ~/.local/share/Anki{,2}
% make run

And then check what the starting ease factor for the default option group is. This means the schema isn’t being converted or anything, it’s a completely fresh collection and deck.

2 Likes

I’ve figured it out. The bug was that the method of converting between schema 11 and 15 of the deckconf mistakenly divided and multiplied the conversion by 10 rather than 1000 – meaning that the Python code which eventually sanity-checks the starting ease factor caps it at 1300. A simple fix is a two line patch which I’ve just sent a PR for – though I’m not sure how this will affect existing databases. This affected scheduled cards even if the data wasn’t saved to the database because the Python code which retrieved the default ease factor would still do the 1300 cap.

Short version – there was a brain-fart on two lines where 2.5 (raw factors) was being converted to 2500 (tenths of a %) and instead just converted it to 25 (2.5*10) which is treated as 2.5% but Anki doesn’t allow it to go below 130% so it sets it to 130%.

This was fixed in the 2.1.34beta2, btw.

The stable release of 2.1.34 is now available with a fix for this.

1 Like