On Wed, 17 Jun 2015 16:59:02 +0000, Sivananda Nyayapathi
<siva at capricornsys.com> wrote:

> I have created a table to store images.  The columns are
> file name and file content.  FileContent field is the blob.
> I am using Samsung Tablet with Android Version 4.4.2. 
> Most of the tablets that I tested the software in, it works fine.
> However, on one specific Android table I am having problems. 
> I have given the description of the problem below:
>
> I am able to store the image in the blob field. 
> However, while attempting to read, I get the
> following error two times (as seen in the LogCat entries):
> W/CursorWindow(26737): Window is full: requested allocation
> 3184896 bytes, free space 2096605 bytes, window size 2097152 bytes
>
> Then the following error:
> E/CursorWindow(26737): Failed to read row 0, column 0
> from a CursorWindow which has 0 rows, 7 columns.
>
> NOTES:
>
>*  A walkthrough has been done on the code to ensure that there are no issues 
>in closing the cursors.  All cursors are getting closed.  (Used StrictMode 
>also to ensure this.)
>*  There is enough memory.  The tablet with the problem is a 32GB Samsung 
>tablet.  There is a large amount of free available memory at runtime.

Nope, there probably isn't enough free RAM. 
The 32 GByte refers to sdcard storage size, not RAM.
In Android speak, memory and storage size are confused.

> *  The preference is to store the image in the database as a BLOB instead of 
> storing the image in the file system and storing the path in the database 
> record (which would, probably, resolve the issue as far as retrieving the 
> image is concerned)..
> *   Android details
>
> o   Samsung Galaxy Note 10.1, 2014 Edition
> o   Model Number: SM-P605V
> o   Kernel Version 3.4.0
> o   Hardware Version: P605V.02
> o   Device Memory: Total space - 32 GB; Available space - 21.94GB
>
> Questions:
> *         Could you please help me understand why the application works fine 
> on six Samsung tablets that I have tested the app on, but it does not work on 
> the seventh tablet with the same OS version?
> *         What is the solution to this problem?

Check free RAM before extracting an image.
Maybe: run garbage collection and/or push other apps to
background.

-- 
Regards, Cordialement, Groet,

Kees Nuyt

Reply via email to