System.Collections.Generic.KeyNotFoundException in mscorlib.dll at runtime
joshfitabase opened this issue · 3 comments
When I run this sample, I get a stream of "Exception thrown: 'System.Collections.Generic.KeyNotFoundException' in mscorlib.dll"
I've pulled the latest source, restarted VS, restarted my machine, cleaned/rebuilt, and even updated to the latest Service Fabric SDK. I get the same issue when I perform file->new Stateful Service.
It seems like I'm not the only person having difficulty running the samples:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/6ca0527a-8aa7-44e4-bca2-7087f217a434/problem-deploying-helloworldstateful-stateful-service?forum=AzureServiceFabric
Any advice on this? Is there something obvious that I haven't tried? What information can I provide to help track this down?
These likely are just first chance exceptions coming from within the reliable collections stack. If they're not bubbling up into your actual code or being thrown directly from your use of the collections in your own code, you can ignore them.
Matt, these are preventing debugging, outputs are not showing...
`Exception thrown: 'System.Collections.Generic.KeyNotFoundException' in mscorlib.dll
Exception thrown: 'System.Runtime.InteropServices.COMException' in Microsoft.ServiceFabric.Data.Impl.dll
Exception thrown: 'System.Collections.Generic.KeyNotFoundException' in mscorlib.dll
Service Status:
fabric:/Services/Cryptography is not ready, 1 partitions remaining.
Service Status:
fabric:/Services/Cryptography is ready.
The application is ready.
Finished executing script 'Get-ServiceFabricApplicationStatus'.
Time elapsed: 00:00:38.0942660
The thread 0x3e38 has exited with code 0 (0x0).
The thread 0x1be0 has exited with code 0 (0x0).
The thread 0x112c has exited with code 0 (0x0).
The thread 0x2600 has exited with code 0 (0x0).
The thread 0x22b8 has exited with code 0 (0x0).
The thread 0x4ea4 has exited with code 0 (0x0).
The thread 0x57bc has exited with code 0 (0x0).
The thread 0x3efc has exited with code 0 (0x0).`
I don't think Cryptography is one of the services in this sample. Can you show the exact code snippet (or just point at it in the repo) where you are hitting it? Showing the behavior you are seeing in the debugger itself will also help. That said in both your case and the linked example the likely cause is the same - first chance exceptions that are getting thrown at other layers. Can you check to see if this is the issue? https://blogs.msdn.microsoft.com/visualstudioalm/2015/01/07/understanding-exceptions-while-debugging-with-visual-studio/