--- Chris Schirlinger <[EMAIL PROTECTED]> wrote:
> On 6 Apr 2005 at 3:13, Dan Kennedy wrote:
> 
> Date sent:            Wed, 6 Apr 2005 03:13:58 -0700 (PDT)
> From:                 Dan Kennedy <[EMAIL PROTECTED]>
> Subject:              Re: [sqlite] Access Violations in sqlite3_step when in 
> DLL
> To:                   sqlite-users@sqlite.org, [EMAIL PROTECTED]
> 
> > 
> > Exactly what are you calling sqlite3_free() on?
> 
> Sorry, I am probably being a bit misleading there. That Free was on 
> any error message returned from SQlite3_ErrMsg which we call if the 
> result from SQLite3_Open isn't SQLITE_OK

It sounds like it's not the problem, but don't call sqlite3_free() 
on anything returned by sqlite3_errmsg(). This memory is managed
by SQLite and calling sqlite3_free() on it will cause memory 
corruption somewhere down the line. Are you *sure* it's not being
called? ;)

Try defining -DSQLITE_MEMDEBUG=1 when you compile SQLite. If it
is memory corruption this might catch the problem sooner rather
than later, and maybe more consistently. If you can get it to
occur in a consistent manner you can probably use a debugger to
figure out who is colouring outside the lines.

> In theory it's never called, we never get any errors out of 
> SQLIte_Open, it just AV's
> 
> We call SQLite3_Close and pass the pointer that is returned from the 
> open call. I havn't seen any errors on close. We see errors on Open, 
> Step or Get_Table depending on what we use (ie, if we just Open and 
> close, the AV occurs eventually on one of the opens. If we try 
> Get_Table the AV will happen sooner and happen on a Get_Table)
> 
> None of the code we used (and I even tried other componants and 
> wrappers in case the one we were using is suspect) has ever caused 
> any issues previously and we've been using it for months. Only when 
> called from this plugin are we seeing problems.
> 
> I've tried 2 wrappers and one componant and still get the issue

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to