Skip to main content
Inspiring
November 24, 2011
Answered

iOS app crashes on return from cameraUI - a memory allocation problem?

  • November 24, 2011
  • 25 replies
  • 22772 views

hey all

trying to finish my first app

when running on iOS, the app SOMETIMES crashes after returning from cameraUI (either "use"/MediaEvent.COMPLETE or "cancel"/Event.CANCEL).

when i exit some other running apps on my iPhone 3Gs (and not that many are open), the problem goes away, which makes me think this is some memory allocation problem

in that aspect, can i trust the iOS to exit inactive applications to allocate more memory for my, currently active, AIR app?

(there is no memory leak)

this is an iPhone 3Gs running os version 4.3.5

the app was made with Flash Pro 5.5 overlayed with the AIR 3.1 sdk, and deployed using the "deploy for app store" type (which should be the most bug-free)

(no crashes on Android or desktop versions)

anyone had this cameraUI problem or a similar one where an app crashes if more then some numbers of apps are open?

thanx

Saar

This topic has been closed for replies.
Correct answer sanika Kulshreshtha

Hi,

Thanks for reporting the bug. This issue is known to us and it is currently under investigation. As far as I know, there is no workaround.

Regards,

Sanika

25 replies

Inspiring
July 2, 2012

I get this sometimes crash when returning from the sms composer (native extension).

Participant
July 2, 2012

Are you using sms composer extension with Phone Gap or Flex mobile?

Inspiring
July 2, 2012

im not using phone gap but what exactly is flex mobile. ?
My app is mobile air iOS app made with flash cs6.
thankyou

Participant
April 20, 2012

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.

Participant
May 17, 2012

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???

Participant
May 17, 2012

Yes, this is still an issue.  I have a bug opened in bugbase here:

https://bugbase.adobe.com/index.cfm?event=bug&id=3134550

Participant
April 20, 2012

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.

Participant
February 29, 2012

Great news Sanika!

I'll make an update and send to App Store, thanks

Edit: Did a lot of tests and no crashes, almost uncanny timing  since I got notified about the camera crashes yesterday

February 28, 2012

Yes, this latest 3.2 release seems to have resolved this for me too (iphone 3gs). Thanks Adobe.

Participating Frequently
February 29, 2012

Hi,

The AIR 3.2 SDK available on labs has the fix for the CameraUI crasher. In case any of you are still able to reproduce the bug in any scenario, please file a new bug with the sources and the steps to reproduce the bug.

Thanks,

Sanika

February 29, 2012

Thanks, Sanika!

Another successful report here.  I have been unable to reproduce the bug with AIR 3.2.

Participant
February 28, 2012

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?

Inspiring
February 27, 2012

http://labs.adobe.com/technologies/flashplatformruntimes/air3-2/

Can we PLEASE get an update on whether the above addresses these issues?

Inspiring
February 27, 2012

Using CameraUI we were lucky to take a single photo on an iPhone 4S.  Building against 3.2, I have tested taking 20 pictures in succession without a crash.

February 27, 2012

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?

February 24, 2012

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.

Participant
February 23, 2012

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....

Participating Frequently
February 23, 2012

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!