I found that under Android 2.3 an app (using SQLite with blobs for bitmaps) - has OutOfMemory error soon after start, and even before using activity that works with bitmaps.
Under Android 4.0, or 4.2 with the same 512 MB RAM - no such issue at all.
Compiled by b4a v.3.0
"Downsampling image due to lack of memory." occured more and more often. But no bitmaps were operated !
Erel, maybe this log has any to understand ?
Under Android 4.0, or 4.2 with the same 512 MB RAM - no such issue at all.
Compiled by b4a v.3.0
"Downsampling image due to lack of memory." occured more and more often. But no bitmaps were operated !
Erel, maybe this log has any to understand ?
B4X:
LogCat connected to: 80A354043043692369
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (main) Create, isFirst = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (main) Resume **
<!>anywheresoftware.b4a.BA 480<!> DropTable: DROP TABLE IF EXISTS [ways]
<!>anywheresoftware.b4a.BA 480<!> CreateTable: CREATE TABLE IF NOT EXISTS [ways] ([id] INTEGER PRIMARY KEY AUTOINCREMENT, [way] TEXT, [input] TEXT, [output] TEXT)
<!>anywheresoftware.b4a.BA 480<!> InsertMaps (first query out of 10): INSERT INTO [ways] ([id], [way], [input], [output]) VALUES (?, ?, ?, ?)
<!>anywheresoftware.b4a.BA 480<!> CreateTable: CREATE TABLE IF NOT EXISTS [parts] ([id] INTEGER PRIMARY KEY AUTOINCREMENT, [name] TEXT, [waytype] INTEGER, [way] INTEGER, [desc] TEXT, [link] TEXT, [filename] TEXT, [file] BLOB, [picture] BLOB, [priority] TEXT, [value] TEXT)
<!>anywheresoftware.b4a.BA 480<!> CreateTable: CREATE TABLE IF NOT EXISTS [functions] ([id] INTEGER PRIMARY KEY AUTOINCREMENT, [name] TEXT, [source] INTEGER, [result] INTEGER, [desc] TEXT, [link] TEXT, [filename] TEXT, [file] BLOB, [picture] BLOB, [priority] TEXT)
<!>anywheresoftware.b4a.BA 480<!> CreateTable: CREATE TABLE IF NOT EXISTS [general] ([id] INTEGER PRIMARY KEY, [project_name] TEXT, [author] TEXT, [template] TEXT, [field1] TEXT, [field2] TEXT, [field3] TEXT)
<!>anywheresoftware.b4a.BA 480<!> InsertMaps (first query out of 3): INSERT INTO [general] ([project_name]) VALUES (?)
<!>anywheresoftware.b4a.BA 480<!> DB inited !
<!>anywheresoftware.b4a.BA 480<!> CreateTable: CREATE TABLE IF NOT EXISTS [DBVersion] ([version] INTEGER PRIMARY KEY)
<!>anywheresoftware.b4a.BA 480<!> CreateTable: CREATE TABLE IF NOT EXISTS [DBVersion] ([version] INTEGER PRIMARY KEY)
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (main) Pause, UserClosed = false **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prj) Create, isFirst = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prj) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prj) Pause, UserClosed = false **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (web) Create, isFirst = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (web) Resume **
<!>anywheresoftware.b4a.BA 480<!> requestCode = 1
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (web) Pause, UserClosed = false **
<!>anywheresoftware.b4a.BA 480<!> sending message to waiting queue (OnActivityResult)
<!>anywheresoftware.b4a.BA 480<!> running waiting messages (1)
<!>anywheresoftware.b4a.BA 480<!> Arrived: 1, 1
<!>anywheresoftware.b4a.BA 480<!> ~e:User canceled. (response: -1005:User cancelled)
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (web) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (web) Pause, UserClosed = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prj) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prj) Pause, UserClosed = false **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Create, isFirst = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Pause, UserClosed = false **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (results) Create, isFirst = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (results) Resume **
<!>anywheresoftware.b4a.BA 480<!> ExecuteMemoryTable: SELECT way FROM ways WHERE output = '1'
<!>anywheresoftware.b4a.BA 480<!> ExecuteMemoryTable: SELECT name FROM parts WHERE waytype = '1'
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (results) Pause, UserClosed = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Pause, UserClosed = false **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (results) Create, isFirst = false **
<!>anywheresoftware.b4a.BA 480<!> ~w:1003,results,33
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (results) Resume **
<!>anywheresoftware.b4a.BA 480<!> ExecuteMemoryTable: SELECT way FROM ways WHERE input = '1'
<!>anywheresoftware.b4a.BA 480<!> ExecuteMemoryTable: SELECT name FROM parts WHERE waytype = '0'
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (results) Pause, UserClosed = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Pause, UserClosed = false **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (functions) Create, isFirst = true **
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 6
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 6
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 12
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 24
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 2
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 4
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 2
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 4
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 8
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 16
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 6
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 12
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 24
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory: 48
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (functions) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (functions) Pause, UserClosed = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Pause, UserClosed = false **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (results) Create, isFirst = false **
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> ~w:1003,results,33
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (results) Resume **
<!>anywheresoftware.b4a.BA 480<!> ExecuteMemoryTable: SELECT way FROM ways WHERE input = '1'
<!>anywheresoftware.b4a.BA 480<!> ExecuteMemoryTable: SELECT name FROM parts WHERE waytype = '0'
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (results) Pause, UserClosed = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Pause, UserClosed = false **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (results) Create, isFirst = false **
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> ~w:1003,results,33
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (results) Resume **
<!>anywheresoftware.b4a.BA 480<!> ExecuteMemoryTable: SELECT way FROM ways WHERE output = '1'
<!>anywheresoftware.b4a.BA 480<!> ExecuteMemoryTable: SELECT name FROM parts WHERE waytype = '1'
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (results) Pause, UserClosed = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Pause, UserClosed = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prj) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prj) Pause, UserClosed = false **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Create, isFirst = false **
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Pause, UserClosed = false **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (functions) Create, isFirst = false **
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> ~w:1003,functions,31
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (functions) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (functions) Pause, UserClosed = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Pause, UserClosed = false **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (details) Create, isFirst = true **
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> Downsampling image due to lack of memory.
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (details) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (details) Pause, UserClosed = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prjmenu) Pause, UserClosed = true **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prj) Resume **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (prj) Pause, UserClosed = false **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (web) Create, isFirst = false **
<!>anywheresoftware.b4a.BA 480<!> ~i:** Activity (web) Resume **
<!>anywheresoftware.b4a.BA 480<!> android.view.InflateException: Binary XML file line #21: Error inflating class android.widget.ZoomControls
at android.view.LayoutInflater.createView(LayoutInflater.java:518)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
at android.view.LayoutInflater.inflate(LayoutInflater.java:383)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at android.widget.ZoomButtonsController.createContainer(ZoomButtonsController.java:262)
at android.widget.ZoomButtonsController.<init>(ZoomButtonsController.java:211)
at android.webkit.WebView.getZoomButtonsController(WebView.java:6219)
at android.webkit.WebView.startDrag(WebView.java:5608)
at android.webkit.WebView.onTouchEvent(WebView.java:5346)
at android.view.View.dispatchTouchEvent(View.java:3885)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:903)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1703)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1133)
at android.app.Activity.dispatchTouchEvent(Activity.java:2096)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1687)
at android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2196)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1880)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3729)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:874)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:632)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
at android.view.LayoutInflater.createView(LayoutInflater.java:505)
... 31 more
Caused by: android.view.InflateException: Binary XML file line #21: Error inflating class android.widget.ZoomButton
at android.view.LayoutInflater.createView(LayoutInflater.java:518)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
at android.view.LayoutInflater.inflate(LayoutInflater.java:383)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.widget.ZoomControls.<init>(ZoomControls.java:49)
... 34 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
at android.view.LayoutInflater.createView(LayoutInflater.java:505)
... 40 more
Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
at android.content.res.Resources.loadDrawable(Resources.java:1709)
at android.content.res.Resources.getDrawable(Resources.java:581)
at android.graphics.drawable.StateListDrawable.
Last edited: