[TIMOB-8646] Android: Database: V8: Runtime error is occuring while launching the app.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2013-04-18T19:53:45.000+0000 |
Affected Version/s | Release 2.0.1, Release 3.1.0 |
Fix Version/s | 2013 Sprint 08 API, 2013 Sprint 08 |
Components | Android |
Labels | api, qe-and040912 |
Reporter | Shyam Bhadauria |
Assignee | Ping Wang |
Created | 2012-04-10T03:59:04.000+0000 |
Updated | 2017-03-29T20:55:14.000+0000 |
Description
On launching the app, a runtime error is displayed on android 2.2 . Snapshot of the same is attached.
Steps to reproduce:
1) Create an app with code below and add speed.db file in the project(attached in the bug).
2) Install and launch the app.
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
var label1 = Titanium.UI.createLabel({
color : '#999',
text : 'I am Window 1',
font : {
fontSize : 20,
fontFamily : 'Helvetica Neue'
},
textAlign : 'center',
width : 'auto'
});
var db = Titanium.Database.install('speed.db', 'myDB');
win.add(label1);
win.open();
Expected result : A window should be displayed : "I am window 1"
Actual result : A runtime error is displayed.
Note: It is showing expected behavior on android 3.2 and 4.0.2
Attachments
File | Date | Size |
---|---|---|
DatabaseAndroid-2012-04-10-153559.png | 2012-04-10T03:59:04.000+0000 | 42571 |
DatabaseLog.txt | 2012-04-10T03:59:04.000+0000 | 1581 |
speed.db | 2012-04-10T03:59:04.000+0000 | 1802240 |
This bug is reproducible on Titanium SDK 1.8.2, 2.0
it works only on android emulator Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Android Emulator: Android SDK version: 2.2
Issue reproduces with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Device: Samsung galaxy s duos Android version: 4.0.4
Can reproduce the crash only on 2.2 devices with the log:
This 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. Here is some similar discussions: http://stackoverflow.com/questions/5789177/i-get-this-error-data-exceeds-uncompress-data-max-on-android-2-2-but-not-on-2-3 http://stackoverflow.com/questions/6438934/titanium-appcelarator-data-exceeds-uncompress-data-max-3964928-vs-1048576-in-a http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/
Closing ticket as it has been established that the issue is not our bug.