Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

App REJECTED - Camera crashes app on iPhone4 , iOS 4.1

after having my app sit in itunes connect for 11 days after submitting it, i just got the email saying it was being rejected because it crashes on iOS 4.1 on an iPhone 4 when launching the camera.

They sent me crash logs and they both say this :

Thread 0 crashed with ARM Thread State

Any help would be GREATLY appreciated on what to do to get the app working with iOS 4.1 so that when starting the camera it won't crash. And i'm open to any and all suggestions, checks and help.

thank you!!!!

rocksteady,
danno~

— asked September 19th 2010 by danno watts
  • 4.1
  • camera
  • crash
  • iphone
1 Comment
  • Is this a camera crash on iPhone 4 only? I have an camera-based app I haven't yet submitted which seems to crash on iPhone 4 but not on iPhone 3GS

    — commented September 22nd 2010 by karlo kilayko

12 Answers

  • I'm experiencing the same issue and would love to know if a solution is being worked on. Everything works fine and the picture gets taken, but after saving it everything disappears and the background is the only thing that shows.

    My app is dependent on taking photos, and I can't push my next update until this issue is corrected.

    — answered September 25th 2010 by John Gilfillan
    permalink
    3 Comments
    • I did some further testing. This seems to be an issue with the new HDR function on iPhone 4. The problem doesn't happen when using my iPhone 3GS, and it doesn't happen when using the front facing camera on iPhone 4, both of which don't have HDR enabled.

      — commented September 26th 2010 by John Gilfillan
    • hey john,
      on an iphone4, for it to not crash, they have to have HDR disabled? were you able to have your app run correctly on an iphone4 once you disabled HDR?

      — commented September 28th 2010 by danno watts
    • I haven't been able to disable the HDR, I just assumed that this was the cause because it is the only new camera feature on iPhone 4 that's not available on my 3Gs. It could also be the flash, but the app was working before iOS 4.1 was released (which is where HDR was introduced).

      Still haven't got the problem solved, but it does look like removing modal windows as suggested below works – it just sucks because I need to rethink the way my app works.

      — commented September 28th 2010 by John Gilfillan
  • This code works perfect for me :)

    Titanium.Media.showCamera({
            success:function(event){
                var media = event.media;
                if(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO){
                    upload_image(media);  
                } else {
                    upload_video(media);
                }
            },
            cancel:function(){
            },
            error:function(error){
                var a = Titanium.UI.createAlertDialog({title:'Camera'});
                if (error.code == Titanium.Media.NO_CAMERA){
                    a.setMessage('No Camera!');
                }
                else {
                    a.setMessage('Oops: ' + error.code);
                }
                a.show();
            },
            saveToPhotoGallery: false,
            allowEditing: true,
            mediaTypes:[Ti.Media.MEDIA_TYPE_VIDEO,Ti.Media.MEDIA_TYPE_PHOTO]
        });
    
    — answered March 3rd 2011 by mostafa farghaly
    permalink
    0 Comments
  • bump!

    — answered September 21st 2010 by danno watts
    permalink
    0 Comments
  • I'm developing camera software too, i had your crash experience,
    due to some changes all you need to do is :
    download the latest version nightly build:
    http://builds.appcelerator.com.s3.amazonaws.com/index.html ( you should have a new titanium sdk notification for version 1.4.1.1)

    Delete in your app's folder the content of the build/iphone/ (leave the directory)
    Perform a full re-build… pray…
    that's all
    let me know.

    Andrea

    — answered September 21st 2010 by Andrea S
    permalink
    4 Comments
    • did you test this on an iphone 4 running iOS 4.1?

      — commented September 21st 2010 by danno watts
    • Is this a camera crash on iPhone 4 only? I have an camera-based app I haven't yet submitted which seems to crash on iPhone 4 but not on iPhone 3GS

      — commented September 22nd 2010 by karlo kilayko
    • I've tried this too. No luck. The only thing that makes the camera work on iPhone 4 is turning completely off, then turn it back on.

      — commented October 28th 2010 by Awesome Dude
    • I closed all the running apps on the iphone4 when my app crashed, after that it worked smoothly again. no crash. (back to low-memory crash?)

      — commented November 12th 2010 by Mikael Johansson
  • Anyone else currently experiencing a slow turn around with the App Store approval process? I noticed you said it took 11 days for you.

    I've had an App in the "Waiting for Review" process for eight days now with no change.

    — answered September 21st 2010 by John Welch
    permalink
    3 Comments
    • what day did you submit yours on?

      — commented September 21st 2010 by danno watts
    • September 13, 2010 15:56

      — commented September 21st 2010 by John Welch
    • 10 days for one of my apps

      — commented September 21st 2010 by Dan Tamas
  • i've had one sitting waiting for review since the 14th september and it uses the camera, i'll be pissed if it gets the knock back for crashing.

    I suspect the delay is caused by the relaxing of the rules, and all those people/companies who didn't submit because of things like its a flash port through the adobe thingy will have ran their games etc through the magic flash to iphone mill and banged them in along with all the stuff people had sitting there rejected for random reasons.

    — answered September 21st 2010 by Robert Greenock
    permalink
    1 Comment
    • app approved (O Snap), uses camera a lot, simple app using tables, audio record and playback, camera and no assets except for splash and icon. compiled using:
      version=1.4.1
      timestamp=08/20/10 20:02
      githash=47cd8a
      tested on 3g 8gb iphone(too slow for camera function) - 3gs iphone - latest version 8gb ipod 4g

      — commented September 26th 2010 by Robert Greenock
  • just thought i'd update those who look at this thread that i haven't heard anything else from the accelerator team about this issue. sent them my code folder on sunday night so that they could look at the issue, but i'm guessing they are swamped with so many things that they haven't gotten back to me.

    if any of you can find a way to test this out that would be appreciated!

    rocksteady,
    danno~

    — answered September 23rd 2010 by danno watts
    permalink
    0 Comments
  • On iPhone 4 (iOS 4.0) I had problems using the Camera from a modal window. Essentially, the app would disappear leaving just the background image and no buttons or window title. The app was essentially 'crashed' because you had to force quit it to get it back.

    When I access the camera from a non-modal window it works fine. I just updated to iPhone 4 iOS 4.1 and my existing app with non-modal window works just fine without crashing.

    — answered September 25th 2010 by matt raj
    permalink
    0 Comments
  • Any news on this? Seems like a major flaw with iPhone 4 and not a word from the appcelerator team. I would really love to submit an update for my app to Apple but can't until this gets fixed.

    — answered September 28th 2010 by John Gilfillan
    permalink
    0 Comments
  • Hi,
    I've had an app approved (O Snap), uses camera a lot, simple app using tables, audio record and playback, camera and no assets except for splash and icon. compiled using: version=1.4.1 timestamp=08/20/10 20:02 githash=47cd8a tested on 3g 8gb iphone(too slow for camera function) - 3gs iphone - latest version 8gb ipod 4g,

    I have posted the version of 1.4.1 I compiled with on my me account

    https://public.me.com/masterspee

    password:- appcelerator

    try it and let me know, I'll remove it tomorrow as it's not mine to share but may be useful to you.

    — answered September 28th 2010 by Robert Greenock
    permalink
    2 Comments
    • thanks for this, but is this the titanium mobile sdk that's available from their nightly builds section?

      — commented September 28th 2010 by danno watts
    • it is, but it's from a while back(20/8/10), i reverted to it when the next few nightly builds after it stopped the camera from displaying taken images properly. I know it probably hasn't got a load of fixes on it that they have added, but it worked with itunes 10 my latest ipod 4g running 4.1 and has got me through approval on a camera heavy app.

      — commented September 29th 2010 by Robert Greenock
  • The same problem occurs on my iPhone4. After the camera shuts under low memory, sometimes crashes and sometimes the background becomes pure-white. Whether it was a modal or not.

    Very very annoying. It is fatal for the camera app.

    Any workaround?

    — answered October 23rd 2010 by Toru KOBAYASHI
    permalink
    0 Comments
  • The same problem occurs on my iPhone4. After the camera shuts under low memory, sometimes crashes and sometimes the background becomes pure-white. Whether it was a modal or not.

    Very very annoying. It is fatal for the camera app.

    Any workaround?

    — answered October 23rd 2010 by Toru KOBAYASHI
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.