Camera Memory Problem


#1

Hey Guys,

I have a problem with camera due to memory lack ;), Then the app got crashed :wink:

The exception message is :

Throwing OutOfMemoryError "Failed to allocate a 63489036 byte allocation with 16777216 free bytes and 50MB until OOM"
10-09 13:27:34.680 11006 11006 W System.err: java.lang.OutOfMemoryError: Failed to allocate a 63489036 byte allocation with 16777216 free bytes and 50MB until OOM
10-09 13:27:34.690 11006 11006 W System.err:    at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
10-09 13:27:34.690 11006 11006 W System.err:    at android.graphics.Bitmap.nativeCreate(Native Method)
10-09 13:27:34.690 11006 11006 W System.err:    at android.graphics.Bitmap.createBitmap(Bitmap.java:975)
10-09 13:27:34.690 11006 11006 W System.err:    at android.graphics.Bitmap.createBitmap(Bitmap.java:946)
10-09 13:27:34.690 11006 11006 W System.err:    at android.graphics.Bitmap.createBitmap(Bitmap.java:877)
10-09 13:27:34.690 11006 11006 W System.err:    at com.fusetools.camera.Image.rotateImage(Image.java:68)
10-09 13:27:34.690 11006 11006 W System.err:    at com.fusetools.camera.Image.correctOrientationFromExif(Image.java:96)
10-09 13:27:34.690 11006 11006 W System.err:    at com.foreign.Fuse.Camera.TakePictureCallback.HandleIntent386(TakePictureCallback.java:38)
10-09 13:27:34.690 11006 11006 W System.err:    at com.Bindings.ExternedBlockHost.HandleIntent386(ExternedBlockHost.java:1809)
10-09 13:27:34.690 11006 11006 W System.err:    at com.Bindings.ExternedBlockHost.callUno_Android_ActivityUtils_OnReceived68(Native Method)
10-09 13:27:34.690 11006 11006 W System.err:    at com.foreign.Android.ActivityUtils$1.onResult(ActivityUtils.java:39)
10-09 13:27:34.690 11006 11006 W System.err:    at com.fuse.Activity._onActivityResult(Activity.java:54)
10-09 13:27:34.690 11006 11006 W System.err:    at com.fuse.App.onActivityResult(App.java:204)
10-09 13:27:34.690 11006 11006 W System.err:    at com.devestandards.bashi.MainActivity.onActivityResult(MainActivity.java:77)
10-09 13:27:34.690 11006 11006 W System.err:    at android.app.Activity.dispatchActivityResult(Activity.java:7137)
10-09 13:27:34.690 11006 11006 W System.err:    at android.app.ActivityThread.deliverResults(ActivityThread.java:4916)
10-09 13:27:34.690 11006 11006 W System.err:    at android.app.ActivityThread.handleSendResult(ActivityThread.java:4963)
10-09 13:27:34.690 11006 11006 W System.err:    at android.app.ActivityThread.access$1600(ActivityThread.java:221)
10-09 13:27:34.690 11006 11006 W System.err:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1848)
10-09 13:27:34.690 11006 11006 W System.err:    at android.os.Handler.dispatchMessage(Handler.java:102)
10-09 13:27:34.690 11006 11006 W System.err:    at android.os.Looper.loop(Looper.java:158)
10-09 13:27:34.690 11006 11006 W System.err:    at android.app.ActivityThread.main(ActivityThread.java:7224)
10-09 13:27:34.690 11006 11006 W System.err:    at java.lang.reflect.Method.invoke(Native Method)
10-09 13:27:34.690 11006 11006 W System.err:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
10-09 13:27:34.690 11006 11006 W System.err:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
10-09 13:27:34.710 11006 11006 D MainActivity: Uno.Exception: java.lang.OutOfMemoryError: Failed to allocate a 63489036 byte allocation with 16777216 free bytes and 50MB until OOM
10-09 13:27:34.710 11006 11006 W System.err: java.lang.RuntimeException: Uno.Exception: java.lang.OutOfMemoryError: Failed to allocate a 63489036 byte allocation with 16777216 free bytes and 50MB until OOM
10-09 13:27:34.710 11006 11006 W System.err:    at com.Bindings.ExternedBlockHost.callUno_Android_ActivityUtils_OnReceived68(Native Method)
10-09 13:27:34.710 11006 11006 W System.err:    at com.foreign.Android.ActivityUtils$1.onResult(ActivityUtils.java:39)
10-09 13:27:34.710 11006 11006 W System.err:    at com.fuse.Activity._onActivityResult(Activity.java:54)
10-09 13:27:34.710 11006 11006 W System.err:    at com.fuse.App.onActivityResult(App.java:204)
10-09 13:27:34.710 11006 11006 W System.err:    at com.devestandards.bashi.MainActivity.onActivityResult(MainActivity.java:77)
10-09 13:27:34.720 11006 11006 W System.err:    at android.app.Activity.dispatchActivityResult(Activity.java:7137)
10-09 13:27:34.720 11006 11006 W System.err:    at android.app.ActivityThread.deliverResults(ActivityThread.java:4916)
10-09 13:27:34.720 11006 11006 W System.err:    at android.app.ActivityThread.handleSendResult(ActivityThread.java:4963)
10-09 13:27:34.720 11006 11006 W System.err:    at android.app.ActivityThread.access$1600(ActivityThread.java:221)
10-09 13:27:34.720 11006 11006 W System.err:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1848)
10-09 13:27:34.720 11006 11006 W System.err:    at android.os.Handler.dispatchMessage(Handler.java:102)
10-09 13:27:34.720 11006 11006 W System.err:    at android.os.Looper.loop(Looper.java:158)
10-09 13:27:34.720 11006 11006 W System.err:    at android.app.ActivityThread.main(ActivityThread.java:7224)
10-09 13:27:34.720 11006 11006 W System.err:    at java.lang.reflect.Method.invoke(Native Method)
10-09 13:27:34.720 11006 11006 W System.err:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

Fuse version : Uno 1.3.1 (build 5880) Windows 10 x64 df89aa2

Operating system version : Windows 10

Device: Samsung S5

Camera.takePicture(1200,628).then(
  function(image) {
          imagePath.value= image.path;
  }
).catch(
  function(reason){
    console.log("Couldn't take picture: " + reason);
  }
);

#2

Thanks for reporting! I’ve logged a ticket and you can follow the status there.

What Android version is the device running? Please add more details to the ticket.


#3

I have replied their for more information :wink:


#4