1

I am having a problem with an old flash application. Through out the life of the application it opens and closes several NetConnections. This works OK until the last connection needs to be created, as soon as I call new NetConnection() the browser crashes with the following Error in log:

Faulting application name: iexplore.exe, version: 9.0.8112.16421, time stamp: 0x4d76255d
Faulting module name: Flash11g.ocx, version: 11.1.102.63, time stamp: 0x4f4c3a2f
Exception code: 0xc0000005
Fault offset: 0x0022e4fb
Faulting process id: 0x378
Faulting application start time: 0x01cd0b5c61ea285f
Faulting application path: C:\Program Files\Internet Explorer\iexplore.exe
Faulting module path: C:\Windows\system32\Macromed\Flash\Flash11g.ocx
Report Id: b48eea61-774f-11e1-8a5a-0019d19a2ae1

The application was running OK before and it runs OK when I play it using the Flash Player Projector. Any ideas???

Julio Garcia
  • 1,904
  • 16
  • 26

1 Answers1

0

I've found there to be an issue with initializing NetConnections right before NetStreams. Always initialize your NetConnections in advance and in a separate function from your NetStreams.

Here's an example where if I put all this code in the init() function, Flash Player would crash, but by initializing NetConnection in my Class's constructor, everything plays fine:

    public function VideoView(url:String)
    {
        this.url = url;

        netConnection = new NetConnection();
        netConnection.connect(null);

        video = new Video(960, 480);
        video.smoothing = true;
        this.addChild(video);
    }

    public function init():NetStream {
        netStream = new NetStream(netConnection);
        video.attachNetStream(netStream);
        return netStream;
    }

    public function play():void {
        netStream.play(url);
    }

For me the crash only occurred while doing other things at the same time that may have invoked garbage collection, like calling unloadAndStop on another swf that had been loaded in.

Good Luck!

funrob
  • 619
  • 6
  • 13