{ "id": "117831", "key": "TIMOB-14742", "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": [ { "id": "18414", "description": "", "name": "Release 6.2.0", "archived": false, "released": true, "releaseDate": "2017-09-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-05-23T00:15:05.000+0000", "created": "2013-07-31T20:32:25.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [ { "id": "30578", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "109361", "key": "TIMOB-13072", "fields": { "summary": "Android: Images load many times", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-12T21:23:23.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": "*Steps to Reproduce*\r\n1. Create a new Classic Default Project\r\n2. Drop the attached images into the Resources folder\r\n3. Run the test case\r\n4. Observe the actual result\r\n\r\n*Test case*\r\n{code:javascript}\r\nvar wnd = Ti.UI.createWindow({\r\n\tfullscreen : false\r\n});\r\nvar view = Ti.UI.createView();\r\n\r\nwnd.add(view);\r\n\r\nwnd.backgroundImage = \"backWnd.png\";\r\nview.backgroundImage = \"backView.png\";\r\n\r\nwnd.open();\r\n{code}\r\n\r\n*Actual Result*\r\nFrom fastdev console:\r\n{noformat} \r\n[INFO] get app.js: C:\\Users\\vkorol\\Documents\\Titanium_Studio_Workspace\\backImage\\Resources\\app.js\r\n[INFO] get images/backView.png: C:\\Users\\vkorol\\Documents\\Titanium_Studio_Workspace\\backImage\\Resources\\android\\images/backView.png\r\n[INFO] get images/backView.png: C:\\Users\\vkorol\\Documents\\Titanium_Studio_Workspace\\backImage\\Resources\\android\\images/backView.png\r\n[INFO] get images/backView.png: C:\\Users\\vkorol\\Documents\\Titanium_Studio_Workspace\\backImage\\Resources\\android\\images/backView.png\r\n[INFO] get images/backView.png: C:\\Users\\vkorol\\Documents\\Titanium_Studio_Workspace\\backImage\\Resources\\android\\images/backView.png\r\n[INFO] get images/backWnd.png: C:\\Users\\vkorol\\Documents\\Titanium_Studio_Workspace\\backImage\\Resources\\android\\images/backWnd.png\r\n[INFO] get images/backWnd.png: C:\\Users\\vkorol\\Documents\\Titanium_Studio_Workspace\\backImage\\Resources\\android\\images/backWnd.png\r\n{noformat} \r\n\r\n*Expected Result*\r\nBackground image must be loaded once.", "attachment": [ { "id": "41177", "filename": ".log", "author": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2013-07-31T20:32:27.000+0000", "size": 51902, "mimeType": "application/octet-stream; charset=ISO-8859-1" }, { "id": "41250", "filename": "backView.png", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-01T21:42:36.000+0000", "size": 5577, "mimeType": "image/png" }, { "id": "41249", "filename": "backWnd.png", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-01T21:42:36.000+0000", "size": 5148, "mimeType": "image/png" }, { "id": "41178", "filename": "diagnostic6713599355514609606.log", "author": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2013-07-31T20:32:32.000+0000", "size": 8589, "mimeType": "application/octet-stream; charset=ISO-8859-1" } ], "flagged": false, "summary": "Android: backgroundImage loading two times for window and four times for view", "creator": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "subtasks": [], "reporter": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "environment": "Titanium Studio 3.1.0.201304151600", "closedSprints": [ { "id": 896, "state": "closed", "name": "2017 Sprint 11 SDK", "startDate": "2017-05-22T02:41:17.888Z", "endDate": "2017-06-05T02:41:00.000Z", "completeDate": "2017-06-05T00:14:33.418Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "264393", "author": { "name": "wood1k", "key": "wood1k", "displayName": "Alexey Chulochnikov", "active": true, "timeZone": "Europe/Helsinki" }, "body": "Please fix it, i think that this behavior isn't correct!\nIt uses a lot of memory!", "updateAuthor": { "name": "wood1k", "key": "wood1k", "displayName": "Alexey Chulochnikov", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2013-08-01T10:29:31.000+0000", "updated": "2013-08-01T10:29:31.000+0000" }, { "id": "264493", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "According to TIMOB-13072:\r\n\r\n{quote}The additional 3 are for selected, focused and disabled states. If images are not explicitly specified for these, the background image is used.{quote}\r\n\r\nResolving as duplicate.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-01T19:01:09.000+0000", "updated": "2013-08-01T19:01:09.000+0000" }, { "id": "264530", "author": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "body": "Titanium should load only one specified backgroundImage in this case and use it for all states.\nTitanium should not allocate memory for several copies of background image.\nIt is not fixed in TIMOB-13072. \nPlease fix it.", "updateAuthor": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2013-08-01T20:53:17.000+0000", "updated": "2013-08-01T20:53:17.000+0000" }, { "id": "264534", "author": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "body": "If I set 1280x720 image as backgroundImage then on android 4.0.3 application made four 3686416-byte allocations. It is 14MB memory from 48MB (max VM heep size) only for background image.\r\n\r\n{noformat}\r\nI/dalvikvm-heap( 801): Grow heap (frag case) to 14.065MB for 3686416-byte allocation\r\nD/dalvikvm( 801): GC_FOR_ALLOC freed 6K, 8% free 14327K/15431K, paused 62ms\r\nD/dalvikvm( 801): GC_CONCURRENT freed <1K, 8% free 14327K/15431K, paused 7ms+6ms\r\nI/Process ( 88): Sending signal. PID: 801 SIG: 3\r\nI/dalvikvm( 801): threadid=3: reacting to signal 3\r\nI/dalvikvm( 801): Wrote stack traces to '/data/anr/traces.txt'\r\nW/ActivityManager( 88): Launch timeout has expired, giving up wake lock!\r\nI/Process ( 88): Sending signal. PID: 801 SIG: 3\r\nI/dalvikvm( 801): threadid=3: reacting to signal 3\r\nI/dalvikvm( 801): Wrote stack traces to '/data/anr/traces.txt'\r\nI/Process ( 88): Sending signal. PID: 801 SIG: 3\r\nI/dalvikvm( 801): threadid=3: reacting to signal 3\r\nI/dalvikvm( 801): Wrote stack traces to '/data/anr/traces.txt'\r\nI/Process ( 88): Sending signal. PID: 801 SIG: 3\r\nI/dalvikvm( 801): threadid=3: reacting to signal 3\r\nI/dalvikvm( 801): Wrote stack traces to '/data/anr/traces.txt'\r\nD/dalvikvm( 801): GC_FOR_ALLOC freed 41K, 8% free 14328K/15431K, paused 68ms\r\nI/dalvikvm-heap( 801): Grow heap (frag case) to 17.575MB for 3686416-byte allocation\r\nD/dalvikvm( 801): GC_FOR_ALLOC freed <1K, 7% free 17928K/19079K, paused 62ms\r\nD/dalvikvm( 801): GC_CONCURRENT freed 1K, 7% free 17927K/19079K, paused 6ms+6ms\r\nI/Process ( 88): Sending signal. PID: 801 SIG: 3\r\nI/dalvikvm( 801): threadid=3: reacting to signal 3\r\nI/dalvikvm( 801): Wrote stack traces to '/data/anr/traces.txt'\r\nI/Process ( 88): Sending signal. PID: 801 SIG: 3\r\nI/dalvikvm( 801): threadid=3: reacting to signal 3\r\nI/dalvikvm( 801): Wrote stack traces to '/data/anr/traces.txt'\r\nW/InputManagerService( 88): Focus gain on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@4192aca0 (uid=10013 pid=753)\r\nW/ActivityManager( 88): Activity idle timeout for ActivityRecord{41309710 com.test.backimage/.BackimageActivity}\r\nI/Launcher( 753): setLoadOnResume\r\nI/Launcher( 753): setLoadOnResume\r\nI/Launcher( 753): setLoadOnResume\r\nD/dalvikvm( 801): GC_FOR_ALLOC freed 38K, 7% free 17928K/19079K, paused 64ms\r\nI/dalvikvm-heap( 801): Grow heap (frag case) to 21.090MB for 3686416-byte allocation\r\nI/Launcher( 753): setLoadOnResume\r\nD/dalvikvm( 801): GC_FOR_ALLOC freed <1K, 6% free 21528K/22727K, paused 72ms\r\nD/dalvikvm( 801): GC_CONCURRENT freed <1K, 6% free 21528K/22727K, paused 5ms+11ms\r\nI/Launcher( 753): setLoadOnResume\r\nD/dalvikvm( 801): GC_FOR_ALLOC freed 39K, 6% free 21530K/22727K, paused 62ms\r\nI/dalvikvm-heap( 801): Grow heap (frag case) to 24.608MB for 3686416-byte allocation\r\nD/dalvikvm( 801): GC_FOR_ALLOC freed <1K, 5% free 25129K/26375K, paused 76ms\r\nD/dalvikvm( 801): GC_CONCURRENT freed <1K, 5% free 25129K/26375K, paused 7ms+9ms\r\nD/gralloc_goldfish( 801): Emulator without GPU emulation detected.\r\nI/ActivityManager( 88): Displayed com.test.backimage/org.appcelerator.titanium.TiActivity: +8s861ms (total +1m50s172ms)\r\nW/NetworkManagementSocketTagger( 88): setKernelCountSet(10013, 0) failed with errno -2\r\nD/dalvikvm( 753): GC_CONCURRENT freed 1782K, 12% free 14053K/15943K, paused 7ms+417ms\r\nD/dalvikvm( 415): GC_CONCURRENT freed 326K, 6% free 9567K/10119K, paused 7ms+7ms\r\nD/Launcher.Model( 753): going to save icon bitmap for info=ShortcutInfo(title=Messaging)\r\nD/Launcher.Model( 753): going to save icon bitmap for info=ShortcutInfo(title=Camera)\r\nD/Launcher.Model( 753): going to save icon bitmap for info=ShortcutInfo(title=Settings)\r\nD/Launcher.Model( 753): going to save icon bitmap for info=ShortcutInfo(title=Browser)\r\nD/Launcher.Model( 753): going to save icon bitmap for info=ShortcutInfo(title=Phone)\r\nD/Launcher.Model( 753): going to save icon bitmap for info=ShortcutInfo(title=People)\r\nI/Launcher( 753): setLoadOnResume\r\nI/TiAnalyticsSvc( 801): (Thread-87) [38409,38409] Analytics Service Started\r\nI/TiAnalyticsSvc( 801): (Thread-87) [2491,40900] Stopping Analytics Service\r\nI/dalvikvm( 801): dvmDdmHandleHpsgChunk(when 1, what 0, heap 0)\r\nD/dalvikvm( 801): GC_EXPLICIT freed 383K, 5% free 25251K/26375K, paused 8ms+9ms\r\n{noformat}", "updateAuthor": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2013-08-01T21:06:20.000+0000", "updated": "2013-08-01T21:23:20.000+0000" }, { "id": "312185", "author": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Just to pile on here... we have an app that rotates different pictures as the backgroundImage on the main Window and after a few minutes the app runs out of memory on Android only.\r\n\r\nSo it appears that the memory allocated for the backgroundImage and the other images is not being released when a new backgroundImage is set.\r\n\r\nWe've done this using both \r\nTi.UI.Window.setBackgroundImage and Ti.UI.setBackgroundImage. \r\nUsing either too many times will cause the device to run out of memory and give this error:\r\n\r\n[ERROR] : libc: mmap fail (pid 7033, tid 7033, size 8294400, flags 0x2, errno 12(Out of memory))", "updateAuthor": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-03T00:38:59.000+0000", "updated": "2014-07-03T00:38:59.000+0000" }, { "id": "417308", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8960", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-12T17:51:25.000+0000", "updated": "2017-04-12T17:51:25.000+0000" }, { "id": "419317", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "6_1_x: https://github.com/appcelerator/titanium_mobile/pull/9032\r\n\r\nThis fix needs to be back-ported since more image loading fixes will be made to 6.1.x that depend on this change.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-08T19:17:54.000+0000", "updated": "2017-05-08T19:17:54.000+0000" }, { "id": "421819", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix in SDK version: 6.2.0.v20170612114319. Test and other information can be found at: \r\nhttps://github.com/appcelerator/titanium_mobile/pull/8960", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-12T21:23:11.000+0000", "updated": "2017-06-12T21:23:11.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }