cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Keable (JIRA)" <>
Subject [jira] [Created] (CB-5734) Android - Correct Orientation OutOfMemoryError
Date Tue, 07 Jan 2014 16:49:50 GMT
Matthew Keable created CB-5734:

             Summary: Android - Correct Orientation OutOfMemoryError
                 Key: CB-5734
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugin Camera
    Affects Versions: 3.2.0
         Environment: Android 4.1
            Reporter: Matthew Keable

The Samsung Galaxy S3 takes very very large photographs, but seemingly does not have enough
memory to effectively process them. 

Unfortunately this can cause the camera code to throw an OutOfMemory Error when trying to
correct the orientation of the image.

Because the OutOfMemory error is not caught, the app will crash.

This happens both from the Camera itself or retrieving camera images from the Gallery.

Suggest either catching the OutOfMemory error on calls to bitmap = Bitmap.createBitmap(bitmap,
0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true); or attempting to optimise the
code such that the app can handle the rotations of larger images.

Whilst we have only been able to confirm the existence of this bug on a Galaxy S3 running
Android 4.1, given the fragmentation of the Android market it is likely that this might occur
on other devices.

This message was sent by Atlassian JIRA

View raw message