Community
Participate
Working Groups
I noticed with this simple code int a[2] = {0,1}; return a[0]; that if I show the variable view and expand 'a' on line 1 and then step to line 2, the content of a[0] and a[1] does not always show properly. I tracked it down to a race condition that was introduced in the pretty-printing effort, within the state change of the variable object. I'm working on a patch now.
Created attachment 183352 [details] Fix Because we now have a async call when receiving the answer to -var-update, we cannot immediately change the state from STATE_UPDATING to STATE_READY. We have to wait until the async call is completed to set the state, so that we ensure the varObj is not read before we've finished processing the result of -var-update. Committed to HEAD. Jens, does it look good to you?
Fixed
*** cdt cvs genie on behalf of mkhouzam *** Bug 330289: [variables] Race condition when updating a variable object [*] MIVariableManager.java 1.17 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIVariableManager.java?root=Tools_Project&r1=1.16&r2=1.17
(In reply to comment #1) > Created an attachment (id=183352) [details] > Fix ... > Jens, does it look good to you? Yes, looks much better now. Thanks.