{ "id": "88200", "key": "TIMOB-8094", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-05-03T17:28:18.000+0000", "created": "2012-03-19T17:18:52.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "core" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [ { "id": "16268", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "89195", "key": "TIMOB-8432", "fields": { "summary": "Android: Camera - On V8, taking a picture at least twice causes an OutOfMemoryError exception", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-10T00:06:38.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "The app uses camera to click pictures, and upload to their server. Before uploading they perform image compression and resizing. Ti.imagefactory module is used for these purposes. The pictures are high resolution images, taken by a 8MP camera on the Motorola Droid X. The issue arises, when he uploads more than 1 image or multiple similar images or displaying the image in imageview. He gets \"Unable to load bitmap.Not enough memory.bitmap size exceeds VM budget.\" error on the device.\r\n\r\nYou can see the crash log here \r\n\r\n{code}03-19 10:32:54.837: E/dalvikvm-heap(3474): 5752604-byte external allocation too large for this process.\r\n03-19 10:32:54.916: E/GraphicsJNI(3474): VM won't let us allocate 5752604 bytes\r\n03-19 10:32:54.916: D/dalvikvm(3474): GC_FOR_MALLOC freed 0K, 47% free 9431K/17479K, external 11586K/13634K, paused 73ms\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): (main) [1277,430400] Unable to load bitmap. Not enough memory: bitmap size exceeds VM budget\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): java.lang.OutOfMemoryError: bitmap size exceeds VM budget\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.graphics.Bitmap.nativeCreate(Native Method)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.graphics.Bitmap.createBitmap(Bitmap.java:507)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.graphics.Bitmap.createBitmap(Bitmap.java:474)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.graphics.Bitmap.createScaledBitmap(Bitmap.java:379)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.titanium.view.TiDrawableReference.getBitmap(TiDrawableReference.java:558)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat ti.modules.titanium.ui.widget.TiUIImageView.setImage(TiUIImageView.java:736)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat ti.modules.titanium.ui.widget.TiUIImageView.processProperties(TiUIImageView.java:849)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:641)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:464)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:456)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:434)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.titanium.proxy.TiViewProxy.handleToImage(TiViewProxy.java:716)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:303)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.os.Handler.dispatchMessage(Handler.java:95)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.kroll.common.TiMessenger.dispatchMessage(TiMessenger.java:318)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.kroll.common.TiMessenger.dispatchPendingMessages(TiMessenger.java:303)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.kroll.common.TiMessenger$2.getResult(TiMessenger.java:188)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.kroll.common.TiMessenger.sendBlockingMessage(TiMessenger.java:215)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.kroll.common.TiMessenger.sendBlockingRuntimeMessage(TiMessenger.java:143)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.kroll.KrollProxy.fireSyncEvent(KrollProxy.java:417)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat org.appcelerator.titanium.TiBaseActivity.onRestart(TiBaseActivity.java:830)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.app.Instrumentation.callActivityOnRestart(Instrumentation.java:1139)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.app.Activity.performRestart(Activity.java:3865)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.app.Activity.performResume(Activity.java:3876)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.app.ActivityThread.performResumeActivity(ActivityThread.java:2191)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2228)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.app.ActivityThread$H.handleMessage(ActivityThread.java:994)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.os.Handler.dispatchMessage(Handler.java:99)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.os.Looper.loop(Looper.java:123)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat android.app.ActivityThread.main(ActivityThread.java:3806)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat java.lang.reflect.Method.invokeNative(Native Method)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat java.lang.reflect.Method.invoke(Method.java:507)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)\r\n03-19 10:32:54.923: E/TiDrawableReference(3474): \r\nat dalvik.system.NativeStart.main(Native Method)\r\n03-19 10:32:54.923: I/TiUIHelper(3474): (main) [8,430408] view does not have parent, calling layout\r\n{code}\r\n\r\n\r\nCreated sample apps, using the ti.imagefactory module, but could not reproduce this issue. Also tested the code on Motorola Droid3, LG OptimusV but still could not reproduce the issue. \r\n", "attachment": [], "flagged": false, "summary": "Android: App crashes on the device while uploading images, Memory issues", "creator": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dgandhi", "key": "dgandhi", "displayName": "Devang Gandhi", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio SDK: 1.8.2\r\nAndroid Device: Motorola DroidX", "comment": { "comments": [ { "id": "187310", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Devang - This is not really a platform issue if the bitmap is larger than the OS can handle. Pedro was running into the same problem with his app so check with him how he solved it.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-19T21:56:09.000+0000", "updated": "2012-03-19T21:56:09.000+0000" }, { "id": "187558", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I will test this as my personal device is a Droid X.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-20T16:14:58.000+0000", "updated": "2012-03-20T16:14:58.000+0000" }, { "id": "187799", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "On the Droid X, we were able to reproduce this issue. According to DDMS, the app was trying to store 16mb worth of images (2x 2.2mb + 2x 5.7 mb) at the same time. The memory is consistent at roughly 5-7mb the entire time, and there are no signs of leakage. Since this is happening randomly - could happen after the 2nd image, or up to 5th image, it's probably a timing bug. The cause is yet to be determined and would need further investigation on the application side.\r\nAlso note that this behavior doesn't happen on faster phones with 8mb Camera (like Galaxy S2). ", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-21T14:20:48.000+0000", "updated": "2012-03-21T14:24:24.000+0000" }, { "id": "189478", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The error you are seeing matches the error in timob-8432. Could be a duplicate.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-02T10:13:33.000+0000", "updated": "2012-04-02T10:13:33.000+0000" }, { "id": "191653", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Just a quick note that i spent some time testing as well in 1.8.2, 2.0.1, and 2.1.0, on an HTC Desire (Android 2.2) using a jpg that is 1024x731 at 72DPI. I was using Devang's test (a few comments ago) but modified to use ImageFactory.compressToFile since the customer code above showed that. I also changed the ratio to 80/100 since their code does that when it's Android running.\r\n\r\nI did the compression test numerous times in succession on all three Titanium versions and never had any problem.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-04-18T13:57:40.000+0000", "updated": "2012-04-18T13:57:40.000+0000" }, { "id": "411158", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing this ticket as the issue cannot be reproduced.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-10T00:06:38.000+0000", "updated": "2017-03-10T00:06:38.000+0000" } ], "maxResults": 17, "total": 17, "startAt": 0 } } }