Windows 8 comctl32.dll访问冲突

时间:2014-08-07 09:54:29

标签: comctl32

我在Windows 8上遇到以下异常。但它适用于Windows 7环境。它看起来这个异常是由comctl32.dll引发的。我已经浏览了下面的工具提示问题而不是comboxbox。

AccessViolationException on ToolTip that faults COMCTL32.dll - .NET 4.0

应用程序:Application.exe 框架版本:v4.0.30319 描述:由于未处理的异常,进程终止。 异常信息: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:

2 个答案:

答案 0 :(得分:0)

我发现这个问题不仅在WPF中发生(崩溃),而且在WinForms中也是如此。 很难说问题的根源是什么,但似乎与OpenFileDialog相关的Microsoft dll有bug(对我来说,它是ComDlg32.dll,OpenFileDialog,ShowDialog()调用)

我可以调用ShowDialog()函数的唯一方法是将它包装在事件中并在

的帮助下调用
this.BeginInvoke(
        new Action<YourObject, EventArgs>(YourObject_FileDialogOpened), new object[] 
                                                        { YourObjectInstance, e });

其中&#34;这个&#34;是一个控件(例如,表单)。

BeginInvoke(...)授予您调用将以正确方式处理的权限。

如果在按钮点击事件或任何其他类似场景下使用OpenFileDialog调用,则不会出现问题。

答案 1 :(得分:0)

我们已经开始遇到同样的问题,但仅限于2016年5月5日。多年来未触及的客户端安装因comctl32.dll中的访问冲突而崩溃。

事实证明,AVG(防病毒软件)在某种程度上导致了这个问题。还有其他论坛和主题报告类似的问题。

对于我们的应用程序,有2件工作;

1)在XP SP3兼容模式下运行(即使在Windows 8或10上)

OR

2)禁用AVG