https://bugs.kde.org/show_bug.cgi?id=333759

--- Comment #2 from Aetf <7437...@gmail.com> ---
Hi, I'm looking into this bug right now. It seems the bug still exists in the
latest version.

The exact steps to reproduce is as follow:
1. Debug some application
2. Pause the debugger
3. Collapse the variable list or hide the variables tool view
4. Switch to another frame, i.e. frame 1
5. Expand the variable list or show the variables tool view
6. *Important*: switch back to the same frame as in step 2

Actual Results:
Variables for frame 1 are shown

Expected Results:
Variables of the currently selected frame should be shown


The reason for this is that internally `IVariableController` keeps track of the
current active frame/thread and only updates variables when active frame/thread
changes. However, when variables list is hidden, the active frame/thread is not
updated. Thus if the user changes frame in this case, the active frame/thread
value remains what it was before the variables list is hidden. Then after
making variables list visible and changing the frame again to the previous
frame, `IVariableController` thinks there is not change at all and skips the
update.


The attached patch fixes this issue by removing the whole tracking active
frame/thread logic. This logic was introduced in 57b2d64f to make sure locals
are updated only once. However, with the code evolving, other situations where
update might be called with frame/thread unchanged are gone and the above is
the only one left, which in fact also doesn't require such logic. Given this
tracking logic makes no benefits but bugs only, I removed it in the patch which
also fixes the bug.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to