AIR app crashes on iOS after returning from CameraUI photo capture

So, I've been running into this problem in one way or another for as long as we've had CameraUI access. It seems that each time another version of AIR comes out Adobe claims the problem has been fixed, and each time I find that the problem hasn't. So, here we go:
I'm running an AIR 3.4 application on a range of devices: iPod Touch (previous generation), iPhone 5, iPhone 4S, iPhone 4, and iPad 2. All the test devices are loaded with the latest version of iOS. On every one of them, if the user takes a few photos in a row the application crashes by quietly returning to the desktop. On Android devices, the same happens when I take even a single photo. In fact, when running the application in the debugger I can see that the process terminates not when the app returns from CameraUI, but as soon as the native Camera is invoked.
This problem has been going on forever. What is the fix?

Just going on your original post about Android quitting as soon as the camera is invoked I did a quick test.
FB Test code:
package
    import flash.display.Bitmap;
    import flash.display.Loader;
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.Event;
    import flash.events.IOErrorEvent;
    import flash.events.MediaEvent;
    import flash.media.CameraUI;
    import flash.media.MediaPromise;
    import flash.media.MediaType;
    public class TestingCameraRoll extends Sprite
        private var cam:CameraUI;
        private var _imgNum:int = 1;
        public function TestingCameraRoll()
            super();
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align = StageAlign.TOP_LEFT;
            addEventListener(Event.ACTIVATE, _onActivated);
        protected function _onActivated(event:Event):void
            removeEventListener(Event.ACTIVATE, _onActivated);
            trace("App activated, starting camera.");
            cam = new CameraUI();
            cam.addEventListener(Event.CANCEL, _captureMobileCancel, false, 0, true);
            cam.addEventListener(MediaEvent.COMPLETE, _captureMobileComplete, false, 0, true);
            cam.launch(MediaType.IMAGE);
        protected function _captureMobileComplete(event:MediaEvent):void
            trace("_captureMobileComplete: " + event.type);
            var mp:MediaPromise = MediaPromise(event.data);
            var imgLoader:Loader = new Loader();
            imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, _imgLoadHandler);
            imgLoader.addEventListener(IOErrorEvent.IO_ERROR, _errHandler);
            imgLoader.loadFilePromise(mp);
        protected function _imgLoadHandler(event:Event):void
            trace("imgLoadHandler - width:" + event.target.width + " height:" + event.target.height);
            var bm:Bitmap = new Bitmap(Bitmap(event.target.content).bitmapData);
            bm.width = stage.fullScreenWidth;
            bm.height = stage.fullScreenHeight;
            bm.name = "img_" + _imgNum++;
            addChild(bm);
            trace("Added image: " + bm.name);
            cam.launch(MediaType.IMAGE);
        protected function _captureMobileCancel(event:Event):void
            trace("Capture cancelled")
        protected function _errHandler(event:Event):void
            trace("Error: " + event);
All that does is continuously request to take a picture and then dump it on the display list at full size. I didn't do proper size/orientation compensation, I just sized down so I could verify it took the photo. The goal was to #1 successfully load the camera, #2 take a picture, #3 receive the data, #4 pile them up in full resolution (albeit scaled) on the display list without crashing.
My SGS3 started to get slow after 15 pictures but here's the trace:
App activated, starting camera.
[SWF] TestingCameraRoll.swf - 3,029 bytes after decompression
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_1
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_2
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_3
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_4
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_5
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_6
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_7
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_8
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_9
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_10
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_11
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_12
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_13
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_14
_captureMobileComplete: complete
imgLoadHandler - width:3264 height:2448
Added image: img_15
Capture cancelled
App never crashed, and this is running in debug mode. That's 15 8MP full size images stacked on the display list.
I use AIR 3.5 release on this (3.5.0.600, not even the latest 3.5.0.880).

Similar Messages

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

    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

    I don't get this. Its beyond frustrating:
    we are not talking about using an uncommon phone capability, access to a phones camera is about the most basic native level of access you would be looking for in a mobile framework
    we are not talking about an edge case in usage, just trying to take a simple picture consistently
    we are not talking about a feature issue where it doesn't quite work the way you want, it crashes the whole app hard! 
    we are not talking about a hard to recreate, only happening to a few people case - it seems from what I have read the Camera integration is fundamentally broken and I have spent days researching this and only found frustration from people out there
    we are not talking about an issue that does not have consequences - in several places on this forum and others people have emphasized how it is affecting their platform decisions, ability to submit apps. You even have people on this board recommending that not to use Flex Mobile and move to other platforms. Not what you want to be happening to when you are at the adoption phase of a new product.
    And that is the response - on this thread and here http://forums.adobe.com/message/4125590#4125590 - we know its an issue but we don't know when it will be fixed and no proactive communication on status - only a growing body of people like me getting increasingly frustrated. What does it take for an issue to be a show stopper? priority 1? affecting customer decisions priority?
    In my case I am in place where I am trying to make a platform decision and since this experience has happened I have subscribed to the live feed for this forum and as many relevant Adoble blogs, news feed etc. as I could find. I did this to get a feel for how well Adobe is supporting the mobile development on the AIR platform. Something increasingly important given recent decisions.
    My perception so far is quite poor especially for a recently released product, i.e. 4.6 release. In fact the release that finally addresses performance enough to make AIR mobile development a risk free decision. You would expect Adobe to be all over the boards like this - with core developers, platform experts contributing actively. My perception, rightly or wrongly, is of a community trying to support itself without much help, or clear communication from Adobe. In fact if you look at the the articles coming out of Adobe recently its all phonegap, html5 etc. It does not fill you with confidence for the future.
    To be clear - I have had a great experience with actionscript, flex etc and as a company we have developed the backend portion of our platform solely on Flex. I don't believe that we could have done it any other way and even now when I look at the alternatives for web development I feel vindicated in our decision.
    However, this rant is caused by a genuine frustration and fear. I don't expect this to get a meaningful response but maybe if there are enough voices it will create an overall improvement.
    Sean

  • Power manager crashes after returning from standby mode.

    I have a T400 2767 WU6 running Windows 7 Pro-64bit.. After returning from standby mode, power manager crashes (version 3). All the software installed is supposed to be compatible with win7 pro 64bit.
    Any help would be greatly appreciated.

    Does this issue appear from the beginning?
    Possibly the OS was installed several time ago and now the registry entries are corrupt.
    Therefore the system busy egg timer could appear.
    Im not 100% sure it will help but possibly you should reinstall the whole OS
    On the fresh installed OS all should works much faster

  • What causes an AIR app crash (non-error type)

    Gidday guys
    Pretty general question, but I'm curious as to what I should be looking for if...
    - I randomly get the Test Movie Terminated message when compiling or running a desktop AIR app from Flash Pro IDE
    - the installed AIR app crashes/terminates randomly from no apparent reason?
    No compiler errors or warnings are generated.
    Cheers

    'The most important thing to notice is the red line. This represents the budget time that you have to keep below on each frame, if you’re to meet the framerate you want to achieve. For example, on a SWF running at 30 frames per second (fps), you have a budget of 33ms per frame (1000ms / 30 frames). In other words, if you spend more than 33ms per frame, your application will start stuttering and skipping frames, which you really don’t want to happen!'
    Does that mean when I'm coding, I should be making sure that functions etc are complete before the frame finishes? ie if my project is 12 fps, a function should never take longer than 83ms to complete?
    no, (and going over budget wouldn't crash flash).  going over budget means flash is not able to maintain the targeted frame rate.  go over budget enough and you'll see your display stutter instead of maintain smooth animation.  that's not relevant to a data app and not relevant to a crash problem.
    you want to check the memory use and see if it is relentlessly increasing as you use your app.  in particular, what's scout tell you when your app crashes.
    My project isn't frame really specific - ie there's no animation or frame reliant graphics in particular. It's a data based app.
    Does it just mean that my display will slow down if I'm jamming more processing in that a frame can handle, and should I be worried about it if my display isn't particularly important?
    no, that's not a problem.

  • Browser not connecting after returning from sleep, but email and imessage working fine

    My Browsers are not able to access the Internet after returning from sleep. This effects other browsers (Firefox & Chrome) as well. The connectivity from mail and iMessage is working fine. I am also hardwired and not using WiFi.

    I have the same problem since updating to Yosemite, works fine after restarting but once it goes in to sleep it affects email as well as browsers, I have a broadband connection. Also accessing the app store is hit and miss, it's either working or simply not not working.
    It also affects other devices trying to connect to the internet over wifi via the airport time capsule, the problems started after installing Yosemite.

  • My iphone 4S has problem in making and receiving the calls. While making the call , call fails and netwrok disappears. Like wise no voice is heard for incoming calls. This happened after return from the overseas travel.

    My iphone 4S has problem in making and receiving the calls. While making the call , call fails and netwrok disappears. Like wise no voice is heard for incoming calls. This happened after return from the overseas travel.

    Hello SamSax
    Check out the assist page below for troubleshooting call connectivity.
    Calls and connection issues
    http://www.apple.com/support/iphone/assistant/calls/
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • Mouse stutter and UI unresponsiveness after returning from standby

    Hi guys, after upgrading to Leopard the mouse pointer on my 15" MBP stutters after returning from standby. Weird thing is that this happens only after it was in standby for awhile, maybe 5 to 10 minutes. If I return from standby after a few seconds the stutter does not happen. I can only resolve this with a restart. This did not happen in Tiger. Is there anyone else experiencing this?

    Well I had this problem. Did a fresh install of Leopard a week and a bit ago and it seemed to run much better. Set my machine up how I like it and it's back to how it was. I didn't setup my Dashboard right away so maybe your onto something. I'll have to try and force myself to not use it for a bit and see how it goes.
    We should collect a list of 3rd party widgets as I think initially with the default 4 on display it was fine.
    I've only got 4 other than the standard Apple supplied ones.
    - iStat Pro 4.2
    - TV Forecast 2.3
    - Amazon Album Art 2.12
    - Application Update 1.5.8
    Now both iStat Pro and TV Forecast claim to be Leopard compatible. Amazon Album Art also mentions improved Leopard support was added in version 2.11. Application Update doesn't claim to be but seems to work fine. However I think this was the last widget I added and a few days after the others. I think it was fine with the other three so I might try removing it and seeing what happens.
    Still I'd love to know what other Widgets you guys have. Maybe we all have the a similar one which we can narrow down to being the cause. Or maybe it's not 3rd party widgets at all but the Dashboard as a whole. Still I'm more likely to think it's a 3rd party widget.

  • Lose Wifi after return from in Mountain Lion

    Ever since I installed Mountain Lion on my 2011 27" iMac, I lose WiFi connection after returning from sleep and I Have to do a restart.  Not happy.

    http://osxdaily.com/2012/08/02/fix-os-x-mountain-lion-wireless-connection-proble ms/

  • How to automatically actualize UWL after return from WebDYNPRO?

    Hello,
    in the universal worklist (uwl) i have configured a workstep to open a Web Dynpro application instead of the SAP GUI. This works fine and i can process the Workflow.
    But after processing of workstep I returns to the UWL using
    WDPortalNavigation.navigateAbsolute(          "ROLES:portal_content/tm.eop.fd.eop_root/tm.eop.fd.content_root/tmcz.eop.fd.tmcz_root/tmcz.eop.fd.my_workspace/tmcz.eop.ro.my_workspace/my_workspace/tmcz.eop.iv.uwl",          WDPortalNavigationMode.SHOW_INPLACE,
                        (String) null,
                        (String) null,          WDPortalNavigationHistoryMode.NO_DUPLICATIONS,
                        (String) null,
                        (String) null,
                        (String) null);
    In the UWL there is non relevant item (item that was processed in WebDynpro) and it angers users.
    It is possible to actualize UWL automatically after return from WebDYNPRO application? WebDYNPRO is opened in the same window and frame as UWL.
    Thanks for your help.
    Ondrej Lednicky

    Followed what vinay and Timo sugguested:
    One solution is to use a af:dialog in the popup where you define a dialogListener  to catch the outcome of the dialog and if it's OK you call your other method.
    I wrote method code in back bean like this:
        public void refreshBillFromDialog(DialogEvent dialogEvent) {
            // Add event code here...
            if (dialogEvent.equals(false)){
                return;
            AdfFacesContext adfFacesContext;
            adfFacesContext = AdfFacesContext.getCurrentInstance();
            adfFacesContext.addPartialTarget(Bill4NewReceiptPending);
            //actionEvent.getComponent().processUpdates(FacesContext.getCurrentInstance());
            BindingContainer bindings2 = getBindings();
            System.out.println(" refreshBillFromDialog:bindings2: "+bindings2);
            OperationBinding operationBinding2 = bindings2.getOperationBinding("ExecuteWithParams");
            Object result = operationBinding2.execute();
            if (!operationBinding2.getErrors().isEmpty()) {
                 return ;
    And it works: the adf table(Bill4NewReceiptPending) in the calling page will be refreshed after the dialog popup was closed!
    Thank you all!
    What's more, I found even if I use bounded workflow calling instead of using popup dialog calling, the  returnListener wasnot executed either.
    And there is still a issue in the popup Dialog: The strange behavior of checkbox selection, see the thread:
    Why the page cannot refresh correctly after making checkbox selection?
    I tried and put aside for some days, and have no idea yet.
    Can anyone give helps?
    Thanks!

  • Network issues after returning from sleep mode

    I'm noticing this issue on T440, Twists, T420s, whether it's Windows 8, Windows 8.1 or Windows 7.  Sometime around the end of last year and the beginning of this year, my users suddenly started reporting problems with the machines after returning from sleep mode.  The network adapter (whether plugged in or using wifi), would show limited connectivity and would not connect to the internet until the machine is rebooted.
    I've tried updating drivers, using system restores, disabling the network adapters from shutting down to conserve power, OS network diagnosis & network adapter resets, none of which has worked.  Hibernation is disabled on all machines.
    The only fix I have is to reinstall the OS over the top of the system and reinstall all updates.  Looking for help with this issue.
    Thanks!
    Solved!
    Go to Solution.

    Hi Mertz74,
    Thank you for replying us back!
    Please check with uninstalling power manger and reinstall it with latest driver.
    Download chipset driver from Lenovo drivers page and install it.
    Please check with above option to resolve the issue.
    Below is the link to enter the downloads page and download updates accordingly, please click on "Select Product" then in "QUICK PATH" enter the MTM no. select the exact model.
    http://support.lenovo.com/en_US/downloads/default.page#
    Hope this helps. Do post back if issue persists!
    Best regards.
    Hemanth Kumar
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • How to keep the current http session after returning from external web site

    Hi,
    When I use the response.sendRedirect api to redirect the web page to the external payment site, after payment and return back to the current application, I found that the current http session is lost.
    How to keep the current http session after returning from external web site?
    Thanks

    You should make your sidebar1 and sidebar2 fixed positioned. Make your content DIV fluid.
    This should help you: http://www.glish.com/css/7.asp

  • Unable to refresh parent swing  form components after returning from child

    Hi,
    Not able to refresh the parent swing form components after returning from the child form.
    I am having problem in setting/resettig values to the parant swing form components after returning from child form. In parent form, I am entering values in some of the fields and clicking on Search button in parent form which will open a child window with the search results in JTable. Now selecting a row and writing the selected data to an ArrayList and returning back to the parent. I am able to see the values in the ArrayList, but not able to set any value to any of the parent form components by using the formtextfield.setText("value").
    Thanks
    Yakshak

    create another project
    a frame with a formattedTextfiled and a button
    the button to open a child window
    in the child window use say a JTextField to simulate a search result (type in some dummy data)
    now add the arraylist code that produces the problem
    if this stripped-down version of your program has the same problem, post all of the stripped-down code,
    so we can see what you're doing.

  • HT4061 I keep getting a message and unable to utilize my iPad after returning from a flight, message states iCloud Backup - This iPad hasn't been backed up in 3 weeks. Backups happen when this iPad is plugged in, locked, and connected to Wi-Fi. Plugged in

    Greetings,
    Any help would be appreciated.
    I keep getting a message and unable to utilize my iPad after returning from a flight, message states iCloud Backup - This iPad hasn't been backed up in 3 weeks. Backups happen when this iPad is plugged in, locked, and connected to Wi-Fi. Plugged in but it is frozen, I keep pressing OK but nothing happens.
    Thank you

    Perform a Reset...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • Cannot clear answers in quiz after returning from jump to slide.

    Hi, I apologize if this has been answered previously. I couldn't find a thread containing the information.
    I recently upgraded from Captivate 6 to 8 (yes, I know...) and when I created the quiz for this project, I have the learners who answer the questions incorrectly going through remediation using the jump to slide on last attempt. The jump to works fine and returning to the quiz works fine. However, when the learner returns to the quiz, the previous incorrect answers are still displayed and the clear button is non-functional. This doesn't allow them to revise their answer and move forward.
    I compared it to a similar project that I created in Captivate 6, and it seems that all the options in the quiz preferences and the question's quiz properties are the same, yet it is working properly in the Captivate 6 project (even when previewed in Captivate 8).
    Am I overlooking something simple here?
    Thanks!

    Indeed, the On Exit event is not to be trusted at all, you need an
    interactive object, that gets a double functionality. In the video it has
    Continue or Return to Quiz, but you can also use 'Go to Next Slide' instead
    of Continue. Sorry that I didn't point immediately to that video. It is
    short but pretty clear.
    2014-12-18 20:45 GMT+01:00 christellek <[email protected]>:
        Cannot clear answers in quiz after returning from jump to slide.
    created by christellek <https://forums.adobe.com/people/christellek> in *Adobe
    Captivate* - View the full discussion
    <https://forums.adobe.com/message/7027618#7027618>

  • Photo.app crashes. Can not delete or sync photos. Stuck!

    On my iPhone 3GS, iOS 4.1:
    Photo.app crashes whenever i try to delete certain photos from my camera roll. It freezes and I have to exit the app with the front botton. I have the crash logs on my computer.
    The iPhone appears in iTunes, however photos do not sync.
    The iPhone does NOT appear in Image Capture, iPhoto, or other photo importing programs.
    Now I am really stuck - ! I have no way to delete the (presumably corrupted) photos from my iPhone!
    If I "Erase all content and settings" from the iPhone, it once again appears (empty) in Image Capture. However, if I then restore the iPhone from a backup, the photo roll is restored and it has the same problem. If I do not restore the iPhone, I lose all my apps, contact info, etc.
    I am an Apple developer (MacOS, iOS) so I have expert skills tackling problems like this, but now I'm stumped!

    I had the same problem and spent 4 hours troubleshooting with Apple Tech Support. We uninstalled and reinstalled iTunes, drivers and checked every setting that had anything to do with my iPhone. As usual I was told that I need to restore my phone which is always my last option. I actually read your post and began to panic as it became clear that even after a reset I would get the same photos back when I synched and restored. Last time that I restored to new it took me 3 solid hours to tweak my phone back to the way it was. When I realized that I was basically screwed and was going to lose my photos I began to email them to myself one at a time. When I got to one picture I discovered that I had found the corrupt photo. I was not able to send it as it turned into a question mark when I tried to send to myself. I tried to delete 50 times but it froze my phone each time and wouldnt remove itself from my camera roll. I tried to select photos but each time that photo appeared in the window the app crashed and shut itself down. I had scheduled an appointment with the genious bar and figured I would call tech suoport one last time before I went through that nightmare and while I was on hold I pluged my phone into my computere and tried to delete the phote while plugged into my laptop and out of nowhere an error window popped up notifying me that my photo app experienced an error and would repair itself which within four seconds it did and the corrupt photo dissapeared. I cant tell you how relieived I was and my phone works perfectly well now. I tried to explain the results to the tech that finally answered but he didn't seem to care that much. I hope this works for you next time.

Maybe you are looking for

  • Getting values from application context

    I want to set an input box with the value from the jsp getRemoteHost() in jsf page.. In my page i have this <h:inputText value="#{sok.Searchstring}">... where the reference sok is a java bean public class sok      private String Searchstring;      pu

  • Webcam not working with adobe air

    hey frnds, i'm trying to capture webcam snaps and storing it on local desktop. Below code of capuring snap is working with flex but same code not working in adobe air. I'm using Adobe Flash builder beta 2 is any setting is required to use webcam with

  • PSE 7 not auto downloading photos

    I can't get the photo downloader to start automatically under Vista with PSE 7. When I go to autoplay options, the downloader is not one of those offered and I can't see how to add it. The downloader works if I start it from within the organizers, bu

  • How do i get to my bookmarks from a split screen?

    i like the split screen because i have a wide screen monitor. however, i don't know how to open a bookmark from the panel that is split? windows 7 professional 64-bit

  • Infoview option missing from interface / Cant run webi report

    Hello all I recently installed XI 3.1 enterprise version on my computer and the installation was sucessful, I can access deski, designer and all other expect infoview (webi). When I try to view sample webi report , I get a message that ' Cannot perfo