Assertion failure in btree.c, line 1166

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Assertion failure in btree.c, line 1166

Hugh Gibson
Hi,

Using PySQLite 2.0.4 I get a crash with the following sequence, starting
from no database. If the page_size pragma is removed it works OK.
Reproducible under Windows 2K and XP. Running Python 2.4.1.


pragma short_column_names=0
pragma full_column_names=0
PRAGMA page_size = 8192
CREATE TABLE Versions (sVersions Primary Key)
INSERT INTO Versions (sVersions) VALUES ('NMUkO6Wev0IOhWL/WLPPiGRl
')
SELECT * FROM sqlite_master WHERE type = 'table' AND name = 'Versions'
SELECT * FROM Versions
CREATE TABLE General (sValue Text DEFAULT '',sType Text DEFAULT '',
PRIMARY KEY
(sType))
SELECT * FROM Versions
DELETE FROM Versions
INSERT INTO Versions (sVersions) VALUES
('7WPylc1+LISbvuZMsrmvnWQ3OkdlbmVyYWxkMT
oxaTRlZWU=
')
DELETE FROM Versions
INSERT INTO Versions (sVersions) VALUES
('7WPylc1+LISbvuZMsrmvnWQ3OkdlbmVyYWxkMT
oxaTRlZWU=
')
SELECT sType, sValue FROM General WHERE sType = '_LastLogin'
Assertion failed: &pPage->aData[pPage->pBt->pageSize]==(unsigned
char*)pPage, file btree.c, line 1166

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.


Other failure reports include:

Assertion failed: n==4-4*pPage->leaf, file btree.c, line 601
Assertion failed: pPage->leaf==0 || pPage->leaf==1, file btree.c, line 599

Hugh Gibson
Reply | Threaded
Open this post in threaded view
|

Re: Assertion failure in btree.c, line 1166

Vinj Vinj
I got the same errors where the python application
would just crap out. For some time I thought it was a
problem with apsw. I migrated to apsw frompysqlite.

I searched all over but then did a .dump of my
database and recreated it and the error went away.

Pretty scary though and I never received it with
earlier versions of sqlite.



--- Hugh Gibson <[hidden email]> wrote:

> Hi,
>
> Using PySQLite 2.0.4 I get a crash with the
> following sequence, starting
> from no database. If the page_size pragma is removed
> it works OK.
> Reproducible under Windows 2K and XP. Running Python
> 2.4.1.
>
>
> pragma short_column_names=0
> pragma full_column_names=0
> PRAGMA page_size = 8192
> CREATE TABLE Versions (sVersions Primary Key)
> INSERT INTO Versions (sVersions) VALUES
> ('NMUkO6Wev0IOhWL/WLPPiGRl
> ')
> SELECT * FROM sqlite_master WHERE type = 'table' AND
> name = 'Versions'
> SELECT * FROM Versions
> CREATE TABLE General (sValue Text DEFAULT '',sType
> Text DEFAULT '',
> PRIMARY KEY
> (sType))
> SELECT * FROM Versions
> DELETE FROM Versions
> INSERT INTO Versions (sVersions) VALUES
> ('7WPylc1+LISbvuZMsrmvnWQ3OkdlbmVyYWxkMT
> oxaTRlZWU=
> ')
> DELETE FROM Versions
> INSERT INTO Versions (sVersions) VALUES
> ('7WPylc1+LISbvuZMsrmvnWQ3OkdlbmVyYWxkMT
> oxaTRlZWU=
> ')
> SELECT sType, sValue FROM General WHERE sType =
> '_LastLogin'
> Assertion failed:
> &pPage->aData[pPage->pBt->pageSize]==(unsigned
> char*)pPage, file btree.c, line 1166
>
> This application has requested the Runtime to
> terminate it in an unusual
> way.
> Please contact the application's support team for
> more information.
>
>
> Other failure reports include:
>
> Assertion failed: n==4-4*pPage->leaf, file btree.c,
> line 601
> Assertion failed: pPage->leaf==0 || pPage->leaf==1,
> file btree.c, line 599
>
> Hugh Gibson
>

Reply | Threaded
Open this post in threaded view
|

Re: Assertion failure in btree.c, line 1166

Hugh Gibson
In reply to this post by Hugh Gibson
Richard,

Thanks for looking into this. It's actually compiled into PySQLite so I
can't determine it directly.

I'll ask on the PySQLite mailing list.

Hugh

> *Subject:* Re: [sqlite] Assertion failure in btree.c, line 1166
> *From:* "D. Richard Hipp" <[hidden email]>
> *To:* [hidden email]
> *Date:* Tue, 27 Sep 2005 06:37:44 -0400
>
> On Mon, 2005-09-26 at 12:03 +0100, Hugh Gibson wrote:
> > Hi,
> >
> > Using PySQLite 2.0.4 I get a crash with the following sequence,
> > starting from no database. If the page_size pragma is removed it
> > works OK. Reproducible under Windows 2K and XP. Running Python 2.4.1.
> >
>
> You have not indicated what version of SQLite you are using.
> I am unable to reproduce the problem.  I run your script and
> it works.