Highlighted

Webcamera freezes image in desktop AIR application

Explorer ,
Jul 16, 2015

Copy link to clipboard

Copied

I've developed many desktop AIR applications over the past four years that use the Camera as it's main source of input and have never had any problems. Lately I'm running into a lot of problems with the camera feed freezing and never recovering in newer versions of the AIR runtime.

I do standard Camera.getCamera() requests (both with assigned cameras and just getting the first camera) and attach them to Video objects. But over time, the camera will eventually freeze.

Most of the applications I develop are for museum kiosks or motion reactive installations that must run 16 hours or more at a time. I've never had a problem before until the last few months.

I would post sample code, but I've run into this across multiple applications and multiple systems (all Windows 7 or 8 at this point). I've even written test applications that do nothing but Camera.getCamera() and Video.attachCamera() and put it on the stage that will eventually freeze. I would try to reconnect to the camera, but Flash never releases them once detected so it can never seem to fix itself.

Has anyone else run into this problem? Are there any known fixes for this? Should I be downgrading the AIR runtime I publish with to something from a year or two ago?

Please advise...

TOPICS
Development

Views

1.4K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Webcamera freezes image in desktop AIR application

Explorer ,
Jul 16, 2015

Copy link to clipboard

Copied

I've developed many desktop AIR applications over the past four years that use the Camera as it's main source of input and have never had any problems. Lately I'm running into a lot of problems with the camera feed freezing and never recovering in newer versions of the AIR runtime.

I do standard Camera.getCamera() requests (both with assigned cameras and just getting the first camera) and attach them to Video objects. But over time, the camera will eventually freeze.

Most of the applications I develop are for museum kiosks or motion reactive installations that must run 16 hours or more at a time. I've never had a problem before until the last few months.

I would post sample code, but I've run into this across multiple applications and multiple systems (all Windows 7 or 8 at this point). I've even written test applications that do nothing but Camera.getCamera() and Video.attachCamera() and put it on the stage that will eventually freeze. I would try to reconnect to the camera, but Flash never releases them once detected so it can never seem to fix itself.

Has anyone else run into this problem? Are there any known fixes for this? Should I be downgrading the AIR runtime I publish with to something from a year or two ago?

Please advise...

TOPICS
Development

Views

1.4K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 16, 2015 0
Community Beginner ,
Jul 20, 2015

Copy link to clipboard

Copied

whom freezes? your local camera or the netstream published from your local camera?

the 2nd case is not new to me too but it is not something relatively recent.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 20, 2015 0
Explorer ,
Jul 20, 2015

Copy link to clipboard

Copied

The camera itself is fine, and is freed up to be used by other applications, even different AIR apps. The netstream never recovers and the app has to be restarted. I published my company's main software years ago using AIR 2.6 and have never encountered this error before. That software can run for weeks without being restarted and never has the stream/camera freeze.

I would prefer to be publishing for newer versions of AIR to take advantage of Stage3D and the like, but if the camera feed is going to freeze... I guess I'll need to revert to AIR 2.x or move onto a modern platform.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 20, 2015 0
Community Beginner ,
Jul 21, 2015

Copy link to clipboard

Copied

(my apps where able to work for days and days without restarts only with AVM1, but - back to sw development after 4 years - I'm still investigating and the fact is not related to your post)

after cam freezes - what about your netconnection, is it still up? may be did it reconnected meanwhile? (rfr: uplink disconnections)

btw did you try to recognize via software when your cam freezes its stream and in case re-publish it automatically - just to recover?

I notice a similar behaviour in the videocollaboration app I'm working at: during videotests sometimes a cam freezes. I'm trying to understand what's wrong. seems a similar issue.

I would be curious to listen to other voices: somebody else with an app which works for days and with [similar or contrary] feedback on this issue?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 21, 2015 0
Community Beginner ,
Jul 21, 2015

Copy link to clipboard

Copied

ps I have no issues using Skype, Viber, WebEx, Hangout etc before and after my flash/air video app (but not yet tryed with other air apps)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 21, 2015 0
Explorer ,
Jul 21, 2015

Copy link to clipboard

Copied

I've tried monitoring the netconnection in previous projects, but it either does not indicate a problem or it will not reconnect to the camera.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 21, 2015 0
Community Beginner ,
Jul 21, 2015

Copy link to clipboard

Copied

of course it will not reconnect the camera by itself

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 21, 2015 0
Explorer ,
Jul 21, 2015

Copy link to clipboard

Copied

I try to reconnect it, but it just connects to the same frozen frame.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 21, 2015 0
Engaged ,
Jul 22, 2015

Copy link to clipboard

Copied

I have run into similar problem. But it's not camera problem. It's something else. There is no problem with older AIR versions, only with AIR 18 and (may be) AIR 17. Problem exists only with Windows devices (Windows 8.1 x32 in my case). It works fine with Android.

You can see this problem after about 6-16 hours of application uptime. But it can happens after 1 hour and after 2 days.

Symptoms (sometimes only one, sometimes all of these):

1) Application cannot successfully complete any network or load operations. Any operations that uses URLRequest, URLLoader, Loader, Socket fails even if I try to load local files. But device connected to Internet, no other network problems. Any other applications (non AIR) works fine (even with network).

2) Application "screen freeze" if I use only DisplayList render (don't call clear and present methods of Stage3D context). But screen updates only on some user interaction (touch, click and mouse move).

3) More than 1 simultaneously touches don't work (some of testing devices are Windows tablets, my application use touch interfaces as well).


To fix this problem you need to restart application in my case.


Something like workaround: another time I had this problem I accidentally launch browser from application via navigateToURL:

navigateToURL(new URLRequest("http://adobe.com"));

And problem gone! Without application restarts and so on. Just launch browser from my application via navigateToURL function. Every time I had this problem it works.

It's not workaround in my case (application cannot launch any other processes in real work), but may be it helps Adobe to fix this problem.

My application use Stage3D, DisplayList, network, Sockets and load multiple sound, video and images files.

Tested with 10 different Windows x32 devices with Windows 8.1.

I don't know how to avoid this problem. Adobe, please fix it ASAP. It's very critical.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 22, 2015 0
Explorer ,
Aug 11, 2015

Copy link to clipboard

Copied

Well, I've had no luck with this and from the lack of responses I'll assume either no one else has had these problems or nobody has any solutions.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 11, 2015 0
Contributor ,
Aug 19, 2015

Copy link to clipboard

Copied

On Windows Desktops, with recent versions of the Adobe AIR SDK I have identified an easily reproducible leak related to the camera object and calling the attachCamera method whether it be on a NetStream instance or a Video instance.

https://bugbase.adobe.com/index.cfm?event=selectBug&CFGRIDKEY=3923435

This same memory leak could be affecting you since you are using Camera.getCamera() as well as video.attachCamera(). Eventually the Adobe AIR app crashes in both ADL and the official runtime. The runtime is having an issue disposing of something related to either the camera objects, or the camera -> video handles.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 19, 2015 0
Community Beginner ,
Sep 12, 2016

Copy link to clipboard

Copied

Hi,

I'm experiencing the same issue on a Windows 10 pc on a project built using AIR SDK 21.

It's a captive runtime application that displays the webcam feed.

I can track the issue by attaching a listener to the VIDEO_FRAME event.

_camera.addEventListener(Event.VIDEO_FRAME, onVideoFrame);

Whenever this event isn't fired within a couple of seconds I can conclude that the camera-feed has stopped.

I'm also using Stage3D features.

Did you ever find a solution?

BTW: I'm not experiencing a memory leak.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 12, 2016 0
Community Beginner ,
Sep 12, 2016

Copy link to clipboard

Copied

The same error occurs in the flash player (browser).

kirupa.com - Getting Started with the Webcam

But not when i use HTML5 for displaying the webcam feed.

Accessing Your Webcam in HTML5 | kirupa.com

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 12, 2016 0
New Here ,
Sep 26, 2016

Copy link to clipboard

Copied

I'm running into another issue, leading me to this post. But we also experienced the freezing of the camera.

For us, the fix was to disable power management on the USB ports. This can be done in the Device Manager in Windows. At the bottom you have the USB ports and devices. Right click each one and open properties.

If it displays the "Power Management" tab, it's a USB port.

Uncheck "Allow the computer to turn off this device to save power."

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 26, 2016 0
New Here ,
Sep 27, 2016

Copy link to clipboard

Copied

Unfortunately we'd already unchecked this options but the webcam feed still freezes once a day on average.

The PC autostarts every morning and shuts down in the evening.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 27, 2016 0