Interesting little issue I am having here.
Basically I have a method that gets called on ENTER_FRAME. I have some vars that are getting accessed each time and so to save on fetching from the related object (a big performance saver I would think), when I set the related object during initialization I simple set the local vars to those props on the related object.
Problem solved – I forgot that in the relatedObject anytime a resize occurs, the canvas object gets disposed of:
canvas.dispose(); canvas = null; //later on in the resize logic canvas = new BitmapData(targetWidth, targetHeight, true, 0x00FF00FF);
The rendering class had an old and disposed reference to a bitmapData object. Due to the debugger freaking out I didn’t even really think to inspect if the local bitmapData object was the same object in the relatedObject. So what can you take from all this? If you encounter a similar problem, you might check to see if you are calling dispose() on any bitmapData objects.
Has anyone run into this before? I will post more findings as they come. Here is some code to help visualize: