Re: [sqlite] Help with error codes

2011-04-13 Thread Jeff Archer
> drh on Tue Apr 12 22:23:38

> 

>Set your breakpoint on the function winAccess if you want to try to debug

>this.

 

Which I cannot do since attaching debugger masks the problem.

 

Now I am really confused.  I have modified winAccess to simply return the
result of GetFileAttributesExW() if the error is not ERROR_FILE_NOT_FOUND
and this appears to eliminate the crash.

 

Could someone please advise on how good or bad of an idea this change is?

 

How well is SQLite tested on Windows 7 64 bit?

 

 

Jeff Archer

Nanotronics Imaging

jsarc...@nanotronicsimaging.com

<330>819-4615

 

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


Re: [sqlite] Help with error codes

2011-04-12 Thread jeff archer
>drh   Tue Apr 12 22:23:38 GMT 2011
>
>Set your breakpoint on the function winAccess if you want to try to debug
>this.

If only it were that easy.  Its intermittent and attaching a debugger seems to 
mask the problem.  It's never been seen with only a single process and occurs 
more when there are more simultaneous processes.  To process 26 images with 8 
processes we are launching 8 processes for the first 8 images, then when each 
process terminates a new process is launghed on the next image until all are 
processed.

I am using a BEGIN IMMEDIATE transaction at the beginning of each process to 
check and maybe update the database.  This is to have write lock already if 
update is required and to serialize access to the database for making the check 
and potentially updating some config data.

I'm not really thinking of a good way to approach this.  I would greatly 
appreciate if anyone has any ideas.

Jeff Archer
Nanotronics Imaging
jsarc...@nanotronicsimaging.com
<330>819.4615 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Help with error codes

2011-04-12 Thread Richard Hipp
On Tue, Apr 12, 2011 at 6:06 PM, jeff archer  wrote:

> I have a process which analyzes an image then writes results to database.
> (sqlite 3.7.4)
> When I run multiple of these in parallel, each on its own image but all on
> the
> same database, and all on same machine (Windows 7) I get an error from
> sqlite3_step() when attempting to execute "BEGIN IMMEDIATE".  I get
> proportionaly more errors when I run more processes in parallel.  A high
> percentage of the error occurs just after successful open when trying to
> check
> for some existing values to confirm this is correct file.
>
> The error looks like it is always from sqlite3_step() on the "BEGIN
> IMMEDIATE"
> I am getting a return from sqlite3_step() of 3338.
> sqlite3_errmsg16() is returning "disk I/O error"
> sqlite3_prepare16_v2 returned success.
>
>
3338 is the extended error code.  In your case it means that a call to
GetFileAttributesExW() failed for some reason other than
ERROR_FILE_NOT_FOUND.  I have no idea why that might be.

Set your breakpoint on the function winAccess if you want to try to debug
this.



> And now that I am digging into this I am not sure I have this correct.
> Am I supposed to get my error code from sqlite3_step() because I have now
> also
> noticed sqlite3_extended_errcode()?
> Is 3338 an extended error code?Do I need to use sqlite3_open_v2 to get the
> extended error code?
>
>  Jeff Archer
> Nanotronics Imaging
> jsarc...@nanotronicsimaging.com
> <330>819.4615
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users