I have confirmed that if I use the 3.2.8 source for SQLite my
application compiles with 108 warnings but it executes without any
problems.
If I replace the SQLite source files with those from the 3.3.0
download, the compilation reports only 6 warnings and takes a bit
less time, but when I attempt to execute I get the signal and call
stack originally reported.
I should note that I am placing the SQLite source files into a
subdirectory of my XCode project, and placing all files in that
directory except the os_win.h/c files (there does not appear to be an
os_win.h in the 3.3.0 source tree), the shell.c file, the sqlite3.def
file, and the tclsqlite.c file. This means that there are a total of
51 files in my directory for 3.2.8 (less for 3.3.0).
I had a look, but I do not see where the sqlite3OsLock code is
implemented. I see the function prototype, but not the actual
implementation (not even a typedef or wrapper for a native call).
-ken
On 12-Jan-06, at 7:20 PM, Ken & Deb Allen wrote:
I have encountered a problem while attempting to execute some code
with SQLite embedded. This code was working with the previous
version of the source. I am developing a small framework to permit
me to use the SQLite engine from within some Cocoa applications I
am developing for personal use (managing team scores on a web
site). I have created my own class structure for this and it was
working, but when I upgraded to the 3.3.0 code and decided to test
it before I added new features, I got an EXC_BAD_INSTRUCTION signal
from the debugger when I attempt to step into the call to
"sqlite3OsLock" procedure as noted in the call stack below. The
statement I am executing at step 19 is
[theDatabase executeNonQuery:@"CREATE TABLE Table1(PKey INTEGER NOT
NULL, Name VARCHAR(32) NOT NULL, BirthDate FLOAT NOT NULL, Relation
VARCHAR NULL, PRIMARY KEY(PKey))"];
This statement has worked fine up until now! Does anyone have any
idea why this may be the case?
#0 0x001a8ba4 in ??
#1 0x943e7e90 in sqlite3OsLock
#2 0x00216de0 in pager_wait_on_lock at pager.c:1969
#3 0x00217dcc in sqlite3pager_get at pager.c:2579
#4 0x0005e560 in getPage at btree.c:1450
#5 0x0005f430 in lockBtree at btree.c:1880
#6 0x0005fbf8 in sqlite3BtreeBeginTrans at btree.c:2087
#7 0x0005f7a8 in lockBtreeWithRetry at btree.c:1953
#8 0x00060f78 in sqlite3BtreeCursor at btree.c:2698
#9 0x0024556c in sqlite3InitOne at prepare.c:218
#10 0x00245a7c in sqlite3Init at prepare.c:353
#11 0x00245c34 in sqlite3ReadSchema at prepare.c:393
#12 0x00083e14 in sqlite3StartTable at build.c:790
#13 0x00228c6c in yy_reduce at parse.y:124
#14 0x0022bb14 in sqlite3Parser at parse.c:3221
#15 0x0027a5a8 in sqlite3RunParser at tokenize.c:391
#16 0x002462a8 in sqlite3_prepare at prepare.c:541
#17 0x000ea8dc in sqlite3_exec at legacy.c:56
#18 0x002f3fe0 in -[SQLiteDatabase executeNonQuery:] at
SQLiteDatabase.m:224
#19 0x00032df0 in -[DirectoryManager createNewDatabase:] at
DirectoryManager.m:62