views:

708

answers:

5

I've got a flex-based swf, which is loading an AS 2-based swf and then, negotiating further activity via a LocalConnection. From time to time, the AS 2-swf can request that the flex-based swf load a movie. I've arranged this via on(release){} functions.

The AS 2-swf, I'm making in Swish Max. In Swish, when i set the on (release) on a text field, (to invoke .send() on my localconnection), it works splendidly. However, when I attempt to perform the same calls for an on(release) attached to a movieclip, it actually causes the Flash player, and even the browser plugin to crash. In fact, the browser (IE) crashes as well.

I checked the debug trace that ie asked me to send to microsoft at the last IE crash, and i noticed a StackOverflow exception embedded deep in the trace, but I couldn't determine its source.

Can you help me understand what's going on here?

+1  A: 

Are you having more than one LocalConnection connect to the same channel? This will cause the browser to crash.

Christopher W. Allen-Poole
so why isn't it happening consistently?
Irwin
Often, if you open the connection, and then try to open the same connection again, it will cause the browser to crash. If you then try to open the same connection AGAIN, it can work because the original object is effectively "destroyed". Also, sometimes Flash's garbage collection will "clean up" the LocalConnection because it no longer referenced in memory, in that case, the connection will have had "close()" called on it, even though it has not been closed explicitly.
Christopher W. Allen-Poole
A: 

Are you sending lots of requests at the same time, this will make it crash, and some browsers are more sensitive for those things than other.

Tim van Elsloo
no, sometimes it crashes from the first button click. It would be great If i could get some detailed crash/exception info.
Irwin
Do you have some additional code in the MovieClip which contains the on(release), which could cause the crash? Comment the code which send the request? Does it crash too now?
Tim van Elsloo
A: 

This earlier post might have some helpful tips for you.

jedierikb
A: 

That's a wrong way to debug your application. Use your Flex Builder's debugging tool instead. You tend to lay blame on LocalConnection as it is the most complex part of the operation, when it could just as easily be an infinite loop.

You don't seem to be using the right tools either. I'd trust FF's FireBug over IE's dump. Besides, we'll need to see some more code before we can accurately tell you what's wrong.

gAMBOOKa
A: 

Are you sure the crash is not only in your computer? Try running the FlashUtil??.exe at \WINDOWS\system32\Macromed\Flash\ to fix/update the Flash installaction. There are some known issues that corrupt Flash installation so it become unstable when using some objects.

Havenard