List Info

Thread: endless loop fails gracelessly




endless loop fails gracelessly
user name
2007-09-11 05:29:22
Hi everyone,
xray has been having some problems with my movie, and I traced the problem to org.opensourceflash.data.XMLObject. The function parsObject calls itself recursively, and can go into an endless loop if there is one object pointing back up the chain. I know this is not supposed to happen, but a graceful way out would be appreciated, because at the moment the object where the connector is loaded and the xray gui just stop responding.
Has anybody else had experience with this? Any fix out there?
bye
Ariel
Re: endless loop fails gracelessly
user name
2007-09-11 06:17:28
Hey Ariel, I hadn't experienced this yet, but I see where the problem would be if you had a circular pointer like that (which is not uncommon of course)

maybe someone has a fix, but my first thought is to try putting a simple object into XMLObject that stores the objects and then checks for existence before recursion?

On 9/11/07, Ariel Sommeria < sommeria.arielgmail.com">sommeria.arielgmail.com> wrote:
Hi everyone,
xray has been having some problems with my movie, and I traced the problem to org.opensourceflash.data.XMLObject. The function parsObject calls itself recursively, and can go into an endless loop if there is one object pointing back up the chain. I know this is not supposed to happen, but a graceful way out would be appreciated, because at the moment the object where the connector is loaded and the xray gui just stop responding.
Has anybody else had experience with this? Any fix out there?
bye
Ariel

_______________________________________________
xray mailing list
osflash.org">xrayosflash.org
http://osflash.org/mailman/listinfo/xray_osflash.org




--
[ &nbsp;JPG&nbsp; ]
Re: endless loop fails gracelessly
user name
2007-09-12 05:01:11
Hi John,
I9;ve attached a patched version of org.opensourceflash.data.XMLObject that solves the problem. Could you take a look?
I've ran into another problem, for which I have another not so clean fix, but I would like to check with you:
In com.blitzagency.xray.ObjectViewer at line 977 there is the following code:

 &nbsp;   &nbsp;  if(objType == 2)
 ; &nbsp;  &nbsp;  {
 &nbsp;   &nbsp;   &nbsp;  targetPath = String(eval(obj._target));
 ; &nbsp;  &nbsp;   &nbsp;  objPath = targetPath;
 &nbsp;   &nbsp;  }else
&nbsp; &nbsp;  &nbsp;  {
 &nbsp;   &nbsp;   &nbsp;  targetPath = objPath;
&nbsp;    &nbsp;  }

This fails if the object is a MovieClip but its _target property is undefined. So you could replace this by:
&nbsp; &nbsp;  &nbsp;  if((objType == 2) && (obj._target != undefined))
 &nbsp;   &nbsp;  {
 &nbsp;   &nbsp;   &nbsp;  targetPath = String(eval(obj._target));
 ; &nbsp;  &nbsp;   &nbsp;  objPath = targetPath;
 &nbsp;   &nbsp;  }else
&nbsp; &nbsp;  &nbsp;  {
 &nbsp;   &nbsp;   &nbsp;  targetPath = objPath;
 &nbsp;   &nbsp;  }

But I imagine this could fail too sometimes.
What do you think?
Ariel

On 9/11/07, John Grden < neorileygmail.com"> neorileygmail.com> wrote:
Hey Ariel, I hadn't experienced this yet, but I see where the problem would be if you had a circular pointer like that (which is not uncommon of course)

maybe someone has a fix, but my first thought is to try putting a simple object into XMLObject that stores the objects and then checks for existence before recursion?

On 9/11/07, Ariel Sommeria < sommeria.arielgmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> sommeria.arielgmail.com> wrote:
Hi everyone,
xray has been having some problems with my movie, and I traced the problem to org.opensourceflash.data.XMLObject. The function parsObject calls itself recursively, and can go into an endless loop if there is one object pointing back up the chain. I know this is not supposed to happen, but a graceful way out would be appreciated, because at the moment the object where the connector is loaded and the xray gui just stop responding.
Has anybody else had experience with this? Any fix out there?
bye
Ariel

_______________________________________________
xray mailing list
xrayosflash.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">xrayosflash.org
http://osflash.org/mailman/listinfo/xray_osflash.org




--
[ &nbsp;JPG&nbsp; ]
_______________________________________________
xray mailing list
osflash.org">xrayosflash.org
http://osflash.org/mailman/listinfo/xray_osflash.org


  
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )