You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Philip Terman (JIRA)" <ji...@apache.org> on 2012/09/08 12:50:07 UTC

[jira] [Created] (CB-1403) camera.getPicture crashes moto Droid X with large images using DATA_URL

Philip Terman created CB-1403:
---------------------------------

             Summary: camera.getPicture crashes moto Droid X with large images using DATA_URL
                 Key: CB-1403
                 URL: https://issues.apache.org/jira/browse/CB-1403
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 2.0.0, 1.7.0
         Environment: Android 2.3.4, Kernel 2.6.32.9-?
            Reporter: Philip Terman
            Assignee: Joe Bowser


When using navigator.camera.getPicture on Moto Droid X and the DATA_URL option, large return buffers will crash the app at the point of getPicture (generating a toast with force close).  Here's a sample of the code:

    navigator.camera.getPicture(onPhotoDataSuccess, onFail,
        { quality: 100,
            destinationType: Camera.DestinationType.DATA_URL,
            targetWidth: 2048,
            targetHeight: 1536
        }
    );

This code appears to function correctly on other devices we have tested that are running Android 2.3.4.  The issue is only seen on our Droid X devices (we have tried two different Droid X's).

Also, scaling down the image size or removing the image size and lowering the quality to 20 will allow the program to process correctly.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Reopened] (CB-1403) camera.getPicture crashes moto Droid X with large images using DATA_URL

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

Simon MacDonald reopened CB-1403:
---------------------------------

      Assignee: Simon MacDonald  (was: Joe Bowser)
    
> camera.getPicture crashes moto Droid X with large images using DATA_URL
> -----------------------------------------------------------------------
>
>                 Key: CB-1403
>                 URL: https://issues.apache.org/jira/browse/CB-1403
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Docs
>    Affects Versions: 1.7.0, 2.0.0
>         Environment: Moto Droid X, Android 2.3.4, Kernel 2.6.32.9-?
>            Reporter: Phil T.
>            Assignee: Simon MacDonald
>
> When using navigator.camera.getPicture on Moto Droid X and the DATA_URL option, large return buffers will crash the app at the point of getPicture (generating a toast with force close).  Here's a sample of the code:
>     navigator.camera.getPicture(onPhotoDataSuccess, onFail,
>         { quality: 100,
>             destinationType: Camera.DestinationType.DATA_URL
>         }
>     );
> This code appears to function correctly on other devices we have tested that are running Android 2.3.4.  The issue is only seen on our Droid X devices (we have tried two different Droid X's).
> Reducing the image size by lowering the quality to 20 or below will allow the program to process correctly.  This can also be accomplished by shrinking the image size using the targetHeight/targetWidth options.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1403) camera.getPicture crashes moto Droid X with large images using DATA_URL

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

Simon MacDonald updated CB-1403:
--------------------------------

    Component/s:     (was: Android)
                 Docs
    
> camera.getPicture crashes moto Droid X with large images using DATA_URL
> -----------------------------------------------------------------------
>
>                 Key: CB-1403
>                 URL: https://issues.apache.org/jira/browse/CB-1403
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Docs
>    Affects Versions: 1.7.0, 2.0.0
>         Environment: Moto Droid X, Android 2.3.4, Kernel 2.6.32.9-?
>            Reporter: Phil T.
>            Assignee: Simon MacDonald
>
> When using navigator.camera.getPicture on Moto Droid X and the DATA_URL option, large return buffers will crash the app at the point of getPicture (generating a toast with force close).  Here's a sample of the code:
>     navigator.camera.getPicture(onPhotoDataSuccess, onFail,
>         { quality: 100,
>             destinationType: Camera.DestinationType.DATA_URL
>         }
>     );
> This code appears to function correctly on other devices we have tested that are running Android 2.3.4.  The issue is only seen on our Droid X devices (we have tried two different Droid X's).
> Reducing the image size by lowering the quality to 20 or below will allow the program to process correctly.  This can also be accomplished by shrinking the image size using the targetHeight/targetWidth options.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1403) camera.getPicture crashes moto Droid X with large images using DATA_URL

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

Philip Terman updated CB-1403:
------------------------------

    Environment: Moto Droid X, Android 2.3.4, Kernel 2.6.32.9-?  (was: Android 2.3.4, Kernel 2.6.32.9-?)
    
> camera.getPicture crashes moto Droid X with large images using DATA_URL
> -----------------------------------------------------------------------
>
>                 Key: CB-1403
>                 URL: https://issues.apache.org/jira/browse/CB-1403
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.7.0, 2.0.0
>         Environment: Moto Droid X, Android 2.3.4, Kernel 2.6.32.9-?
>            Reporter: Philip Terman
>            Assignee: Joe Bowser
>
> When using navigator.camera.getPicture on Moto Droid X and the DATA_URL option, large return buffers will crash the app at the point of getPicture (generating a toast with force close).  Here's a sample of the code:
>     navigator.camera.getPicture(onPhotoDataSuccess, onFail,
>         { quality: 100,
>             destinationType: Camera.DestinationType.DATA_URL
>         }
>     );
> This code appears to function correctly on other devices we have tested that are running Android 2.3.4.  The issue is only seen on our Droid X devices (we have tried two different Droid X's).
> Reducing the image size by lowering the quality to 20 or below will allow the program to process correctly.  This can also be accomplished by shrinking the image size using the targetHeight/targetWidth options.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CB-1403) camera.getPicture crashes moto Droid X with large images using DATA_URL

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

Simon MacDonald resolved CB-1403.
---------------------------------

    Resolution: Won't Fix

Sadly there is nothing we can do about this one. When your Base64 encode an image that big the string data gets too big causing an out of memory exception in the JVM. OOM exceptions should never be caught since the JVM is in an unusable state once it is thrown so we are toast.
                
> camera.getPicture crashes moto Droid X with large images using DATA_URL
> -----------------------------------------------------------------------
>
>                 Key: CB-1403
>                 URL: https://issues.apache.org/jira/browse/CB-1403
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.7.0, 2.0.0
>         Environment: Moto Droid X, Android 2.3.4, Kernel 2.6.32.9-?
>            Reporter: Phil T.
>            Assignee: Joe Bowser
>
> When using navigator.camera.getPicture on Moto Droid X and the DATA_URL option, large return buffers will crash the app at the point of getPicture (generating a toast with force close).  Here's a sample of the code:
>     navigator.camera.getPicture(onPhotoDataSuccess, onFail,
>         { quality: 100,
>             destinationType: Camera.DestinationType.DATA_URL
>         }
>     );
> This code appears to function correctly on other devices we have tested that are running Android 2.3.4.  The issue is only seen on our Droid X devices (we have tried two different Droid X's).
> Reducing the image size by lowering the quality to 20 or below will allow the program to process correctly.  This can also be accomplished by shrinking the image size using the targetHeight/targetWidth options.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1403) camera.getPicture crashes moto Droid X with large images using DATA_URL

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

Philip Terman updated CB-1403:
------------------------------

    Description: 
When using navigator.camera.getPicture on Moto Droid X and the DATA_URL option, large return buffers will crash the app at the point of getPicture (generating a toast with force close).  Here's a sample of the code:

    navigator.camera.getPicture(onPhotoDataSuccess, onFail,
        { quality: 100,
            destinationType: Camera.DestinationType.DATA_URL
        }
    );

This code appears to function correctly on other devices we have tested that are running Android 2.3.4.  The issue is only seen on our Droid X devices (we have tried two different Droid X's).

Reducing the image size by lowering the quality to 20 or below will allow the program to process correctly.  This can also be accomplished by shrinking the image size using the targetHeight/targetWidth options.




  was:
When using navigator.camera.getPicture on Moto Droid X and the DATA_URL option, large return buffers will crash the app at the point of getPicture (generating a toast with force close).  Here's a sample of the code:

    navigator.camera.getPicture(onPhotoDataSuccess, onFail,
        { quality: 100,
            destinationType: Camera.DestinationType.DATA_URL,
            targetWidth: 2048,
            targetHeight: 1536
        }
    );

This code appears to function correctly on other devices we have tested that are running Android 2.3.4.  The issue is only seen on our Droid X devices (we have tried two different Droid X's).

Also, scaling down the image size or removing the image size and lowering the quality to 20 will allow the program to process correctly.



    
> camera.getPicture crashes moto Droid X with large images using DATA_URL
> -----------------------------------------------------------------------
>
>                 Key: CB-1403
>                 URL: https://issues.apache.org/jira/browse/CB-1403
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.7.0, 2.0.0
>         Environment: Android 2.3.4, Kernel 2.6.32.9-?
>            Reporter: Philip Terman
>            Assignee: Joe Bowser
>
> When using navigator.camera.getPicture on Moto Droid X and the DATA_URL option, large return buffers will crash the app at the point of getPicture (generating a toast with force close).  Here's a sample of the code:
>     navigator.camera.getPicture(onPhotoDataSuccess, onFail,
>         { quality: 100,
>             destinationType: Camera.DestinationType.DATA_URL
>         }
>     );
> This code appears to function correctly on other devices we have tested that are running Android 2.3.4.  The issue is only seen on our Droid X devices (we have tried two different Droid X's).
> Reducing the image size by lowering the quality to 20 or below will allow the program to process correctly.  This can also be accomplished by shrinking the image size using the targetHeight/targetWidth options.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1403) camera.getPicture crashes moto Droid X with large images using DATA_URL

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

Phil T. commented on CB-1403:
-----------------------------

Cool.  Thanks!

                
> camera.getPicture crashes moto Droid X with large images using DATA_URL
> -----------------------------------------------------------------------
>
>                 Key: CB-1403
>                 URL: https://issues.apache.org/jira/browse/CB-1403
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Docs
>    Affects Versions: 1.7.0, 2.0.0
>         Environment: Moto Droid X, Android 2.3.4, Kernel 2.6.32.9-?
>            Reporter: Phil T.
>            Assignee: Simon MacDonald
>             Fix For: 2.1.0
>
>
> When using navigator.camera.getPicture on Moto Droid X and the DATA_URL option, large return buffers will crash the app at the point of getPicture (generating a toast with force close).  Here's a sample of the code:
>     navigator.camera.getPicture(onPhotoDataSuccess, onFail,
>         { quality: 100,
>             destinationType: Camera.DestinationType.DATA_URL
>         }
>     );
> This code appears to function correctly on other devices we have tested that are running Android 2.3.4.  The issue is only seen on our Droid X devices (we have tried two different Droid X's).
> Reducing the image size by lowering the quality to 20 or below will allow the program to process correctly.  This can also be accomplished by shrinking the image size using the targetHeight/targetWidth options.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CB-1403) camera.getPicture crashes moto Droid X with large images using DATA_URL

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

Simon MacDonald resolved CB-1403.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.0

Made the reference in the docs more explicit so people will stop using DATA_URL.
                
> camera.getPicture crashes moto Droid X with large images using DATA_URL
> -----------------------------------------------------------------------
>
>                 Key: CB-1403
>                 URL: https://issues.apache.org/jira/browse/CB-1403
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Docs
>    Affects Versions: 1.7.0, 2.0.0
>         Environment: Moto Droid X, Android 2.3.4, Kernel 2.6.32.9-?
>            Reporter: Phil T.
>            Assignee: Simon MacDonald
>             Fix For: 2.1.0
>
>
> When using navigator.camera.getPicture on Moto Droid X and the DATA_URL option, large return buffers will crash the app at the point of getPicture (generating a toast with force close).  Here's a sample of the code:
>     navigator.camera.getPicture(onPhotoDataSuccess, onFail,
>         { quality: 100,
>             destinationType: Camera.DestinationType.DATA_URL
>         }
>     );
> This code appears to function correctly on other devices we have tested that are running Android 2.3.4.  The issue is only seen on our Droid X devices (we have tried two different Droid X's).
> Reducing the image size by lowering the quality to 20 or below will allow the program to process correctly.  This can also be accomplished by shrinking the image size using the targetHeight/targetWidth options.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1403) camera.getPicture crashes moto Droid X with large images using DATA_URL

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

Simon MacDonald commented on CB-1403:
-------------------------------------

Yeah, there is a note in the documentation but it could certainly be more prominent. Honestly, you should always use the FILE_URI approach when writing PhoneGap apps.
                
> camera.getPicture crashes moto Droid X with large images using DATA_URL
> -----------------------------------------------------------------------
>
>                 Key: CB-1403
>                 URL: https://issues.apache.org/jira/browse/CB-1403
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Docs
>    Affects Versions: 1.7.0, 2.0.0
>         Environment: Moto Droid X, Android 2.3.4, Kernel 2.6.32.9-?
>            Reporter: Phil T.
>            Assignee: Joe Bowser
>
> When using navigator.camera.getPicture on Moto Droid X and the DATA_URL option, large return buffers will crash the app at the point of getPicture (generating a toast with force close).  Here's a sample of the code:
>     navigator.camera.getPicture(onPhotoDataSuccess, onFail,
>         { quality: 100,
>             destinationType: Camera.DestinationType.DATA_URL
>         }
>     );
> This code appears to function correctly on other devices we have tested that are running Android 2.3.4.  The issue is only seen on our Droid X devices (we have tried two different Droid X's).
> Reducing the image size by lowering the quality to 20 or below will allow the program to process correctly.  This can also be accomplished by shrinking the image size using the targetHeight/targetWidth options.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1403) camera.getPicture crashes moto Droid X with large images using DATA_URL

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

Phil T. commented on CB-1403:
-----------------------------

Interesting. What we are really saying is that we always need to set the image size parameters.

But if there's a size limit, Cordova could be sensitive to it or at least there could be a note in the documentation. (?)

                
> camera.getPicture crashes moto Droid X with large images using DATA_URL
> -----------------------------------------------------------------------
>
>                 Key: CB-1403
>                 URL: https://issues.apache.org/jira/browse/CB-1403
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.7.0, 2.0.0
>         Environment: Moto Droid X, Android 2.3.4, Kernel 2.6.32.9-?
>            Reporter: Phil T.
>            Assignee: Joe Bowser
>
> When using navigator.camera.getPicture on Moto Droid X and the DATA_URL option, large return buffers will crash the app at the point of getPicture (generating a toast with force close).  Here's a sample of the code:
>     navigator.camera.getPicture(onPhotoDataSuccess, onFail,
>         { quality: 100,
>             destinationType: Camera.DestinationType.DATA_URL
>         }
>     );
> This code appears to function correctly on other devices we have tested that are running Android 2.3.4.  The issue is only seen on our Droid X devices (we have tried two different Droid X's).
> Reducing the image size by lowering the quality to 20 or below will allow the program to process correctly.  This can also be accomplished by shrinking the image size using the targetHeight/targetWidth options.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira