Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] exception updating variable children count

i also encounter this now and then in the _javascript_ engine.
Most of the time it is a problem that _javascript_ client part doesnt return the right values that first a child count did report
or that i am playing with filters (like show function) then it also goes wrong

Would love to have a good solution for that that the last call for children updates everything.

Also talking about this, why is it that it gets ALL the variables at once? the whole tree?
that is pretty huge in our script engine. For example the globals node if i didnt expand that why is it prefilled?

johan


On Wed, Jul 9, 2008 at 3:07 PM, Jae Gangemi <jgangemi@xxxxxxxxx> wrote:
hello all -

  i keep getting an exception thrown when the code tries to update the children count for python objects. i've tracked down the issue and it seems that for some values returned by the python engine, the children count is less than the available children count. the ScriptValue object's 'variables' field is initialized to be the size of 'property.getChildrenCount', and 'fillVariables' is making a call to getAvailableChildren and an ArrayOutOfBoundsException ends up being thrown b/c the 'variables' array ends up being too small.

  you can see this behavior for yourself by using the attached python script. just set a breakpoint on line 21 (myobject = getObject(1)) and then 'step over'.

  the attached patch fixes this behavior by checking to see if the 'childrenCount' of the dbgp property is less then the number of 'availableChildren' (instead of checking to see if it's less then 0), and if yes, then it sets the 'childrenCount' = availableChildren. as far as i can tell, this change does not seem to negatively impact any of the other debuggers, but perhaps there is a better solution for this.

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



Back to the top