Thanks Robert!
 
> So your solution is to NULL your pointer after calling finalize() and don't
> call finalize() again if your pointer is NULL.
I think I need to do so.
Again thanks,
JP





----- Original Message ----
From: Robert Simpson <[EMAIL PROTECTED]>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Thursday, September 18, 2008 8:54:49 AM
Subject: Re: [sqlite] Program is crashed on sqlite3_finalize(pStmt);

You can't.  The memory pStmt points to is freed and invalid after the call
to finalize.  Worse, that freed memory could've already been reallocated for
some other purpose by the time the call to finalize() returns control to
you.

So your solution is to NULL your pointer after calling finalize() and don't
call finalize() again if your pointer is NULL.

Robert



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Joanne Pham
Sent: Thursday, September 18, 2008 8:44 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Program is crashed on sqlite3_finalize(pStmt);

Hi All,
How to check if the pStmt is not finalize so 
sqlite3_finalize(pStmt) can be call again. I think I called
sqlite3_finalize(pStmt) twice so my application is crashed.
Thanks,
JP



----- Original Message ----
From: Joanne Pham <[EMAIL PROTECTED]>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Wednesday, September 17, 2008 10:14:18 AM
Subject: [sqlite] Program is crashed on sqlite3_finalize(pStmt);

Hi All,
I have c++ application which is used SQLite 3.5.9.
Occasionally  the application is crash on  
 sqlite3_finalize(pStmt);
Is that true the sqlite3_finalize(pStmt) invoked twice?
How to avoid this crashed problem? How to check if the pStmt is not finalize
so 
sqlite3_finalize(pStmt) can be call again.
Thanks,
JP

 


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



      
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



      
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



      
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to