8 Replies Latest reply on Aug 25, 2009 2:08 AM by sentromed

    Security sandbox violation with localTrusted sandbox.

    sentromed Level 1

      Hi experts!
      I am Windows developer and recently I installed flash player 10.

      I am testing Socket class with localTrusted sandbox.


      I am connection to the server that is not respond. When I get IO_ERROR, I remove listener and the reference to the Socket. In some socket timout, I get the following error:


      Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: test.swf cannot load data from


      It is not clear for me at all, why removing listener and reference to the socket, flex core (socket core, socket lib, do not know how to name), having reference to the socket, wants to call SECURITY_ERROR handler.


      Here is my simple code. Test not fails, but in about 10 seconds I get the error.


      public class SocketTest extends TestCase
              private var sock:Socket;
              private function ioErrorHandler(event:Event):void
                      sock.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
                      sock = null;
              public function testRequestHomePage():void
                      sock = new Socket();
                      sock.addEventListener(IOErrorEvent.IO_ERROR, addAsync (ioErrorHandler, 2000),false,0,true);
                  sock.connect('', 0);




      PS. It does not metter I use week or strong reference. I will get the same error if I remove ',false,0,true' in addEventListener.