Re: [sqlite] Strange "database disk image is malformed" problems

2010-12-20 Thread Pavel Ivanov
> You are great! > This is really possible in this case. > The application runs as a daemon and closes all file handles at startup. > > Now I need to check what this library is doing One of quick solutions to this (without examining library) is to reopen std* handles to point to /dev/null, so

Re: [sqlite] Strange "database disk image is malformed" problems

2010-12-20 Thread Michael Steiger
Hi Pavel! On 20.12.2010 15:36 Pavel Ivanov said the following: Can you tell us what is producing that log text you found ? >>> I am developing network appliances using EZchip network processors and >>> for implementing some backend code I recently switched to SQLite. >> >> Mmm. Well, it

Re: [sqlite] Strange "database disk image is malformed" problems

2010-12-20 Thread Pavel Ivanov
>>> Can you tell us what is producing that log text you found ? >> I am developing network appliances using EZchip network processors and >> for implementing some backend code I recently switched to SQLite. > > Mmm.  Well, it could be overwriting some of your memory, or overwriting the >

Re: [sqlite] Strange "database disk image is malformed" problems

2010-12-20 Thread Simon Slavin
On 20 Dec 2010, at 12:49pm, Michael Steiger wrote: >> Can you tell us what is producing that log text you found ? > I am developing network appliances using EZchip network processors and > for implementing some backend code I recently switched to SQLite. Mmm. Well, it could be overwriting

Re: [sqlite] Strange "database disk image is malformed" problems

2010-12-20 Thread Michael Steiger
On 20.12.2010 13:32 Simon Slavin said the following: > > On 20 Dec 2010, at 12:17pm, Michael Steiger wrote: > >> In the meantime I further analyzed the problem and I also looked at the >> corrupt databasefile. To my surprise it contained some logfile output >> from another library I am using. It

Re: [sqlite] Strange "database disk image is malformed" problems

2010-12-20 Thread Simon Slavin
On 20 Dec 2010, at 12:17pm, Michael Steiger wrote: > In the meantime I further analyzed the problem and I also looked at the > corrupt databasefile. To my surprise it contained some logfile output > from another library I am using. It seems that if I turn on logging for > this library some

Re: [sqlite] Strange "database disk image is malformed" problems

2010-12-20 Thread Michael Steiger
Hi Simon, On 20:59 Simon Slavin said the following: > > On 19 Dec 2010, at 2:56pm, Michael Steiger wrote: > >> sqlite3_prepare_v2, sqlite3_step, sqlite_column_*, ...: to read data > > erm ... sqlite3_finalize() ? Is already there (just forgot to mention it) >

Re: [sqlite] Strange "database disk image is malformed" problems

2010-12-19 Thread Simon Slavin
On 19 Dec 2010, at 2:56pm, Michael Steiger wrote: > sqlite3_prepare_v2, sqlite3_step, sqlite_column_*, ...: to read data erm ... sqlite3_finalize() ? http://www.sqlite.org/c3ref/stmt.html > If I try to reproduce this sequence using sqlite3 the problem does not > occur (qed). Sorry, I

[sqlite] Strange "database disk image is malformed" problems

2010-12-19 Thread Michael Steiger
Hello! I am currently integrating sqlite 3.7.3 into my application running on an embedded PowerPC-based Linux 2.6. I have the reproducable situation that I get the database file gets corrupted. Here is the list of operations: sqlite3_open (new database file is created) sqlite3_exec: create