Michael,

Completely agree with your conclusion the GC.Collect is pretty much a plaster 
over a severed limb, it's just hiding the problem rather than solving it.  Just 
mentioned it in case that gave Joe any ideas.
My code is all c# and the link privided I believe is a c++ only feature.  I 
would imagine Joe is already using this.
Hopefully, as I'm using c#, it should be pretty difficult for me to create a 
problem like that you described in a 'high level' language where most memory 
management is out of my hands. But if you know of/could provide any c# examples
of this I'll check my code.

> From: michael.bla...@ngc.com
> To: sqlite-users@sqlite.org
> Date: Fri, 5 Oct 2012 14:04:59 +0000
> Subject: Re: [sqlite] Seemingly random Access Violation errors
> 
> It would seem to me that if GC.Collect fixes the problem than all you've done 
> is move the problem to someplace else that isn't fatal (at the moment) and 
> could rear its ugly head at most any time.
> 
> The reason your emulator doesn't throw the error would be for the same 
> reason...different memory allocation strategies.
> 
> When you run GC.Collect you're going to reclaim lots of small memory blocks 
> which will separate the locations more.  Without GC.Collect you're probably 
> getting sequential memory blocks which show up as access violations due to 
> adjacent memory abuse.  You're just lucky you see the error at all.
> 
> I believe you have a buffer overwrite occurring somewhere.
> 
> Have you tried the run-time checks to see it they can help pinpoint it?
> http://msdn.microsoft.com/en-us/library/aa290051.aspx#vctchcompilersecuritychecksindepthanchor4
> 
> 
> Michael D. Black
> Senior Scientist
> Advanced Analytics Directorate
> Advanced GEOINT Solutions Operating Unit
> Northrop Grumman Information Systems
> 
> ________________________________________
> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
> behalf of Matthew Dumbleton [msd...@hotmail.com]
> Sent: Friday, October 05, 2012 5:46 AM
> To: sqlite-users@sqlite.org
> Subject: EXT :Re: [sqlite] Seemingly random Access Violation errors
> 
> Joe,
> 
> I'm afraid this doesn't seem to fix the issue.
> Just out of interest are you able to run the code I sent on a real device or 
> in an emulator? I'm testing on a Motorola ES400 and didn't initially think to 
> try switching to the emulator which doesn't seem to throw the error (still 
> testing though.)
> Don't know if it's relevant but I seem to 'fix' the issue if I call a 
> GC.Collect before every connection to the database.  But of course this could 
> just be because it runs slower when doing this and in any case probably not 
> good practice.
> Will continue to test.
> 
> > From: sql...@mistachkin.com
> > To: sqlite-users@sqlite.org
> > Date: Thu, 4 Oct 2012 17:20:18 -0700
> > Subject: Re: [sqlite] Seemingly random Access Violation errors
> >
> >
> > Matthew Dumbleton wrote:
> > >
> > > I have tried this change and I'm afraid it hasn't stopped the crashes.
> > >
> >
> > I've further refined the locking semantics for the .NET Compact Framework
> > build here:
> >
> >       https://system.data.sqlite.org/index.html/info/ac5f4cc084
> >
> > I think this should correct the problem, although I'm not actually able to
> > reproduce
> > the problem here.
> >
> > --
> > Joe Mistachkin
> >
> > _______________________________________________
> > 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