Che,

On Thu, Jun 25, 2015 at 5:38 PM, Kees Nuyt <k.nuyt at zonnet.nl> wrote:
> On Thu, 25 Jun 2015 16:41:25 +0000 (UTC), Ch?
> <el.che.the.man at gmail.com> wrote:
>
>>After using sqlite3_prepare_v2 to prepare "BEGIN TRANSACTION", "END
>>TRANSACTION", and "ROLLBACK TRANSACTION", the system will fault at a delayed
>>time when calling sqlite3_step.  If I call prepare and step right away, there
>>is no fault.  It runs fine.  Thus, if I just execute "BEGIN TRANSACTION", I
>>have no problem.  If I prepare a statement and execute it in the same
>>function, there is no problem too.  The problem occurs when I store a
>>prepared statement and access it at a later time.  In debugging, I checked if
>>anything was changing the sqlite3_stmt* pointer in-between. There was no
>>tampering in the program.  In fact, I created a SQLiteStatement class that
>>wrapped the sqlite3_stmt*, initialized it to 0, finalized it when done, and
>>prevented it from being overwritten with operator overloading the '=' sign.
>>I did this to ensure the safety of the prepared sqlite3_stmt*.
>
> Is there any chance the statement is _step()ped, _finalize()d
> and then re-used? To be able to use a statement multiple times,
> it should not be finalized but rather _reset().
>
>>Thank you for your help,
>>Ch?

Do you have an error checking in you code?
If it was a segmentation fault you can get a backtrace from the
debugger and post
couple of lines from the top (relevant portion).

Thank you.

>
> HTH
> --
> Regards,
> Kees Nuyt
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to