Still trying to figure out why I get an application crash when I use 2 UDF if the same SQLite statement, eg: select SumTwoLongs(F1, F2) as a, SumTwoLongs(F2, F1) as b from UDF_TEST limit 1
The callback function gets called twice and all seems to be fine with that, looking at the logging data: Sum2Longs line 10, lPtr_ObjContext: 31082840 Sum2Longs line 20, lPtr_ObjSQLite3_Value: 31082868 Sum2Longs line 30, lArgCount: 2 Sum2Longs line 40, MemLong(31082868): 30993552 Sum2Longs line 50, MemLong(31082872): 30993592 Sum2Longs line 70, sqlite3_value_int(30993552): 1 Sum2Longs line 80, sqlite3_value_int(30993592): 5 Sum2Longs line 90, Error message: not an error Sum2Longs line 100, Extended error code: 0 Sum2Longs line 10, lPtr_ObjContext: 31082328 Sum2Longs line 20, lPtr_ObjSQLite3_Value: 31082356 Sum2Longs line 30, lArgCount: 2 Sum2Longs line 40, MemLong(31082356): 30993552 Sum2Longs line 50, MemLong(31082360): 30993592 Sum2Longs line 70, sqlite3_value_int(30993552): 5 Sum2Longs line 80, sqlite3_value_int(30993592): 1 Sum2Longs line 90, Error message: not an error Sum2Longs line 100, Extended error code: 0 I would like to check though directly after doing: sqlite3_result_int lPtr_ObjContext, _ sqlite3_value_int(MemLong(lPtr_ObjSQLite3_Value)) + _ sqlite3_value_int(MemLong(lPtr_ObjSQLite3_Value + 4)) that sqlite3_result_int has worked fine. There is no error, so I would think so, but would like to make sure. Directly after the callback function has finished for the last time I get the application crash and I can't debug this from my application (VB6). Also, is it OK that line 70 and 80 use the same pointers? Again, I am aware that this is very likely not a SQLite problem, but maybe somebody can shed some light on this. RBS