Service Fabric Cluster Deploy Fails - azure-service-fabric

I'm having a problem deploying a cluster to Azure. I'm using the template provided through Visual Studio (2017) as described here, securing it with a server/cluster certificate
as described here.
I'm deploying via Visual Studio and the template seems to deploy successfully without any errors. However, when looking at the cluster in the portal it gets stuck in the "Deploying" state with no nodes appearing.
RDP:ing into individual nodes and looking in the event viewer (Windows Logs/System) revelas that the Azure Service Fabric Node Bootstrap Agent service is stuck in loop, starting/stopping seemingly indefinitely.
Looking under Windows Logs/Application i can see the following (4) errors/warnings repeated for each restart attempt:
Failed starting service, Error: System.ArgumentNullException: Value cannot be null.
Parameter name: path
at System.IO.Path.GetFullPathInternal(String path)
at Microsoft.Azure.ServiceFabric.Extension.Core.SetupHelper.ConfigNode(Byte[] clusterManifest, String nodeTypeRef, String machineName, String ipAddress, String faultDomain, String upgradeDomain, String dataRoot)
at Microsoft.Azure.ServiceFabric.Extension.Core.NodeBootstrapAgent.TryConfigNode(RuntimeCluster clusterConfig, NodeDescription nodeDescription)
at Microsoft.Azure.ServiceFabric.Extension.Core.NodeBootstrapAgent.StartFabricHostService(Boolean isBootstrapping)
ERROR: System.ArgumentNullException: Value cannot be null.
Parameter name: path
at System.IO.Path.GetFullPathInternal(String path)
at Microsoft.Azure.ServiceFabric.Extension.Core.SetupHelper.ConfigNode(Byte[] clusterManifest, String nodeTypeRef, String machineName, String ipAddress, String faultDomain, String upgradeDomain, String dataRoot)
at Microsoft.Azure.ServiceFabric.Extension.Core.NodeBootstrapAgent.TryConfigNode(RuntimeCluster clusterConfig, NodeDescription nodeDescription)
at Microsoft.Azure.ServiceFabric.Extension.Core.NodeBootstrapAgent.StartFabricHostService(Boolean isBootstrapping)
at Microsoft.Azure.ServiceFabric.Extension.Core.NodeBootstrapAgent.d__d.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 Microsoft.Azure.ServiceFabric.Extension.Core.NodeBootstrapAgent.d__0.MoveNext()
Application: ServiceFabricNodeBootstrapAgent.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException
at System.IO.Path.GetFullPathInternal(System.String)
at Microsoft.Azure.ServiceFabric.Extension.Core.SetupHelper.ConfigNode(Byte[], System.String, System.String, System.String, System.String, System.String, System.String)
at Microsoft.Azure.ServiceFabric.Extension.Core.NodeBootstrapAgent.TryConfigNode(Microsoft.Azure.ServiceFabric.Extension.Core.RuntimeCluster, Microsoft.Azure.ServiceFabric.Extension.Core.NodeDescription)
at Microsoft.Azure.ServiceFabric.Extension.Core.NodeBootstrapAgent.StartFabricHostService(Boolean)
at Microsoft.Azure.ServiceFabric.Extension.Core.NodeBootstrapAgent+d__d.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
at Microsoft.Azure.ServiceFabric.Extension.Core.NodeBootstrapAgent+d__0.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
at Microsoft.Azure.ServiceFabric.Extension.Service.Service+d__0.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_1(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
Faulting application name: ServiceFabricNodeBootstrapAgent.exe, version: 1.0.0.143, time stamp: 0x58c87254
Faulting module name: KERNELBASE.dll, version: 6.3.9600.18340, time stamp: 0x57366075
Exception code: 0xe0434352
Fault offset: 0x0000000000008a5c
Faulting process id: 0x9b0
Faulting application start time: 0x01d29d73912bda98
Faulting application path: C:\Packages\Plugins\Microsoft.Azure.ServiceFabric.ServiceFabricNode\1.0.0.34\Service\ServiceFabricNodeBootstrapAgent.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: cf297669-0966-11e7-80c5-000d3a27d68c
Faulting package full name:
Faulting package-relative application ID:
Restarting the nodes does not help and I have verified that that the certificate gets installed on the VMs. I'm getting no errors logged in the portal, just the "Deploying" message on the cluster. Nodes are Windows Server R2.
Any ideas? Obviously the path given to System.IO.Path.GetFullPathInternal is null but what could cause that?

Maybe this is the right answer: http://amolenk.com/2017/03/15/ServiceFabricNodeBootstrapAgent-breaking-change/

Related

Patch Orchestration Application issue - NodeAgentSFUtility.exe crashing

so I'm working on getting POA going. The issue I'm running into is that as soon as the Node Agent NT Service (POSNodeSvc) starts, it runs NodeAgentSFUtility.exe which then fails with the below exception and an HRESULT of 80071c43 which seems to mean "connection denied". No logs are present. They both runs as SYSTEM . Running this on an on prem cluster using Windows security. BTW, all the SF services for POA are showing green in the SF Explorer, so it seems that there perhaps is room for better health reporting around this exe not running correctly.
Application: NodeAgentSFUtility.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException
at System.Fabric.Interop.NativeClient+IFabricQueryClient9.EndGetApplicationList2(IFabricAsyncOperationContext)
at System.Fabric.FabricClient+QueryClient.GetApplicationListAsyncEndWrapper(IFabricAsyncOperationContext)
at System.Fabric.Interop.AsyncCallOutAdapter2`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Finish(IFabricAsyncOperationContext, Boolean)
Exception Info: System.Fabric.FabricConnectionDeniedException
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
at Microsoft.ServiceFabric.PatchOrchestration.NodeAgentSFUtility.Helpers.CoordinatorServiceHelper+<GetApplicationDeployedStatusAsync>d__1.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
at Microsoft.ServiceFabric.PatchOrchestration.NodeAgentSFUtility.CommandProcessor+<GetApplicationDeployedStatusAsync>d__10.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
at Microsoft.ServiceFabric.PatchOrchestration.NodeAgentSFUtility.CommandProcessor+<ProcessArguments>d__5.MoveNext()
Exception Info: System.AggregateException
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean)
at System.Threading.Tasks.Task.Wait(Int32, System.Threading.CancellationToken)
at Microsoft.ServiceFabric.PatchOrchestration.NodeAgentSFUtility.Program.Main(System.String[])
I was able to make this work by adding the following to the cluster manifest:
"ClientIdentities": [
{
"Identity": "NT AUTHORITY\\SYSTEM",
"IsAdmin": true
}
]
Not quite sure if this really is needed? Can someone please confirm. There is no mention of this in the POA docs - https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-patch-orchestration-application
Thanks,
Hans
There appears to be a POA fix coming to address this. See link in above comment.

Failed to Create Development Service Fabric Cluster on Windows Server 2016 Standard

I am attempting to create a local development (unsecured) Service Fabric Cluster on Windows Server 2016 Standard. I have followed the instructions found in this article. However, I'm getting a rather interesting error and cannot find anything to help me resolve this.
FabricHostSvc was not installed by FabricInstallerSvc on machine
localhost. FabricSetup may have failed. CreateCluster Error:
System.AggregateException: One or more errors occurred. --->
System.Fabric.FabricServiceNotFoundExc eption: FabricHostSvc was not
installed by FabricInstallerSvc on machine localhost. FabricSetup may
have failed. at
Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.StartAndValidateInstallerServiceCompletion(Str
ing machineName, ServiceController installerSvc) at
System.Threading.Tasks.Parallel.<>c__DisplayClass17_01.<ForWorker>b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at
System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object
) --- End of inner exception stack trace --- at
System.Threading.Tasks.Task.ThrowIfExceptional(Boolean
includeTaskCanceledExceptions) at
System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout,
CancellationToken cancellationToken) at
System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive,
Int32 toExclusive, ParallelOptions parallel Options, Action1 body,
Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit,
Action1 localFinally) at
System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable1
source, ParallelOptions parallelOption s, Action1 body, Action2
bodyWithState, Action3 bodyWithStateAndIndex, Func4
bodyWithStateAndLocal, Func5 bodyWithE verything, Func1 localInit,
Action1 localFinally) at
System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable1 source,
Action1 body) at
Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.RunFabricServices(List1
machines, FabricPacka geType fabricPackageType) at
Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.<CreateClusterAsyncInternal>d__7.MoveNext()
---> (Inner Exception #0) System.Fabric.FabricServiceNotFoundException: FabricHostSvc was not
installed by FabricInstall erSvc on machine localhost. FabricSetup may
have failed. at
Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.StartAndValidateInstallerServiceCompletion(Str
ing machineName, ServiceController installerSvc) at
System.Threading.Tasks.Parallel.<>c__DisplayClass17_01.b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at
System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object
)<---
Cleaning up faulted installation. FabricRoot not found in registry of
target machine localhost. Create Cluster failed. For more information
please look at traces in FabricLogRoot. Create Cluster failed with
exception: System.AggregateException: One or more errors occurred.
---> System.AggregateExcep tion: One or more errors occurred. at Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.d__7.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
Microsoft.ServiceFabric.DeploymentManager.DeploymentManager.d__0.MoveNext()
--- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean
includeTaskCanceledExceptions) at
System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout,
CancellationToken cancellationToken) at
Microsoft.ServiceFabric.Powershell.ClusterCmdletBase.NewCluster(String
clusterConfigurationFilePath, String fabric PackageSourcePath, Boolean
cleanupOnFailure)
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. at
Microsoft.ServiceFabric.DeploymentManager.DeploymentManagerInternal.d__7.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
Microsoft.ServiceFabric.DeploymentManager.DeploymentManager.d__0.MoveNext()<---
Has anyone encountered this error before and fixed it? How is this error resolved?
Side Note: After receiving this error I ran the CleanFabric PowerShell script and removed all the Service Fabric files from the server and tried running the installation again with the same error message.
In addition, there are no Service Fabric SDKs installed on the machine (the ones you'd use on a local development machine). The reason for this is due to the official prerequisites stated by Microsoft shown below.
Prerequisites for each machine that you want to add to the cluster:
1. A minimum of 16 GB of RAM is recommended.
2. A minimum of 40 of GB available disk space is recommended.
3. A 4 core or greater CPU is recommended.
4. Connectivity to a secure network or networks for all machines.
5. Windows Server 2012 R2 or Windows Server 2012 (you need to
have KB2858668 installed).
6. .NET Framework 4.5.1 or higher, full install.
7. Windows PowerShell 3.0. The RemoteRegistry service should be running on all the machines.
The cluster administrator deploying and configuring the cluster must have administrator privileges on each of the machines. You cannot install Service Fabric on a domain controller.
I cannot help but feel there is something obvious missing but I've followed the docs very closely so this is rather perplexing.
Service Fabric drivers have a signing issue which is preventing them from being installed on Windows Server 2016 and Windows 10 Anniversary edition. Please wait for the next version or try with version 5.2.

GitHub for Windows crashes every time on startup on Windows 10

I've recently updated my computer and graphics driver to the latest version, and GitHub does not run anymore. Running it will cause GitHub to crash. I assume that GitHub has been unintentionally broken.
Here's the application error log.
Faulting application name: GitHub.exe, version: 3.0.12.0, time stamp: 0x56a69eea
Faulting module name: amdocl.dll, version: 10.0.1912.5, time stamp: 0x567ac8c3
Exception code: 0xc0000005
Fault offset: 0x0023525b
Faulting process id: 0x1608
Faulting application start time: 0x01d15c401c7bc7b1
Faulting application path: C:\Users\Bryan See\AppData\Local\Apps\2.0\XAE6DH98.VQY\H58NHLOV.P2N\gith..tion_317444273a93ac29_0003.0000_20a3dfa4ba8ba894\GitHub.exe
Faulting module path: C:\WINDOWS\SYSTEM32\amdocl.dll
Report Id: b3979569-4ead-4baf-8df7-9e7677ee1412
Faulting package full name:
I had to assume that the AMD driver is causing this, as I'm running Windows 10 64-bit with virtual desktop resolution is enabled. However, I couldn't get in touch with the support team at GitHub.

EF Code First Migration throws StackOverflowException on Azure Web Role

The issue occurs when executing EF 6.1.2 code first migrations in an Azure Web Role (WS 2012 R2). The same migrations run fine locally, even if I point the connection string to the (Azure) Sql Database.
The StackOverflowException is thrown by Entity Framework code, and the first line of ANY of my migrations doesn´t even get hit.
I have tried running the migrations in three different ways:
DbMigrator migrator = new DbMigrator(configuration);
migrator.Update(); // Here the exception is thrown
second:
DbMigrator migrator = new DbMigrator(configuration);
pendingMigrations = migrator.GetPendingMigrations().ToList();
foreach (string pendingMigration in pendingMigrations)
{
migrator.Update(pendingMigration); // Here the exception is thrown
}
and using web.config:
<contexts>
<context type="Superb.WorkNextDoor.EFRepository.Context.WndDbContext, Superb.WorkNextDoor.EFRepository, Version=1.0.0.0, Culture=neutral">
<databaseInitializer type="System.Data.Entity.MigrateDatabaseToLatestVersion`2[[Superb.WorkNextDoor.EFRepository.Context.WndDbContext, Superb.WorkNextDoor.EFRepository], [Superb.WorkNextDoor.EFRepository.Migrations.Migrations.WndDbMigrationsConfiguration, Superb.WorkNextDoor.EFRepository.Migrations]], EntityFramework">
</databaseInitializer>
</context>
</contexts>
I see the StackOverflowException in Visual Studio when I´m remote debugging the web role. An error is recorded in windows event log of the web role (log info at the bottom of this post).
I have two migrations. I have tried running the first one from PMC and the second from the web role but no luck.
I have tried installing .Net 4.5.2 on the server, changing the VM size from XS to S and downgrading EF to version 6.1.1. Nothing worked. Also, I tried downloading the folder "E:\sites\0" from the web role to my local computer, installed the app on IIS and attached my VS Debugger and it doesn't throw that exception. There has got to be something different between my Windows 8.1 and that Windows Server 2012 R2.
I have spent a lot of time trying different things but I don´t want to give up on this and have to execute my migrations from package manager console.
Log Name: Application Source: Application Error Date:
1/11/2015 3:21:42 AM Event ID: 1000 Task Category: (100) Level:
Error Keywords: Classic User: N/A Computer:
RD0003FF508F5B Description: Faulting application name: w3wp.exe,
version: 8.5.9600.16384, time stamp: 0x5215df96 Faulting module name:
clr.dll, version: 4.0.30319.34014, time stamp: 0x52e0b86c Exception
code: 0xc00000fd Fault offset: 0x0000000000195499 Faulting process id:
0xc60 Faulting application start time: 0x01d02d4d77fdfb93 Faulting
application path: d:\windows\system32\inetsrv\w3wp.exe Faulting module
path: D:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Report
Id: f5e4d6dc-9940-11e4-80bd-0003ff508f5b Faulting package full name:
Faulting package-relative application ID: Event Xml:
1000
2
100
0x80000000000000
467
Application
RD0003FF508F5B
w3wp.exe
8.5.9600.16384
5215df96
clr.dll
4.0.30319.34014
52e0b86c
c00000fd
0000000000195499
c60
01d02d4d77fdfb93
d:\windows\system32\inetsrv\w3wp.exe
D:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
f5e4d6dc-9940-11e4-80bd-0003ff508f5b
Easy steps to reproduce this error:
Download this sample project: http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/migrations-and-deployment-with-the-entity-framework-in-an-asp-net-mvc-application
Add a CloudServiceProject to the solution and add the web project as a web role
Publish it to azure
Browse the web site and go to students tab (this hits the database and the initializer tries to execute the migrations).
Happens the same.
This is identified as a bug in Microsoft Visual Studio 2013 Update 4. As a temporary work around disable "Lazy Initialization" under IntelliTrace Settings -> IntelliTrace Events. We are investigating fixing this bug in a future update for Visual Studio 2013.
The responsible for the StackOverflowException turned out to be IntelliTrace. I don't know the root cause of the issue between IntelliTrace and Code First Migrations that cause this behavior but when I downloaded the IntelliTrace logs I could see a lot of Sql exceptions:
I have already lost a lot of time with this so I won't investigate it further. The easiest workaround for me now is just disable IntelliTrace before deploying my Web Roles:
If somebody is curious, here are the IntelliTrace logs.
I hope this helps someone else solve such a problem without losing as much time as I did.

Windows 8 comctl32.dll access violation

I am getting the following exception on Windows 8. However it works on Windows 7 environment. It looks this exception is thrown by comctl32.dll. I had gone through the below which has issue with the tooltip not with the comboxbox.
AccessViolationException on ToolTip that faults COMCTL32.dll - .NET 4.0
Application: Application.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)
at System.Windows.Forms.NativeWindow.DefWndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control.DefWndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control.WmCommand(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.ComboBox.WndProc(System.Windows.Forms.Message ByRef)
at CCS.UserInterface.MetaComboBox.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
at System.Windows.Forms.Application.Run(System.Windows.Forms.Form)
at <Application>.MainApplication.Load(Splash)
at <Application>.Program.Main(System.String[])
Faulting application name: CCSEnterprise.exe, version: 4.354.4.15321, time stamp: 0x53dfe4c1
Faulting module name: comctl32.dll, version: 6.10.9600.17031, time stamp: 0x5308889d
Exception code: 0xc0000005
Fault offset: 0x00051a6e
Faulting process id: 0x13f8
Faulting application start time: 0x01cfb08bc91cf716
Faulting application path: C:\355AAA\Application.exe
Faulting module path: C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.17031_none_a9efdb8b01377ea7\comctl32.dll
Report Id: 2284a19e-1c7f-11e4-be73-1078d298a609
Faulting package full name:
Faulting package-relative application ID:
I found that this problem occurs (crash) not only in WPF, but for WinForms.
It is hard to say what is the source of the problem, but still it appears that Microsoft dll related to OpenFileDialog has bugs (for me, it was ComDlg32.dll, OpenFileDialog, ShowDialog() call)
The only way I could call ShowDialog() function was to wrap it in the event and call with the help of
this.BeginInvoke(
new Action<YourObject, EventArgs>(YourObject_FileDialogOpened), new object[]
{ YourObjectInstance, e });
where "this" is a Control (for example, Form).
BeginInvoke(...) grants that you call will be process in a proper way.
Problem will not appear if you use call of the OpenFileDialog under button click event or any other similar scenario.
We've started experiencing the same issue, but only since 5th May 2016. Client installations that haven't been touched in years started crashing with access violations in comctl32.dll.
It turns out that AVG (the antivirus software) is somehow causing this issue. There are other forums and threads reporting similar issues.
For our application, 2 things worked;
1) run in XP SP3 compatibility mode (even on Windows 8 or 10)
OR
2) disable AVG