Skip to main content
September 19, 2012
Question

A script in this movie is causing Adobe Flash Player to run slowly.

  • September 19, 2012
  • 1 reply
  • 23605 views

I'm using Windows XP

Flash player 11,3,300,257

“A script in this movie is causing Adobe Flash Player to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?”

public function getMembersCount(channel:String=''):*{

          if(typeof netGroups[channel]=='undefined') {

                    return;

          }

          return netGroups[channel].netGroup.estimatedMemberCount;

}

Launching this code from js every 3 seconds via setInterval via ExternalInterface. After 80 intervals it drops this popup window with that message, blocking every flash application in all Google Chrome tabs, even youtube stops playing!

Interesting, calling this function doesn't  trigger popup even after 179 times:

public function helloworld(str:String=''):*{

     return 'Hello world!';

}

So the problem is in NetGroup itself or ExternalInterface?

How to avoid this popup?

It seems there is some threshold check somewhere. Popup appears after exactly 46th iteration, if i'm stopping iterations manualy after 45 iteration this popup isn't displayed.

If i'm stopping iterations after 45 iteration even for 10 minutes and then resuming it's throwing this popup window right away.

Tools for debugging this will be welcome.

This topic has been closed for replies.

1 reply

sinious
Brainiac
September 19, 2012

Built-in debugger should be ok, Flash Builder debugger would be better. Something is feeding data into 'netGroups'. The fact that a 'get' function on an objects property is causing that is very unlikely.

What exactly is netGroups a parsed data structure of (how large is this NetGroup) and is whatever is populating and updating it (unless the default) interfacing with other services whether it be over TCP, UDP, HTTP->Script (esp database), etc?

Are you listening for all netStatus events from the NetGroup?

September 19, 2012

Debugger doesn't drop any exceptions.

public var netGroups:Object = new Object();

s is s:Object options from JS for group creation

next is:

var Group:Object = new Object();

Group.filters=s.filters;

Group.specifier = new GroupSpecifier('some_name');

Group.netGroup = new NetGroup(netConnection,Group.specifier.groupspecWithAuthorizations());

Group.netGroup.addEventListener(NetStatusEvent.NET_STATUS,netStatus);

 

// /** Save group **/

netGroups[Group.channel] = Group;

NetGroups just store NetGroup instances to avoid garbage collection and easier access.

Nothing is updating NetGroup, i'll check everything related to them and to collection itself.

I'm listening to
NetGroup.Connect.Success

NetGroup.Connect.Rejected

NetGroup.Connect.Failed

NetGroup.Posting.Notify

NetGroup.Neighbor.Connect

NetGroup.Neighbor.Disconnect

NetGroup.SendTo.Notify

Not listening to replication events and multicast, because don't use them yet.

Only NetGroup.LocalCoverage.Notify is empty. Don't know what exactly description in documentation means...

"Sent when a portion of the group address space for which this node is responsible changes."

Anyway, why is this popup window is appearing? What are the criteria, circumstances of it's appearance?

sinious
Brainiac
September 19, 2012

You're halting Flash from continuing to process frames. Infinite loops or recursion, network connect timeouts and trying to execute excessive amounts of code on a single frame will bring up the dialog. There is a setting in Flash Pro publish settings for this dialog (File->Publish Settings->Flash (.swf) Settings->Script time limit (15 seconds by default).

If a network connection is attempted (especially on windows) that fails and a timeout exceeds 15 seconds the script may halt. I've hit this walls tons if I attempt to use sockets and don't set the timeout much higher.

In your situation I would absolutely validate a response returned from flash and never request information again until I get a valid response. Flash may delay sending a result or you're not validating it and your loop just continues to mercilessly ask Flash for information but Flash won't respond and then, there's your dialog.