Windows 8 comctl32.dll access violation - comctl32

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

Related

Deploying application crash

In the Event Log:
Application: xxx.exe
Framework Version: 0.0.0.0
Exception code: 0xc0000005
Fault offset: 0x0000000000df7bf3
Faulting process id: 0x1e60
Faulting application start time: 0x01d82e8d9c60d092
Faulting application path: : C:\Program Files (x86)\xxx.exe
Faulting module path: : C:\Program Files (x86)\xxx.exe
I'm not sure why the faulting module path is for the our exe. Before this issue happened, I was having a faulting module path of QT5Core.dll.
After I fixed that QT5Core.dll error, this crash happened.
Can I have some clue on what might caused this?
The application runs fine on a developing environment, but crashed in deploying environment.

Service Fabric Cluster Deploy Fails

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/

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.

Powershell crashing due to memory constants

I've got a server running around 500 powershell processes. Each of these processes are designed to make WMI calls across our environment. I've been careful to verify that I do not use up all of the server's available memory or CPU. When I have all 500 processes running, I'm at around 70% memory usage.
Just in case anybody is wondering how the individual processes are handled, they are executed using a gearman job worker. Basically a shell python script that calls a powershell script...times 500.
The issue i'm running into is that some of my powershell processes are crashing after running a few hours.
Some of the errors that I'm getting are:
A new guard page for the stack cannot be created
When I open event viewer, I see these events when processes crash
Fault bucket , type 0
Event Name: PowerShell
Response: Not available
Cab Id: 0
Problem signature:
P1: powershell.exe
P2: 6.3.9600.16394
P3: System.OutOfMemoryException
P4: System.OutOfMemoryException
P5: oft.PowerShell.ConsoleHost.ReportExceptionFallback
P6: lization.EncodingTable.nativeCreateOpenFileMapping
P7: Consol.. main thread
P8:
P9:
P10:
Attached files:
These files may be available here:
C:\path
Analysis symbol:
Rechecking for solution: 0
Report Id: ID
Report Status: 2048
Hashed bucket:
I'm guessing it has something to do with powershell running out of memory, but the server is not peaked, and not all processes crash, it is sporadic.
Any help would be appreciated.
Here are more crash results, the powershell fault module names are different from time to time:
Problem Event Name: APPCRASH
Application Name: powershell.exe
Application Version: 6.3.9600.16384
Application Timestamp: 52158733
Fault Module Name: ntdll.dll
Fault Module Version: 6.3.9600.16408
Fault Module Timestamp: 523d45fa
Exception Code: c00000fd
Exception Offset: 00069abb
OS Version: 6.3.9600.2.0.0.272.7
Locale ID: 1033
Additional Information 1: 624b
Additional Information 2: 624b484d3cf74536f98239c741379147
Additional Information 3: a901
Additional Information 4: a901f876e92d1eb79eb3a513defef0c6
Problem signature:
Problem Event Name: APPCRASH
Application Name: powershell.exe
Application Version: 6.3.9600.16384
Application Timestamp: 52158733
Fault Module Name: combase.dll
Fault Module Version: 6.3.9600.16408
Fault Module Timestamp: 523d3001
Exception Code: c00000fd
Exception Offset: 0001a360
OS Version: 6.3.9600.2.0.0.272.7
Locale ID: 1033
Additional Information 1: 81ca
Additional Information 2: 81cae32566783b059420874b47802c3e
Additional Information 3: b637
Additional Information 4: b6375e6f6a866fc9d00393d4649231b8
have you looked at your max memory allocation per shell?
get-item WSMan:\localhost\Shell\MaxMemoryPerShellMB
and if its too low changing this;
set-item WSMan:\localhost\Shell\MaxMemoryPerShellMB 2048
Doesn't .Net have a limit of memory?
If you're using TaskManager to check on memory usage, you might try Process Explorer instead. It sometimes gives very different results.
Thanks everyone for the responses, it turns out that I had a memory leak in my powershell code that was causing memory usage to spike every now and then. Since I was not watching the server at every second, I missed when the memory usage spiked.
An interesting note, it appears that Powershell will not use more then 80% of available memory on a server before killing its own processes.
I had to increase the available memory to 56GB and now I'm not running into any issues whatsoever. I've been running 600 powershell processes for a week now and have not had one crash on me.

Periodic W3WP.exe crash

I have ASP.NET application. Periodicaly it is down and make my users unhappy.
In log I see:
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
Faulting module name: nlssorting.dll, version: 4.0.30319.261, time stamp: 0x4ec9f3aa
Exception code: 0xc00000fd
Fault offset: 0x0000000000002296
Faulting process id: 0xfe4
Faulting application start time: 0x01cd23bb335b5514
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\nlssorting.dll
Report Id: f25aaeba-8fae-11e1-aeea-0030488d6555
In crash dumps I see:
00000000`18187760 00000000`ffffffff app_code!FunBeatRace.Configuration.SiteConfiguration.get_CurrentBrand+0x5a
00000000`181877a0 00000000`ffffffff app_code!FunBeatRace.Globalization.CustomResourceProvider.CreateResourceKeyFromCultureName+0x16
00000000`181877f0 00000000`ffffffff app_code!FunBeatRace.Globalization.CustomResourceProvider.GetResourceCache+0x78
00000000`181878c0 00000000`ffffffff app_code!FunBeatRace.Globalization.CustomResourceProvider.System.Web.Compilation.IResourceProvider.GetObject+0x9b
00000000`18187900 00000000`ffffffff system_web_ni!System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject+0x1f
00000000`18187940 00000000`ffffffff system_web_ni!System.Web.HttpContext.GetGlobalResourceObject+0x27
this is normal application work.
But after that happening
000000001819D600 000007FF001E116B App_Code!FunBeatRace.Configuration.SiteConfiguration.get_CurrentBrand()+0x1cb
000000001819D640 000007FF001E2F06 App_Code!FunBeatRace.Globalization.CustomResourceProvider.CreateResourceKeyFromCultureName(System.String)+0x16
000000001819D690 000007FF001E29E8 App_Code!FunBeatRace.Globalization.CustomResourceProvider.GetResourceCache(System.String)+0x78
MANAGED_STACK_COMMAND: _EFN_StackTrace
LAST_CONTROL_TRANSFER: from 000007fef99c3742 to 000007fef80b2296
ADDITIONAL_DEBUG_TEXT: Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]
FAULTING_THREAD: ffffffffffffffff
BUGCHECK_STR: APPLICATION_FAULT_STACK_OVERFLOW_WRONG_SYMBOLS_CALL
PRIMARY_PROBLEM_CLASS: STACK_OVERFLOW_CALL
DEFAULT_BUCKET_ID: STACK_OVERFLOW_CALL
STACK_TEXT:
00000000`18187530 00000000`ffffffff mscorlib_ni!DomainNeutralILStubClass.IL_STUB_PInvoke+0xbe
00000000`18187620 00000000`ffffffff mscorlib_ni!System.Globalization.CompareInfo.GetHashCodeOfString+0xa9
00000000`18187670 00000000`ffffffff mscorlib_ni!System.Collections.Hashtable.get_Item+0x5c
00000000`18187720 00000000`ffffffff system_web_ni!System.Web.SessionState.SessionStateItemCollection.get_Item+0x32
In result we have:
SYMBOL_NAME: mscorlib_ni!DomainNeutralILStubClass.IL_STUB_PInvoke
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: mscorlib_ni
IMAGE_NAME: mscorlib.ni.dll
DEBUG_FLR_IMAGE_TIMESTAMP: 4ec9f74e
STACK_COMMAND: _EFN_StackTrace ; ** Pseudo Context ** ; kb
FAILURE_BUCKET_ID: STACK_OVERFLOW_CALL_c00000fd_mscorlib.ni.dll!DomainNeutralILStubClass.IL_STUB_PInvoke
BUCKET_ID: X64_APPLICATION_FAULT_STACK_OVERFLOW_WRONG_SYMBOLS_CALL_mscorlib_ni!DomainNeutralILStubClass.IL_STUB_PInvoke
WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/w3wp_exe/7_5_7601_17514/4ce7afa2/nlssorting_dll/4_0_30319_261/4ec9f3aa/c00000fd/00002296.htm?Retriage=1
Followup: MachineOwner
But I dont undertand in what trouble.
Please advice me how I can resolve this issue.
This looks similar: http://connect.microsoft.com/VisualStudio/feedback/details/665157/nlssorting-fault-crashes-iis
You may also find value in trying to catch errors in Global.asax.cs's Application_Error() method with code like so:
protected void Application_Error(Object sender, EventArgs e) {
Exception ex = HttpContext.Current.Server.GetLastError();
// handle it
HttpContext.Current.Context.ClearError();
}
In time you may also ramp up into a solution like How to get ELMAH to work with ASP.NET MVC [HandleError] attribute?
According to Microsoft's documentation w3wp.exe crashes sometimes when encounters an unhandled exception.
According to my experience w3wp.exe crashes when stack gets hopelessly corrupted due to overflow, and this kind of error can not be handled by try-catch block because of memory corruption.
The primary reason could be too many recursive calls, because each call uses some amount of stack until exited. May be there is an infinite recursion?
The second reason is poor memory management in w3wp.exe or in .NET Framework that allows memory corruption to happen instead of detecting this situation and informing user about Stack Overflow.