NullReferenceException in apps on Windows 8 RTM
See original GitHub issueI migrate an app from windows 8 RP to RTM.
I didn’t have problem on RP but on RTM SQLite throw very often an exception when my app launch.
Here is the exception details:
System.NullReferenceException was unhandled by user code
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=mscorlib
StackTrace:
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
at SQLite.SQLiteConnection.GetMapping(Type type) in \SQLite.cs:line 234
at SQLite.SQLiteConnection.CreateTable(Type ty) in \SQLite.cs:line 308
at SQLite.SQLiteAsyncConnection.<>c__DisplayClass1.<CreateTablesAsync>b__0() in \SQLiteAsync.cs:line
94
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
Can you investigate on it?
Issue Analytics
- State:
- Created 11 years ago
- Comments:9
Top Results From Across the Web
How can I fix the error: System.NullReferenceException
A NullReferenceException exception is thrown when you try to access a member on a type whose value is null. A NullReferenceException exception ...
Read more >Null reference exception on installed application
The code on the development machine works perfectly, but when I install it on the target machine it is giving a null reference...
Read more >Cannot run the Netflix Modern app on Windows 8.1
I'm trying to run the Netflix Modern app on my PC running Windows 8.1. To be clear, this is the app that you...
Read more >NullReferenceException when reading a linux dump taken ...
Hello,. I want to be able to open memory dumps taken on linux. I purchased dotMemory since it is advertised that it supports...
Read more >Targeting your Windows 8.1 app to the correct version of ...
In the Solution Explorer, expand the References folder, right-click the reference to the pre-release version of Windows 8.1 (e.g. “Microsoft.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same problem. It happens when I try to call CreateTableAsync like so:
And LibraryEntry is this:
The Create table call is in an async method that gets called on app startup. I have the same stack trace as the OP.
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/WPH-B306#fbid=
At about 34:00, in Andy Wigley’s video above, there is what appears to be a good solution to avoiding the async race condition problem, when accessing a sqlite db ( even though he’s lecturing about SqliteRT).
The GetDatabaseAsync() function, specifically.