{ "id": "89742", "key": "TIMOB-8646", "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": "15400", "description": "2013 Sprint 08 API", "name": "2013 Sprint 08 API", "archived": true, "released": true, "releaseDate": "2013-04-22" }, { "id": "15106", "description": "2013 Sprint 08", "name": "2013 Sprint 08", "archived": true, "released": true, "releaseDate": "2013-04-22" } ], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2013-04-18T19:53:45.000+0000", "created": "2012-04-10T03:59:04.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "qe-and040912" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-29T20:55:14.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": "On launching the app, a runtime error is displayed on android 2.2 . Snapshot of the same is attached.\r\n\r\nSteps to reproduce:\r\n1) Create an app with code below and add speed.db file in the project(attached in the bug).\r\n2) Install and launch the app.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\nvar label1 = Titanium.UI.createLabel({\r\n\t\t\tcolor : '#999',\r\n\t\t\ttext : 'I am Window 1',\r\n\t\t\tfont : {\r\n\t\t\t\tfontSize : 20,\r\n\t\t\t\tfontFamily : 'Helvetica Neue'\r\n\t\t\t},\r\n\t\t\ttextAlign : 'center',\r\n\t\t\twidth : 'auto'\r\n\t\t});\r\n\r\n\t\tvar db = Titanium.Database.install('speed.db', 'myDB');\r\n\r\n\t\twin.add(label1);\r\n\t\twin.open();\r\n\t\t\r\n{code}\r\n\r\nExpected result : A window should be displayed : \"I am window 1\" \r\nActual result : A runtime error is displayed.\r\nNote: It is showing expected behavior on android 3.2 and 4.0.2\r\n", "attachment": [ { "id": "26952", "filename": "DatabaseAndroid-2012-04-10-153559.png", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-10T03:59:04.000+0000", "size": 42571, "mimeType": "image/png" }, { "id": "26951", "filename": "DatabaseLog.txt", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-10T03:59:04.000+0000", "size": 1581, "mimeType": "text/plain" }, { "id": "26953", "filename": "speed.db", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-10T03:59:04.000+0000", "size": 1802240, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "Android: Database: V8: Runtime error is occuring while launching the app.", "creator": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK: 2.0.1.v20120406170211\r\nTitanium Studio: 2.0.1.201204061639 \r\nAndroid OS 2.2.1 Motorola Milestone, Android OS 2.2.2 LG-P970\r\nAndroid Runtime : V8\r\nOS - Windows 7", "comment": { "comments": [ { "id": "190534", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This bug is reproducible on Titanium SDK 1.8.2, 2.0", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-10T21:11:33.000+0000", "updated": "2012-04-10T21:11:33.000+0000" }, { "id": "240498", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "it works only on android emulator\r\n\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0 (03/11/13 15:43 0c88429)\r\nTitanium SDK version: 3.0.2 (02/07/13 16:46 a4def81)\r\nAndroid Emulator: Android SDK version: 2.2", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-04T05:41:56.000+0000", "updated": "2013-03-04T09:00:35.000+0000" }, { "id": "240508", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces with\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0 (03/11/13 15:43 0c88429)\r\nTitanium SDK version: 3.0.2 (02/07/13 16:46 a4def81)\r\nDevice: Samsung galaxy s duos Android version: 4.0.4\r\n", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-04T08:58:26.000+0000", "updated": "2013-03-04T08:58:26.000+0000" }, { "id": "248216", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can reproduce the crash only on 2.2 devices with the log:\n{code}\nD/asset ( 2821): Data exceeds UNCOMPRESS_DATA_MAX (1802240 vs 1048576)\nE/TiDatabase( 2821): (KrollRuntimeThread) [5,3038] Error installing database: myDB msg=null\nE/TiDatabase( 2821): java.io.IOException\nE/TiDatabase( 2821): \tat android.content.res.AssetManager.readAsset(Native Method)\nE/TiDatabase( 2821): \tat android.content.res.AssetManager.access$700(AssetManager.java:36)\nE/TiDatabase( 2821): \tat android.content.res.AssetManager$AssetInputStream.read(AssetManager.java:571)\nE/TiDatabase( 2821): \tat java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:157)\nE/TiDatabase( 2821): \tat java.io.BufferedInputStream.read(BufferedInputStream.java:346)\nE/TiDatabase( 2821): \tat java.io.FilterInputStream.read(FilterInputStream.java:130)\nE/TiDatabase( 2821): \tat ti.modules.titanium.database.DatabaseModule.install(DatabaseModule.java:121)\nE/TiDatabase( 2821): \tat org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)\nE/TiDatabase( 2821): \tat org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:159)\nE/TiDatabase( 2821): \tat org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:289)\nE/TiDatabase( 2821): \tat org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:185)\nE/TiDatabase( 2821): \tat android.os.Handler.dispatchMessage(Handler.java:95)\nE/TiDatabase( 2821): \tat android.os.Looper.loop(Looper.java:123)\nE/TiDatabase( 2821): \tat org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)\n{code}\nThis is not a Titanium bug. It's a limitation on Android 2.2 that any compressed asset file with an uncompressed size of over 1 MB cannot be read from the APK. The workaround is renaming the .db file to .jpg.\nHere is some similar discussions:\nhttp://stackoverflow.com/questions/5789177/i-get-this-error-data-exceeds-uncompress-data-max-on-android-2-2-but-not-on-2-3\nhttp://stackoverflow.com/questions/6438934/titanium-appcelarator-data-exceeds-uncompress-data-max-3964928-vs-1048576-in-a\nhttp://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-18T19:52:25.000+0000", "updated": "2013-04-18T19:52:25.000+0000" }, { "id": "416243", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as it has been established that the issue is not our bug.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T20:55:14.000+0000", "updated": "2017-03-29T20:55:14.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }