You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Phil Haeusler (Created) (JIRA)" <ji...@apache.org> on 2012/02/20 13:27:34 UTC

[jira] [Created] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

camera.getPicture() CRASH when repeatedly called on iOS
-------------------------------------------------------

                 Key: CB-264
                 URL: https://issues.apache.org/jira/browse/CB-264
             Project: Apache Callback
          Issue Type: Bug
          Components: iOS
    Affects Versions: 1.4.0
         Environment: PG 1.4.1 on iOS
Crash on iPhone4S, iPad2 and iPod Touch
            Reporter: Phil Haeusler
            Assignee: Shazron Abdullah


We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.

We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  

We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.

We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.

https://gist.github.com/1868997


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Phil Haeusler (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13214166#comment-13214166 ] 

Phil Haeusler commented on CB-264:
----------------------------------

Reports from users indicate that running the app built against the latest trunk has solved the crashing problem.  We will continue to monitor.
                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Thomas Anderson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286301#comment-13286301 ] 

Thomas Anderson edited comment on CB-264 at 5/31/12 4:35 AM:
-------------------------------------------------------------

I'm hitting the same issue reported by Phil - I'll receive an EXC_BAD_ACCESS crash after my second camera picture.  I see several threads on Stack Overflow about it being related to an object being double deallocated, if it helps.

http://stackoverflow.com/questions/327082/exc-bad-access-signal-received
http://stackoverflow.com/questions/2024266/help-debugging-iphone-app-exc-bad-access
http://cocoadev.com/wiki/DebuggingAutorelease

[EDIT]  I am using Cordova 1.6, so I'll try 1.7 and hopefully the fix at https://issues.apache.org/jira/browse/CB-391 will cover it.
                
      was (Author: anderson.thomas82):
    I'm hitting the same issue reported by Phil - I'll receive an EXC_BAD_ACCESS crash after my second camera picture.  I see several threads on Stack Overflow about it being related to an object being double deallocated, if it helps.

http://stackoverflow.com/questions/327082/exc-bad-access-signal-received
http://stackoverflow.com/questions/2024266/help-debugging-iphone-app-exc-bad-access
http://cocoadev.com/wiki/DebuggingAutorelease
                  
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "sandstrom (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229242#comment-13229242 ] 

sandstrom edited comment on CB-264 at 3/14/12 3:00 PM:
-------------------------------------------------------

Looks like I might have tracked down the error (though I must test some more to be sure). If my early results hold, the error was caused by triggering `navigator.camera.getPicture` from a <button> element instead of an <a> element, probably coupled with inclusion of emberjs, handlebars or jquery. Sounds so weird that I hardly believe it myself, but just swapping the element type seem to work.

I've tried to isolate the error but haven't managed, so I guess it's some combination of the above that causes the problem.

Shazron Abdullah thanks for helping me in trying to solve this problem! Your attention to the problem is much appreciated.
                
      was (Author: sandstrom):
    Looks like I might have tracked down the error (though I must test some more to be sure). If my early results hold, the error was caused by triggering `navigator.camera.getPicture` from a <button> element instead of an <a> element, probably coupled with inclusion of emberjs, handlebars or jquery. Sounds so weird that I hardly believe it myself, but just swapping the element type seem to work.

I've tried to isolate the error but haven't managed, so I guess it's some combination of the above that causes the problem.
                  
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Phil Haeusler (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13214054#comment-13214054 ] 

Phil Haeusler edited comment on CB-264 at 2/22/12 10:26 PM:
------------------------------------------------------------

I've now actually built our app against the trunk code (having refactored from PG to CDV) and we haven't seen it crash again.  We'll continue to get our users to test again over the next day, but fingers crossed we won't see it again.

                
      was (Author: philhaeusler):
    I've now actually built our app against the trunk code also now (having refactored from PG to CDV) and we haven't seen it crash again.  We'll continue to get our users to test again over the next day, but fingers crossed we won't see it again.

                  
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Shazron Abdullah (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227824#comment-13227824 ] 

Shazron Abdullah commented on CB-264:
-------------------------------------

Hmm, that looks like a WebKit crash. Can you check whether you get any memory warnings in your console log?

Fundamentally, this is a WebKit bug that cannot be worked around currently (it does not release memory of images that a not used anymore). I did extensive measurements by loading huge images in a previous project, and it consistently crashes because of this bug. 
 
I believe it has been reported to the WebKit project, with no resolution:
https://bugs.webkit.org/show_bug.cgi?id=31253
https://bugs.webkit.org/show_bug.cgi?id=39628
 
Usually, setting the image src to null I think would flag the gc to recycle the memory, but I don't think it will work because of this bug.
 
Others have the same problem, from the Apple Dev Forums (login needed):
https://devforums.apple.com/search.jspa?resultTypes=MESSAGE&q=UIWebView+memory&peopleEnabled=true&start=1&dateRange=all
 
There are purported "workarounds" in some of the posts (I don't remember which) and I've tried them all – with no success.

I however, haven't tried the workarounds or re-tested this bug with iOS 5.1.

                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "sandstrom (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sandstrom updated CB-264:
-------------------------

    Comment: was deleted

(was: I can confirm that we have this error too. Haven't seen it in the iOS Simulator but very frequently when running on my phone (iPhone 4S).

Though there are a few minor differences it's more or less the same code we've used with Phonegap 1.0 for a couple of months without any problems.

It seems like the problem occur when a second picture is being taken, the first one typically works. I've got very little experience with Objective-C, but the backtrace output is the following: http://pastie.org/3578048

Let me know if I can provide more information or elaborate on the problem.)
    
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "sandstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13228645#comment-13228645 ] 

sandstrom commented on CB-264:
------------------------------

I don't get any memory warnings, and I've used the same code in Phonegap 1.0 where it worked without any problems. Are you sure it's a memory issue, or could my problem be something different from what Phil Haeusler initially reported?

Here's a complete log output, i.e. no memory warnings:
http://pastie.org/private/eibyhlfmskncnexmf8hsg
                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Shazron Abdullah (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13228758#comment-13228758 ] 

Shazron Abdullah commented on CB-264:
-------------------------------------

Your dump shows the crash (accessing a dealloc'ed item most like) occurring in WebCore, which is in the WebKit framework, which we have no control of. The memory issue is real as well, it has happened in quite a few of my apps.

The crash looks similar to what this user had when using some JavaScript without cordova.js (see whole thread):
https://groups.google.com/forum/?fromgroups#!topic/phonegap/5JWBz_UNSOQ


                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Shazron Abdullah (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah resolved CB-264.
---------------------------------

    Resolution: Won't Fix
    
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Thomas Anderson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286301#comment-13286301 ] 

Thomas Anderson commented on CB-264:
------------------------------------

I'm hitting the same issue reported by Phil - I'll receive an EXC_BAD_ACCESS crash after my second camera picture.  I see several threads on Stack Overflow about it being related to an object being double deallocated, if it helps.

http://stackoverflow.com/questions/327082/exc-bad-access-signal-received
http://stackoverflow.com/questions/2024266/help-debugging-iphone-app-exc-bad-access
http://cocoadev.com/wiki/DebuggingAutorelease
                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Shazron Abdullah (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13213949#comment-13213949 ] 

Shazron Abdullah commented on CB-264:
-------------------------------------

I just tried your sample code with the trunk code (slated for 1.5.0), and I couldn't get it crash even after 10 photos taken in succession on my iOS 5 iPhone 4S. 

Could you please try again after completely rebooting your device? My hunch is UIWebView ran out of memory - it has issues with freeing memory generally. Check your Run Log to see if there are memory warnings.


                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287018#comment-13287018 ] 

Shazron Abdullah commented on CB-264:
-------------------------------------

@Thomas please do test and let us know.
                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "sandstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229242#comment-13229242 ] 

sandstrom commented on CB-264:
------------------------------

Looks like I might have tracked down the error (though I must test some more to be sure). If my early results hold, the error was caused by triggering `navigator.camera.getPicture` from a <button> element instead of an <a> element, probably coupled with inclusion of emberjs, handlebars or jquery. Sounds so weird that I hardly believe it myself, but just swapping the element type seem to work.

I've tried to isolate the error but haven't managed, so I guess it's some combination of the above that causes the problem.
                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "sandstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227579#comment-13227579 ] 

sandstrom commented on CB-264:
------------------------------

I can confirm that we have this error too. Haven't seen it in the iOS Simulator but very frequently when running on my phone (iPhone 4S).

Though there are a few minor differences it's more or less the same code we've used with Phonegap 1.0 for a couple of months without any problems.

It seems like the problem occur when a second picture is being taken, the first one typically works. I've got very little experience with Objective-C, but the backtrace output is the following: http://pastie.org/3578048

Let me know if I can provide more information or elaborate on the problem.
                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Timur Celikel (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224455#comment-13224455 ] 

Timur Celikel commented on CB-264:
----------------------------------

Hey Shazron, 

thanks for looking at the issue. 

We just used exactly the code which was uploaded by Phil and he mentioned in his post without any further modifications apart of using the cordova 1.5rc1 instead of PhoneGap 1.4.1. Additionally we also have the problem in our app. It seems to be the exact same problem. 

Importent to mention though is that it sometimes works without problems. On the 3GS it happens much more often than on the 4S. On the 3GS it nearly always happens if you dont close some other apps before or have a fresh reboot. On the 4S it happens if I start some ram-hungry apps directly before like garage band, animoog, etc (opening them directly after each other and then taking a photo with the sample app lets it crash regularly).

I am not that deep into App developing but to me it seems it happens if the ram is too full. Observing the ram usage with instruments we saw that taking photos takes a lot of memory, especially if the allowEdit is set to true and on the peak in crashes.

I read that in theory apps on iOS should not be be influenced by the ram taken by other apps so I am curios if this observation is true.  

                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Shazron Abdullah (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-264:
--------------------------------

    Fix Version/s: 1.6.0
    
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Shazron Abdullah (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-264:
--------------------------------

    Priority: Critical  (was: Major)
    
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Timur Celikel (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220299#comment-13220299 ] 

Timur Celikel commented on CB-264:
----------------------------------

We also have this issue with our app we are developing at the moment. We tried PhoneGap 1.4.1 and Cordova 1.5 rc1. We copied and pasted the whole code Phil Haeusler posted and we where easily able to reproduce the crash on an iPhone 3GS and 4S as well. 

Before it crashes we get a memory warning and and then it says EXC_BAD_ACCESS. It hardly depends on how many apps where started before, if there is some heavy stuff loaded before we just need one picture to provoke it, in other cases we have to shoot pictures more frequently. In our case it only crashes while touching the use-button and not before or after.
                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Shazron Abdullah (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223675#comment-13223675 ] 

Shazron Abdullah commented on CB-264:
-------------------------------------

Timur - it would be helpful if you had some sample code that reproduces this issue so that we are on the same page. With Phil's sample code in the gist - I could not reproduce the issue.
                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "sandstrom (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227580#comment-13227580 ] 

sandstrom commented on CB-264:
------------------------------

I can confirm that we have this error too. Haven't seen it in the iOS Simulator but very frequently when running on my phone (iPhone 4S).

Though there are a few minor differences it's more or less the same code we've used with Phonegap 1.0 for a couple of months without any problems.

It seems like the problem occur when a second picture is being taken, the first one typically works. I've got very little experience with Objective-C, but the backtrace output is the following: http://pastie.org/3578048

Let me know if I can provide more information or elaborate on the problem.
                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Timur Celikel (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238244#comment-13238244 ] 

Timur Celikel commented on CB-264:
----------------------------------

Hey, 

just saw some news recently that reminded me of our problem here. There is some discussion going on about Mobile Webkit's weakness with bit jpg < 2mp because it became very visible with the new iPad. Safari then scales it down instead of crashing. For normal websites it can be resolved by using progressive jpeg. Might it be something similar we have a problem with here? And if yes, might there be a similar solution?

http://duncandavidson.com/blog/2012/03/retina_web_thoughts

Regards
                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Phil Haeusler (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13214054#comment-13214054 ] 

Phil Haeusler commented on CB-264:
----------------------------------

I've now actually built our app against the trunk code also now (having refactored from PG to CDV) and we haven't seen it crash again.  We'll continue to get our users to test again over the next day, but fingers crossed we won't see it again.

                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "sandstrom (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227580#comment-13227580 ] 

sandstrom edited comment on CB-264 at 3/12/12 2:54 PM:
-------------------------------------------------------

I can confirm that we have this error too. Haven't seen it in the iOS Simulator but very frequently when running on my phone (iPhone 4S).

Though there are a few minor differences it's more or less the same code we've used with Phonegap 1.0 for a couple of months without any problems.

It seems like the problem occur when a second picture is being taken, the first one typically works. I've got very little experience with Objective-C, but the backtrace output is the following: http://pastie.org/3578048

Could it have something to do with changed defaults in recent Xcode versions (we use 4.3.1)?

Let me know if I can provide more information or elaborate on something.
                
      was (Author: sandstrom):
    I can confirm that we have this error too. Haven't seen it in the iOS Simulator but very frequently when running on my phone (iPhone 4S).

Though there are a few minor differences it's more or less the same code we've used with Phonegap 1.0 for a couple of months without any problems.

It seems like the problem occur when a second picture is being taken, the first one typically works. I've got very little experience with Objective-C, but the backtrace output is the following: http://pastie.org/3578048

Let me know if I can provide more information or elaborate on the problem.
                  
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-264) camera.getPicture() CRASH when repeatedly called on iOS

Posted by "Shazron Abdullah (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227956#comment-13227956 ] 

Shazron Abdullah commented on CB-264:
-------------------------------------

In a nutshell, aside from releasing and re-creating the UIWebView - there is not much we can do with this WebKit bug. Looking like a "Won't Fix" since this is an external issue outside Cordova's control.
                
> camera.getPicture() CRASH when repeatedly called on iOS
> -------------------------------------------------------
>
>                 Key: CB-264
>                 URL: https://issues.apache.org/jira/browse/CB-264
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: PG 1.4.1 on iOS
> Crash on iPhone4S, iPad2 and iPod Touch
>            Reporter: Phil Haeusler
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.6.0
>
>
> We are experiencing an intermittent crash when calling camera.getPicture() on multiple devices.  The crash can occur either as the pickerController is popped in from the bottom, or after you tap the Use button to accept the picture.  The app requires the taking and review of pictures in a fairly fast manner.  We've found the crash can occur anytime after we've capture only 1 or 2 photos.  Sometimes we go for quite a while without crashing.
> We see that the images captured are stored in tmp/photo_nnn.jpg, but we do not believe we've reached any storage limits here.  
> We are taking the image and displaying it in a <img> - so possibly there is an issue with UIWebView retaining references to previously loaded images, and exhausting it's memory.  But not really sure if that could be an issue.
> We've created a small app that we can crash by repeated taking and viewing images.  There doesn't seem to be anything special about it.
> https://gist.github.com/1868997

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira