Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] concurrency issue updating variablesview

Hi,

I am working on the highlighting changed values right now, so this issue will be fixed too.

Regards,
Alex

Johan Compagner wrote:
Hi,

i notice when i have a for loop:

for(var i=0; i<100;i++)
{
     myTest = i;
}

and i place a breakpoint on myTest = i;
then i press F8 (resume) everytime it breaks the variables view isnt updated most of the time

And when i place a breakpoint in for example ScriptStack.readFrames()
then suddenly the variables are always updated.

i tracked it down in the ScriptStack.update():

public void update() {
        this.frames = NO_STACK_FRAMES;
        System.err.println("calling sleep");
        try {
            Thread.sleep(2000);
        } catch (InterruptedException ex) {
            // TODO Auto-generated catch block
            ex.printStackTrace();
        }
        System.err.println("sleep done");

        try {
this.frames = readFrames(thread.getDbgpSession().getCoreCommands());
        } catch (DbgpException e) {
            if (DLTKCore.DEBUG) {
                e.printStackTrace();
            }
        }
    }

i it purely the case how much time the this.frame is on NO_STACK_FRAMES
an other job calls hasFrames() on it. And that must be false for 1 moment.
If that job comes alone and readFrames already is done then the frames is again 1 (or something like that) and then nothing changes and the variables view content provider doesnt get the new top frame.

The thing is that i like to remove that NO_STACK_FRAMES completely
i dont want the variable view to be cleared completely. This causes flickering

The only thing i like to do is after readFrames fire some kind of event that will trigger the same thing
really update the ContentProvider of the VariablesView.
Now that only works on Selection (From something to nothing to the new something)

Shouldnt resume() somehow set the stack frames to nothing? instead of that suspend does that?
I have to digg into this a bit more but has somebody some tips?

johan

------------------------------------------------------------------------

_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev


Back to the top