Overview: --------- On start PulseView loads only every other decoder stack (which were saved on previous exit). This results in loosing half of the decoders on every exit/open, eventually leaving only one. Steps to Reproduce: ------------------- 1. Add several decoders using the toolbar button and menu. No need for setting them up. 2. Close PulseView 3. Run PulseView again Result: ------- Only every other decoder has been restored. More details observed: ---------------------- On exit, PulseView saves decoder stacks into a registry key that corresponds to the session tab, e.g. HKEY_CURRENT_USER\Software\sigrok\PulseView\Session0\decoder_stack0 HKEY_CURRENT_USER\Software\sigrok\PulseView\Session0\decoder_stack1 etc. Each decoder stack key is given a number starting at 0. It works OK. However, on start PulseView reads that info and loads decoder stacks - but only those with even numbers. In other words, it skips every other decoder stack. For example, if there are 5 decoder stacks saved to registry, numbered 0, 1, 2, 3 and 4, only stacks 0, 2 and 4 will be loaded. Build Date & Platform: ---------------------- This applies to the Windows nightly build on Jan 31st 2017 downloaded from http://sigrok.org/wiki/Windows page (why is there no file version info in the exe?).
Cause for the bug is here: http://sigrok.org/gitweb/?p=pulseview.git;a=blob;f=pv/session.cpp#l323 for (int i = 0; i < stacks; i++) { settings.beginGroup("decoder_stack" + QString::number(i++)); Obviously, i should only be incremented once. Obviously, it wasn't obvious to me that I messed that up :) Will be fixed as part of my upcoming patch set.
*** Bug 833 has been marked as a duplicate of this bug. ***
Fixed in 88870fffb650365d2ece97e41981ad78fec06600, thanks!