Thursday, February 04, 2010

Have a PDC09 Acer 1420p? Having the SDTabletPC handle leak issue? Brian Peek as got something you’re going to want to get… [Insert “There’s a Fix for that” humorous comment here]

BrianPeek.com - Acer 1420P Leaky Handle Driver Fix

“I wasn’t lucky enough to receive the Acer 1420P laptop given out at PDC this year since I was “staff”, however I wound up picking one up on eBay for a very reasonable price.  I received it last week, added an additional 2GB of RAM, used my Windows Home Server to save off the original hard drive image, and then repaved the machine, installing Windows 7 Ultimate x64, drivers, and applications from scratch.  Earlier this week I noticed the machine was consuming over 3GB of memory with only 1 or 2 applications open.  Looking at Task Manager, the RAM usage by process looked normal, which didn’t match the total memory usage.  After reading the Performance tab a bit more, I saw that the operating system had over 5 million handles open!

Back on the Processes tab, I turned on the Handles column and saw that a process named SDTabletPC.exe was consuming the 5 million handles, and it was growing by 10 handles per second [GD: Emphasis added].  This file is installed and run after installing the latest accelerometer driver (v1.00.00.16) from Acer’s support site.  This driver and executable are responsible for rotating the screen based on the machine orientation in tablet mode.

I was unable to fix the executable by patching in calls to CloseHandle, so I took another approach.  I wrote a very small app in C which finds the SDTabletPC.exe process, opens a process handle to it, enumerates all of its open handles, and forcefully closes all those that are handles to \Device\STHall.  The application then sleeps for 5 seconds and repeats the process forever.

I have put the application and its source code up for download here [GD: Click through for the download link… I don’t want to leach all his traffic].  Note that this fix is only for the latest version of the driver shown here, version 1.00.00.16.  I know it won’t work with the driver installed in the default PDC image and I can’t guarantee it’ll work with newer drivers.  So if you’re still running the original PDC driver, make sure you head to Acer’s support site and download the latest version

image

…”

So there I was, my trusty PDC09 Acer 1420p in hand and looking at the Task Manager, “2 million handles! WTH?” Yeah, a single process had 2 million handles. I just had to laugh out loud, it was so over the top…

Needless to say I killed that beast. Then I went to the Acer site, grabbed the latest version of the driver and tried that. Same issue… sigh

Since I don’t use the functionality that driver provides, I’ve been killing it and checking for updates each time (yeah, yeah, I could have just nuked its Run entry, but I wanted a reminder to check for updates and since I only reboot once a month or two…)

Then Brian pinged me about a fix he was working on.

Talk about humbling… Here I was whining about it, sitting on the sidelines doing nothing and there he is firing up his debugger, Visual Studio and banging out a fix  (+10 Dev Geek Cred’s to Brian, –10 to Greg).

So Brian has not only created and released a “Fix” utility, but documented the process he went through, the resources he used and his source too! Nice…

No comments: