# Flash player crash after closing SWF

**URL:** <https://forum.kirupa.com/t/flash-player-crash-after-closing-swf/317498>\
**Category:** flash\
**Created:** [December 22, 2010, 7:01pm UTC](https://forum.kirupa.com/t/flash-player-crash-after-closing-swf/317498 "2010-12-22T19:01:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeonardLew](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@LeonardLew](https://forum.kirupa.com/u/LeonardLew)\
**Post date:** [December 22, 2010, 7:01pm UTC](https://forum.kirupa.com/t/flash-player-crash-after-closing-swf/317498/1 "2010-12-22T19:01:51Z")

</div>

Hey there,  
so I was having this weird phenomenon in a rather complex flash app, that even though the app worked fine and didn’t throw any errors, it just crashed the flashplayer upon closing the SWF…  
I first thought that there was something in my code, that I was doing something wrong in my code, but I now have my app stripped down to this:

```auto
 package 
{
	import flash.display.MovieClip
	import flash.media.Camera
	import flash.media.Video
	
	public class exposure_main extends MovieClip
	{
		private var cam:Camera;
		private var vid:Video;

		public function exposure_main()
		{
			setupCam();
		}
		
		private function setupCam():void
		{
			cam = Camera.getCamera();
			cam.setMode(640, 480, 30);
			vid = new Video(640, 480);
			vid.attachCamera(cam);
			this.addChild(vid);
			
		}

	}

}

```

So really just the most basic of webcamapps, and it still crashes everytime I close the SWF.

This happens to me on multiple computers with multiple webcams. Am I doing something wrong here or did I encounter an unfortunate bug?

Any help would be very much appreciated.

Leo
