这是indexloc提供的服务,不要输入任何密码
Skip to content

Major PC Slowdown Issue with SetWindowsHookEx #270

@bitkidinc

Description

@bitkidinc

I use AvalonDock for my game editor. As long as I can remember, I've had issues with my PC slowing down after running for a day or two straight. Eventually it got worse to the point my mouse would get so slow it was unusable, and strangely caused a beeping sound through the speakers (not motherboard). I figured it was a hardware issue, possibly USB conflicts and spent months troubleshooting by swapping out devices etc. Eventually I ruled out hardware after I built a completely new computer and tried swapping out every USB device. I finally started searching for the problem in relation to Visual Studio and happened upon this article that mentions the same exact issue:

http://the-witness.net/news/2012/12/finding-and-fixing-a-five-second-stall/

He said it completely cleared up after a few seconds, but on my machine it would be much slower than normal after becoming somewhat usable again. Long story short, the culprit was SetWindowsHookEx that they used to hook into keyboard changes so they could ignore the Windows key while the game was open. I knew I wasn't using that on the game side, but after searching through the editor I found a spot in the AvalonDock using it for focus changing events. I disabled the hook and suddenly after YEARS of issues my PC is running beautifully with the editor open for days straight. Is there some other way to achieve the same functionality without using SetWindowsHookEx?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions