I wanted to kick the tires of a service fabric stateful actor service, so I created a suitable project in VS2015.1 and made no change to the generated code. I then ran/debugged the solution. I received the following error:
System.Runtime.InteropServices.COMException was unhandled
Message: An exception of type 'System.Runtime.InteropServices.COMException' occurred in System.Fabric.dll and wasn't handled before a managed/native boundary
Additional information: Exception from HRESULT: 0x80071BC5
Thinking that there may be some interference between existing services in my application, I also built a brand new service fabric solution and stateful actor service project (taking all the defaults). This project failed in the exact same way.
- Can anyone else confirm this behavior? (it may be something in my dev environment)
- Any suggestions on what may be happening?
- What is the best way to get more information on what is failing? (not much is coming across that com boundary, it seems)
- Should I be attempting this outside the visual studio tooling?
Update 1:
After dismissing the COMException, I also get:
---------------------------
Microsoft Visual Studio
---------------------------
Unable to start debugging 'C:\SfDevCluster\Data\_App\Node.3\Application1Type_App41\Actor1Pkg.Code.1.0.0\Actor1.exe'.
The process has been terminated.
Refresh the process list before attempting another attach.
---------------------------
OK
---------------------------
Update 2:
As I had an issue with the Visual Studio 2015.1 install/upgrade, I was unsure if that may have had something to do with this problem. Further, a co-worker followed the same steps and had no issue. So I just finished re-installing VS2015.1 directly, the SF SDK, and all prerequisites. Unfortunately there is no change. :(
I should also say that every time i hit this error, the Service Fabric Local Cluster Manager breaks as well. If i try to open the manager i get the notification: "Failed to open the local cluster manager"
Also, I do indeed have the SF application project as my startup project in the solution. (again, i have had other SF applications work...it just dies as soon as i try a stateful actor service in a new or existing SF application).
Update 3:
I should have thought to provide this earlier, but here is the callstack...something to do with reminders?
[Managed to Native Transition]
System.Fabric.dll!System.Fabric.KeyValueStoreItemEnumerator.MoveNextHelper() Unknown
System.Fabric.dll!System.Fabric.Interop.Utility.WrapNativeSyncInvoke<bool>(System.Func<bool> func, string functionTag, string functionArgs) Unknown
System.Fabric.dll!System.Fabric.KeyValueStoreItemEnumerator.MoveNext() Unknown
Microsoft.ServiceFabric.Actors.dll!Microsoft.ServiceFabric.Actors.KvsActorStateProvider.Enumerate<Microsoft.ServiceFabric.Actors.ActorReminderData>(string keyPrefix, System.Func<byte[], Microsoft.ServiceFabric.Actors.ActorReminderData> deserializeFunc) Unknown
Microsoft.ServiceFabric.Actors.dll!Microsoft.ServiceFabric.Actors.KvsActorStateProvider.Microsoft.ServiceFabric.Actors.IActorStateProvider.LoadRemindersAsync.AnonymousMethod__2a() Unknown
mscorlib.dll!System.Threading.Tasks.Task.Execute() Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot) Unknown
mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution) Unknown
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Unknown
Update 4
I used a more forceful (and less diagnostic) approach. I rebuilt my dev machine. Based on the odd behavior I experienced in the Update 1 install, I was worried I had compromised my build box. I rebuilt the OS, re-installed vs2015.1 and the SF SDK, and now it works fine. Your mileage may vary :|