1

Using Flare3D, i run into error #3694 when the player (when compiling within flash) is resized, or when i run it in a browserpage and then lock wy (windows) machine and unlock it again.

The error is: "The object was disposed by an earlier call of dispose() on it."

I did some searching and found some suggestions to check on context3D.driverInfo and skip rendering if that string equals 'Disposed', but this doesnt seem to work. In my case, that string is either 'Software (embedded)' (when running in flash ide) or 'DirectX9 (Direct blitting)' when running in a standalone player.

Does anyone know what the error is and how to avoid it?

Eindbaas
  • 945
  • 1
  • 8
  • 16

1 Answers1

1

I had the same problem, googled, found your question... and it helped me figure out the answer :)

You probably have a resize handler that is called when the anything resizes the stage. And it tries to change the size of the stage3D back buffer.

While the stage is being resized the context3D.driverInfo == "Disposed". When you finish resizing it goes back to normal.

So instead of something like this:

context3D.configureBackBuffer(stageW(), stageH(), 0, false);

Try:

public function onResizeStage(event:Event) { 
    if (stage3D == null) {
        return;
    }           
    if (context3D == null) {
        return;
    }
    if (context3D.driverInfo == "Disposed") {
        return;
    }
    context3D.configureBackBuffer(stageW(), stageH(), 0, false);
}
DavidColquhoun
  • 153
  • 1
  • 6
  • Sorry... just figured out a bit more. So when you resize the stage, the resize event gets called while you're resizing, with the driverInfo being Disposed. When you've finished resizing the stage... the Stage3D Event.CONTEXT3D_CREATE event will be called again. – DavidColquhoun Oct 21 '12 at 08:55