richtretola - Can you take multiple pictures in succession? It appears to be a memory leak issue that requires multiple uses of the camera to crash. We've had the issue on the iPhone 4 and 4S but not the 3GS.
perhaps I should have gone into more detail. Of course everyone here works for software companies but i would think most of you work for companies that create software for the end user using flex and flash. The company I work for is more like adobe in that it provides a software tool for users to create content with, rather than creating software that is the content itself if that makes sense.
It may be a basic feature, but it's not a priority as a feature over others. Like I said, the majority of apps do not use the camera. So it gets placed lower down the pecking order. That's understandable. I don't think it demonstrates a lack of care to the community, it's just about getting your features prioritized and it would seem that this one is less of a priority than others.
I want it fixed too because I have an app that requires it that I can't finsih yet, but I'm just saying I have sympathy with them and not being able to communicate a release. Mostly the people who have time to post on here aren't the people who have the full control of that release so it's difficult for them to answer the question.
For those of you having a problem, are you running with an embedded AIR runtime, or separate download?
Here is what I am seeing (I am running with embedded).
On my stock vanilla 3GS, which has never had any apps installed, I can never reproduce the behavior. It works flawlessly, no matter how many pictures I have taken (I have tried 20 or so).
On a friend's 3GS, he had the problem initially, but after closing a few apps everything worked just fine.
4S seems to have much more persistent problems, but I am still checking that.
Maybe obvious, but I found however that there's a clear correlation between opened apps and how fast my iphone 4S crashes when using the cameraUI. So it's definitely a memory related problem.
Close down all running apps first and I can take several pictures until the problem occur. Have a lot of programs running in the background and the crash might come immediately.
But I guess it's only Adobe who can fix this problem for us anyway...
Did I forgot to say please? Please!
I am having the same troubles, though I actually haven't crashed it myself, the client has. They report it happening on iOS and android. I believe the suspect phones are all HTC, if that means anythiing. Using captive runtime with air 3.1. App is pretty much complete except this and scheduled for release in a few weeks....
I have a hard time reproducing the problem. I have to open a ton of apps, then open 8 safari windows. That will make it happen reliably, but after that it may fix itself on the next run or not. If I close some apps, the problem doesn't show up again, no matter what I do (short of opening a bunch of apps again)
Unfortuately, I am out of options, and I'm abandoning the Flex platform and moving native. I don't know if anyone from Adobe is listening, but the stability of this platform leaves much to be desired.
http://labs.adobe.com/technologies/flashplatformruntimes/air3-2/
Can we PLEASE get an update on whether the above addresses these issues?
This sounds promising, but I wouldn't count your chickens too soon.
As long as too many apps are open, I have never had anything crash. If I get a crash and then close some apps, the camera works forever for me.
Can you try loading up the iPhone with a top of open apps, and a full load of Safari pages and see if you can get a crash?
I'm willing to try with the new runtime, but I don't see how to make Flashbuilder use the newer runtime. Any suggesitons?
I don't mean to stress you guys, but I've released a app already on appstore, and the whole point of the app is to take pictures of houses so that you can add screenprotection.
Here's the link to the app: http://itunes.apple.com/us/app/markisguiden/id501972251?mt=8
Currently, I'm getting a _lot_ of complaints from users that report the app crashing when they're taking pictures, and I'm looking like a fool now for choosing air ![]()
I would like to know if 3.2 fixes this?
Just loaded up an iPhone 4 on which I was also experiencing the same issue (crash on almost every pic taken). Loaded up about 10 apps above what I already normally had open, including a full set of pages in Safari.
Still was able to take 20 pictures without a crash.
In order to use the current Air 3.2 release candidate in your own build you should follow these instructions:
Keep in mind that while this is a release candidate, it is not the final release of Air 3.2. Although Adobe is encouraging the use of this build in a production environment, you should exercise caution before deploying an app to the App Store / Android Market using this build.
I know the title of this thread is iOS specific, but people have been reporting the same exact bug in Android in the thread as well. I just want to caution people reading this thread for any reason, that the new runtime doesn't fix the Android bugs.
But this has been a major waste of time -- all that time learning Actionscript. It was an attractive idea to have one codebase for each platform, but not worth it for such a bloated runtime, and an apparent lack of support for the breadth of platforms. Even this recent runtime fix has been in running since early November. I could understand this if I was doing something exotic, but crashing simply on a return from the camera?
Yes, i still have the same bug in Android (SGS2, ICS 4.0.3).
Just crashes to desktop when i press the button with the check-sign (select).
my code is below. I never get the "Camera UI Complete", i just return to the desktop.....
I will try to publish this to iOS in order to see if it works there..
private function onComplete_cameraUI(e:MediaEvent):void {
trace("Camera UI Complete!!!");
}
private function onClick_takePicture(event:MouseEvent):void {
if (CameraUI.isSupported && !ui) {
ui = new CameraUI();
ui.addEventListener(MediaEvent.COMPLETE, onComplete_cameraUI);
}
if (ui) {
ui.launch(MediaType.IMAGE);
}
}
Here's a thing:
I have the same problem while testing on a Samsung Galaxy Tab using AIR 3.2 (havn't tried 3.3 Beta yet). Changing the camera settings has no effect (i.e. using low-res image still crashes app). However, if I switch the render mode to CPU then the crash doesn't occur. Unfortunately, then the rest of my app runs much slower. Vexing to the max.
Ah-ha!
Here's a fix that's resolved this issue for me (see previous post):
Simply call System.gc(); at the point in your code where the data is returned from the CameraUI. This forces garbage collection (generally you are advised against doing this) and free up enough memory so that app no longer crashes.
Big up to Dan Gronell of DLG Software for this post: http://dlgsoftware.com/AIRAndroidMemoryIssues.php which is where I gleaned this nugget of wisdom.
Surely this is something that Adobe could factor into the CameraUI for the next AIR release to make it more stable so that this hack (and it is a hack) is not necessary.
Any of you guys still getting this error with Android devices? I have implemented the System.gc() ; hack and even with this my app crashes to the phone's desktop. I'm testing on a DroidX with 500mb of RAM. What I think is happening is that my total memory even before I run the app is only 79M available of 404M. Running my app and selecting an image from the photo roll is almost an immidiate crash.
The only resolution I can find is to look at my running programs and shutdown all existing running programs on my droid and then rerun app and then usually it doesn't crash. I'm starting to think this problem might have more to do with mobile devices not having sufficient enough memory in the first place.
In my findings if it is related to memory RAM on devices and not memory leak issues then Adobe is not going to be able to do much if anything about it.
Thoughts???
OK... well here is some further info I dug up. I just got off the phone with Verizon and their two newest phones are Razor's Edge and Razor which apparently are both using 1G RAM. So they should be OK, but for the majority of us Android users were probably on DroidX/2 or older Android devices. So were running nomore than 500MB of RAM. The tech guy told me you can't just replace or upgrade the RAM on these devices. This being the case then were right back to where we started. The manufacures can't update the devices and unless you buy a brand new phone your basially screwed.
So why did Adobe release Camera Roll, Camera functionality in the first place if this is a prevelant problem on almost all Android devices at or under 500MB? They should have just left the camera functionality out of the API all together and called it unsupported until they got this all straightned out. There is no excuse for Adobe to have release camera support in the AIR API for Android when this issue is so easily replicated.
Anyone have any ideas on how to get around this problem? I'm completely out of ideas after a couple months of banging my head against the wall. It looks like Adobe is the only ones that can fix this now.
FYI.. The System.gc() hack helps but does not prevent the issue.
I used the latest sdk release and resized my photos after taking them and it eliminated the problem. When I ran my app through some performance testing tools I found that each photo was eating up huge amounts of memory. In addition I made sure to dispose some objects manually as well as force the garbage collector and all seems well now.
North America
Europe, Middle East and Africa
Asia Pacific