Page 1 of 1

COM object CPU leak in Win 10

Posted: 11 Jul 2019, 20:39
by pneumatic
This only occurs on my Windows 10 install (v1903 May 2019). Windows 7 appears unaffected.

Code is from

(it just downloads the current version number of ahk from

Code: Select all


^1::  ;Ctrl+1
req := ComObjCreate("Msxml2.XMLHTTP")
	; also try Msxml2.XMLHTTP.3.0 , Msxml2.XMLHTTP.6.0 , Msxml2.ServerXMLHTTP
	; Msxml2.ServerXMLHTTP.3.0 , Msxml2.ServerXMLHTTP.6.0 , Microsoft.XMLHTTP"GET", "", true)
req.onreadystatechange := Func("Ready")

global req
	if (req.readyState != 4)  ; Not done yet.
	if (req.status == 200) ; OK.
		MsgBox % "Latest AutoHotkey version: " req.responseText
		MsgBox 16,, % "Status " req.status
	req := ""
When the script is launched, CPU usage is zero as it should be:


Press Ctrl+1 to download the file


Download complete, but now CPU usage is pegged at 0.02


It seems that some thread belonging to the COM object must still be alive and needs to be released or closed the right way?

I've tried disconnecting the ComObj from events with ComObjConnect() and releasing its interface pointer with ObjRelease() (after getting it with ComObjType() and ComObjQuery() ).

Re: COM object CPU leak in Win 10  Topic is solved

Posted: 12 Jul 2019, 06:14
by swagfag
its not doing it on my computer
the only time cpu time is consumed is (1) when the script is first launched, (2) when the xmlhttprequest is made, (3) when msgboxes show up and when u interact with them(move, mouseover, destroy)

Re: COM object CPU leak in Win 10

Posted: 12 Jul 2019, 06:42
by pneumatic

I guess it must be something about my system configuration causing it. I will try a fresh install of Windows.

Re: COM object CPU leak in Win 10

Posted: 12 Jul 2019, 20:42
by pneumatic
Found the culprit, it was the motherboard's ethernet controller driver ("Killer E2200 Gigabit Ethernet Controller"). Motherboard is an Asrock Z97X Killer. I already knew that Killer ethernet software was dodgy as its "bandwidth control" feature was randomly turning itself on and throttling my network traffic to a few mbps.