3 Replies Latest reply on Oct 24, 2007 5:42 PM by preich1

    Flex 3 Beta 2 Debugger Crash

    preich1
      Hello,
      I'm seeing a possible memory leak within ImageSnapshot.captureImage() and also a debugger crash depending on the dpi that I pass to that function.

      This occurs while iterating over the children of a canvas, creating an ImageSnapshot, and writing that snapshot to a file while running / debugging an AIR application within Flex builder 3 beta 2. I've attached a sample application that demonstrates 1. an out-of-memory error and 2. a debugger crash depending on the dpi that's passed to captureImage().

      1. I get an out-of-memory error #1000 when calling ImageSnapshot.captureImage() with a dpi that results in an image size of approx 5800x4400. This error occurs at random locations within captureImage() depending on the dpi that's passed in. Sometimes I can call captureImage() four times before getting out of memory; sometimes more, sometimes less. Is it possible to adjust the heap-size for an AIR application to avoid this. Could this be a result of a memory leak? The documents indicate that captureImage() should be able to produce 8kX8k images as long as they stay within the (256MB) size limit of ByteArray. Shouldn't I be able to write endless amounts of 5800x4400 images?

      2. In the sample application included here. If the dpi is set to 300, the app will loop four or five times and the debugger will then crash.

      Any help on either of the two topics above is appreciate.

      Thanks,
      Pete