eastopalex / csharp-sqlite

Automatically exported from code.google.com/p/csharp-sqlite
Other
0 stars 0 forks source link

Assert in Sqlite3.pcache1Unpin(PCache1 p, PgHdr pPg, Boolean reuseUnlikely) #155

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Sometimes when I commit sqlite transaction with multiple operations I get this 
error:

---------------------------
Assertion Failed
---------------------------
    at Sqlite3.pcache1Unpin(PCache1 p, PgHdr pPg, Boolean reuseUnlikely)  

    at Sqlite3.pcacheUnpin(PgHdr p)  

    at Sqlite3.sqlite3PcacheMakeClean(PgHdr p)  

    at Sqlite3.sqlite3PcacheCleanAll(PCache pCache)  

    at Sqlite3.sqlite3PagerCommitPhaseOne(Pager pPager, String zMaster, Boolean noSync)  

    at Sqlite3.sqlite3BtreeCommitPhaseOne(Btree p, String zMaster)  

    at Sqlite3.vdbeCommit(sqlite3 db, Vdbe p)  

    at Sqlite3.sqlite3VdbeHalt(Vdbe p)  

    at Sqlite3.sqlite3VdbeExec(Vdbe p)  

    at Sqlite3.sqlite3Step(Vdbe p)  

    at Sqlite3.sqlite3_step(Vdbe pStmt)  

    at SqliteCommand.ExecuteStatement(Vdbe pStmt, Int32& cols, IntPtr& pazValue, IntPtr& pazColName)  

    at SqliteCommand.ExecuteStatement(Vdbe pStmt)  

    at SqliteCommand.ExecuteReader(CommandBehavior behavior, Boolean want_results, Int32& rows_affected)  

    at SqliteCommand.ExecuteNonQuery()  

    at SqliteTransaction.Commit()  

    ...  

    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)  

    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)  

    at Delegate.DynamicInvokeImpl(Object[] args)  

    at DispatcherOperation.Invoke()  

    at Dispatcher.Dispatch(DispatcherPriority priority)  

    at Dispatcher.OnInvoke(Object context)  

    at CallbackCookie.Invoke(Object[] args)  

    at ManagedHost.InvokeDelegate(IntPtr pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)  

This is a silverlight project. With following pragmas:
            var pragma = new[]
                             { // http://www.sqlite.org/pragma.html
                                 "PRAGMA encoding = \"UTF-8\"",
                                 "PRAGMA count_changes = 0",
                                 "PRAGMA fullfsync = 1",
                                // "PRAGMA auto_vacuum = 1",
                                 "PRAGMA journal_mode = PERSIST",
                                 "PRAGMA locking_mode = NORMAL", //EXCLUSIVE
                                 "PRAGMA read_uncommitted = 1",
                                 "PRAGMA automatic_index = 1",
                                 "PRAGMA cache_size = 4096",
                                 "PRAGMA default_cache_size = 4096",
                                 "PRAGMA legacy_file_format = 0",
                                 "PRAGMA page_size = 32768",
                                 "PRAGMA parser_trace = 0",
                                 "PRAGMA secure_delete = 0",
                                 "PRAGMA synchronous = 1",  //NORMAL, FULL
                                 "PRAGMA temp_store = MEMORY"
                             };

Original issue reported on code.google.com by shakirov...@gmail.com on 10 May 2012 at 10:01

GoogleCodeExporter commented 8 years ago
This error may be related to concurrent use of multiple SqliteConnection (to 
different db files).

Original comment by shakirov...@gmail.com on 10 May 2012 at 2:56

GoogleCodeExporter commented 8 years ago
Please retry after changeset #82

Original comment by noah.hart@gmail.com on 18 May 2012 at 11:16

GoogleCodeExporter commented 8 years ago
6 weeks with no response, closing issue

Original comment by noah.hart@gmail.com on 29 Jun 2012 at 10:18