I only load "data" from a particular row when I need to display it. The
"data" that got corrupted isn't read for some time and even if I close
down the program and restarts the computer the same corruption is there
on the same row. It is saved into "data", although I don't modify it in
any way.

Patrik

On 02/26/2012 09:12 PM, Pavel Ivanov wrote:
> My guess is you read blob data incorrectly. You get pointer to the data
> from SQLite, but actually read the data when memory has been already reused
> for other purposes.
> 
> Pavel
> 
> 
> On Sunday, February 26, 2012, Patrik Nilsson <nipatriknils...@gmail.com>
> wrote:
>> Dear All,
>>
>> I have a table called page (defined below) and have noticed that the
>> data-variable (blob) sometimes get corrupted. How do I set up a log to
>> debug what is happening. What I want is a log file saved with my file,
>> so I can backtrace the error.
>>
>> This is also to be able to send in a good bug report to the developers
>> of SQLite.
>>
>> I don't know the exact steps to reproduce the error, but the following
>> might give someone a clue:
>>
>> 1) Add rows (one by one) with data.
>> 2) Update sortorder for the whole table with begin/commit
>> 3) After these and maybe some other steps (i.e. updating a row's data
>> with new data), I discover that a random row of the table has a
>> corrupted data-blob.
>>
>> I have made a verify function for the whole table of the data-blobs. The
>> data-blob can contain images varying in size from a few hundred bytes to
>> some (about 5) megabytes of images. (Currently only png-images.)
>>
>> Best regards,
>> Patrik
>>
>>
>> create table if not exists page ( id integer primary key autoincrement,
>> type integer, sortorder integer, width integer, height integer, size
>> integer, deleted integer default 0, zoom integer default 0, modified
>> datetime default (datetime('now','localtime')), comment text, data blob )
>>
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to