sqlite-net: NullReferenceException in SQLite.PreparedSqlLiteInsertCommand.ExecuteNonQuery(...)
Description:
I’m getting from time to time if I start my app a System.NullReferenceException: Object reference not set to an instance of an object.
I’m unable to reproduce it, but once it happens once it will occur about 2 to 3 times in a row. After that the app starts again as expected. It could be that this error is related to #530 but I’m not sure. I’m accessing the DB heavily multithreaded.
Details:
- sqlite-net version:
1.5.231occurs also on1.4.118and1.3.3 - Implementation
- UWP target version:
16299 - UWP min version:
10586
Stacktrace:
at SQLite.PreparedSqlLiteInsertCommand.ExecuteNonQuery(Object[] source)
at SQLite.SQLiteConnection.Insert(Object obj, String extra, Type objType)
at Thread_Save_Components.Classes.SQLite.TSSQLiteConnection.InsertOrReplace(Object obj)
at XMPP_API.Classes.Network.XML.DBManager.OmemoDeviceDBManager.setDevices(List`1 devices, String chatJid)
at XMPP_API.Classes.Network.XML.DBManager.OmemoDeviceDBManager.setDevices(OmemoDevices devices, String chatJid, String accountId)
at XMPP_API.Classes.Network.OmemoHelper.onOmemoDeviceListEventMessage(OmemoDeviceListEventMessage msg)
at XMPP_API.Classes.Network.XMPPConnection2.<parseMessageAsync>d__53.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at XMPP_API.Classes.Network.XMPPConnection2.<TCPConnection_NewDataReceived>d__56.MoveNext()
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (5 by maintainers)
Commits related to this issue
- Temporary fix for praeclarum/sqlite-net#761 — committed to UWPX/UWPX-Client by COM8 6 years ago
- Workaround for praeclarum/sqlite-net#761 — committed to TUM-Dev/Campus-UWP by COM8 6 years ago
- Added a better workaround for praeclarum/sqlite-net#761 — committed to UWPX/UWPX-Client by COM8 5 years ago
- Fix to #761, preventing incorrect disposed command object This addresses a race condition where a new PreparedSqliteInsertCommand object was returned in a disposed state if a second object was create... — committed to ElteHupkes/sqlite-net by ElteHupkes 5 years ago
- Adding a regression test for #761 — committed to ElteHupkes/sqlite-net by ElteHupkes 5 years ago
- Merge pull request #866 from ElteHupkes/fix-insert-nre-761 Fix to #761, preventing returning a disposed command object — committed to praeclarum/sqlite-net by praeclarum 5 years ago
- Fix to #761, preventing incorrect disposed command object This addresses a race condition where a new PreparedSqliteInsertCommand object was returned in a disposed state if a second object was create... — committed to Reddevildragg-UPM-Forks/sqlite-net by ElteHupkes 5 years ago
@ElteHupkes Please do not fork this thing 😃 Already too many of those.
If I’m not being responsive to important bug fixes like this, harass me on Twitter.
Sorry for the delays, and thanks for the great work!