Every time I access an instance of System.Data.SQLite.SQLiteFactory, I get this exception when in debug-mode. Can I safely ignore it? Or what can I do to prevent this error?
<hr /><i>mistachkin added on 2011-10-17 14:09:33 UTC:</i><br />
I'm not able to reproduce this issue. Could you provide some more details about the kind of behavior you are seeing and what code triggers the issue?
<hr /><i>anonymous added on 2011-10-17 17:34:16 UTC:</i><br />
I only have this problem with the DLL here on this site, I never encountered using the dll from Phx Software (using the same code).
I only see the error when I set the IDE to break on ALL thrown exceptions.
The code looks like this:
Private Class Sql
Private Factory As New System.Data.SQLite.SQLiteFactory()
Public Function Connect() As Boolean
Dim Conn as DbConnection = Fact.CreateConnection()
It seems to be related to threads. The first thread has no problems creating a new instance of the class above, but the second thread will complain with:
A callback was made on a garbage collected delegate of type 'System.Data.SQLite!System.Data.SQLite.SQLiteLogCallback::Invoke'. This may cause application crashes, corruption and data loss. When passing delegates to unmanaged code, they must be kept alive by the managed application until it is guaranteed that they will never be called.
<hr /><i>mistachkin added on 2011-10-18 03:08:39 UTC:</i><br />
Possibly fixed by checked-in [3303a4f55b]. I still need to come up with a test case for this. Meanwhile, would you please test this fix in your environment and let me know if the issue is still present?
<hr /><i>anonymous added on 2011-10-19 16:58:20 UTC:</i><br />
I'm not familar with building the library myself, so I'd have to wait for 126.96.36.199
<hr /><i>anonymous added on 2011-10-19 17:15:50 UTC:</i><br />
Okay, I made some progress. Turns out I was using version 188.8.131.52 of the library. I just upgraded to 1.0.76, and I have not encountered the problem since then. So I guess this bug is already fixed in the commits between .74 and .76.