【问题标题】:Windows 8 comctl32.dll access violationWindows 8 comctl32.dll 访问冲突
【发布时间】:2016-05-17 02:17:54
【问题描述】:

我在 Windows 8 上遇到以下异常。但它适用于 Windows 7 环境。看起来这个异常是由 comctl32.dll 引发的。我已经完成了以下问题,其中工具提示与组合框无关。

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:

【问题讨论】:

    标签: comctl32


    【解决方案1】:

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

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

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

    其中“this”是一个控件(例如,表单)。

    BeginInvoke(...) 您调用的授权将以适当的方式进行处理。

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

    【讨论】:

      【解决方案2】:

      我们已经开始遇到同样的问题,但只是从 2016 年 5 月 5 日开始。多年来未触及的客户端安装开始崩溃,并在 comctl32.dll 中出现访问冲突。

      事实证明,AVG(防病毒软件)以某种方式导致了此问题。还有其他论坛和主题报告了类似问题。

      对于我们的应用程序,有两件事起作用;

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

      2) 禁用 AVG

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-11-18
        • 2012-01-05
        相关资源
        最近更新 更多