On 04/18/2018 03:14 PM, Pavel Sanda wrote: > Pavel Sanda wrote: >> There is something weird going on with our section counters. >> When lyx crashes and leaves emergency file behind, in the next >> lyx run I choose for loading original and removing emergency file. >> The 'original' file is loaded but all counters are wrong, starting >> higher than they should ('5' in this case). > I have MWE. > 1. Save two attached files into single directory and cd there. > 2. $ touch paper.lyx.emergency > 3. $ lyx paper.lyx > 4. Hit 'Load Original' > 5. Hit 'Keep' > 6. Document is loaded, section counter does not start at 1. > > I have a feeling that I was capable to get similar behaviour even without > the emergency file, but can't reproduce it.
So part of this I see now. The second updateBuffer call is due to 8b9d1b860, i.e., the recent fix to #9158. That's why the bibliography inset is essential. I'm not sure why we don't have the extra updateBuffer call in the emergency case, but the real bug is the one just mentioned. Riki