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

后端 未结 3 1508
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-30 04:58

We are having an issue with our Windows forms application where it is terminating due to an unhandled exception of type AccessViolationException that the stack trace is indi

3条回答
  •  佛祖请我去吃肉
    2020-12-30 05:05

    According to MS, there is a known issue with the DataGrid control in certain situations, and the way to avoid this issue is to disable Tooltips for your DataGrid controls.

    We will be implementing the change and rolling it out to a pilot group in the next couple of days, I'll post back with success/failure in about a week (unless of course failure happens before then).

    The property to set according to MS is DataGridView.ShowCellToolTips = false;

    This fixed the issue for our application.

    To reproduce the issue, we needed to do the following:

    • Hover the mouse over a cell in our DataGridView that we knew would show a tooltip
    • Alt tab to another application (that will display on top of your application) before the tooltip is shown
    • Do not move the mouse
    • Alt tab back to our application
    • Our application crashes.

提交回复
热议问题