# RTMP Live Stream  and Adobe Air, Sandbox Violation on Bitmap.draw

**URL:** https://community.wowza.com/t/rtmp-live-stream-and-adobe-air-sandbox-violation-on-bitmap-draw/39233
**Category:** Wowza Streaming Engine
**Created:** [August 31, 2012, 8:52am UTC](https://community.wowza.com/t/rtmp-live-stream-and-adobe-air-sandbox-violation-on-bitmap-draw/39233 "2012-08-31T08:52:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![George\_Sharara](https://avatars.discourse-cdn.com/v4/letter/g/ccd318/32.png) [@George\_Sharara](https://community.wowza.com/u/George_Sharara)
#### Post date: [August 31, 2012, 8:52am UTC](https://community.wowza.com/t/rtmp-live-stream-and-adobe-air-sandbox-violation-on-bitmap-draw/39233/1 "2012-08-31T08:52:39Z")

</div>

I have an Adobe Air application which plays a LIVE stream from a Wowza server.

My Air application captures video frames and uses them as textures in a 3D scene.

The problem is, I have an **intermittent** error

```auto
(Error #2123: Security sandbox violation)

```

, when I call Bitmap.draw() on the video component.

If I stop the stream and reconnect every 4 seconds (random time), on the N-th time, the Bitmap draws successfully. Once it draws successfully It works all the way through, until I next time I need to load a LIVE stream.

The problem does not occur with recorded, streams, so I’m convinced its not a configuration problem i.e. in application.xml or crossdomain.xml

The current situation:

- I have set videoSampleAccess to true (\*)

- I have loaded the crossdomain policy file.

- Not drawing image when video buffering

- 

PS: When I am running in debug mode, the problem NEVER occurs.

Could someone please suggest a solution.

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [August 31, 2012, 5:09pm UTC](https://community.wowza.com/t/rtmp-live-stream-and-adobe-air-sandbox-violation-on-bitmap-draw/39233/2 "2012-08-31T17:09:05Z")

</div>

You are probably doing Bitmap.draw in a NetStatusEvent handler right when you getting some NetStream notification. There’s a trick to this, you need to add a little timeout, then do it. It can be a few milliseconds.

Richard

---

<div class="post-metadata">

### Author: ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)
#### Post date: [August 31, 2012, 7:04am UTC](https://community.wowza.com/t/rtmp-live-stream-and-adobe-air-sandbox-violation-on-bitmap-draw/39233/3 "2012-08-31T07:04:46Z")

</div>

Hi gdotTheKing,

I wish I could help, but these are the Wowza support forums. Your issue doesn’t appear to be a Wowza side problem. Certainly there is not a certain video frame which differs in security from the others. Your best bet is to investigate this using the Adobe Air support resources.

---

<div class="post-metadata">

### Author: ![George\_Sharara](https://avatars.discourse-cdn.com/v4/letter/g/ccd318/32.png) [@George\_Sharara](https://community.wowza.com/u/George_Sharara)
#### Post date: [September 18, 2012, 8:47am UTC](https://community.wowza.com/t/rtmp-live-stream-and-adobe-air-sandbox-violation-on-bitmap-draw/39233/4 "2012-09-18T08:47:34Z")

</div>

@Randall: My assumption was that there might be some setting on Wowza I’m overlooking, because I’m not having the problem with FMS.

@Richard: I have an onEnterFrame event handler which does the drawing. I wait till the video is loaded and completely buffered before attempting to capture it.
