Geeks With Blogs
Ulterior Motive Lounge UML Comics and more from Martin L. Shoemaker (The UML Guy),
Offering UML Instruction and Consulting for your projects and teams.
(UPDATE: This is a rerun of a best-of post from 2006. I applied the fix described below, and have never seen the error in question again.)
Ever since I got my Gateway CX200X — and even before, with my less-than-wonderful Toshiba M200 (which I'm managing to put to productive use, but cautiously) — I've had this annoying problem. When I would shut the lid, with every expectation that that would suspend the machine, I would be deceived. I would put the machine in my backpack, and head off for the road or the plane or wherever, expecting that my machine was obediently sleeping, preserving battery power; and instead, it was still running along, drinking down that battery juice. Yumm! And even worse, it was locked away in my backpack, a confined and somewhat insulated place, where the machine served as a most effective heating system, thoroughly roasting any heat-sensitive system inside — such as, say, itself. And when I would open the backpack, I would pull out a horribly overheated machine with half its battery power gone. And the first thing I would see would be a message box: "Insufficient system resources exist to complete the API." No explanation of which resources were lacking — and trust me, my Gateway's a powerhouse, packed with all the RAM and CPU and disk it could possibly hold, and even the Toshiba has lots of RAM (keep that in mind) — nor which API (Application Programming Interface, or operation for you non-geeks) was failing, nor which program was having the problem. And often the box appeared multiple times. And once I finally closed them all, I could use the half-depleted, overheated machine.

There was one other symptom, which I was sure was related but couldn't prove: if I closed the machine's lid, and then happened to be near it maybe thirty minutes or so later, I would sometimes hear the standard Windows error chime that means "Hey, something just failed." My assumption (true enough, as it happens) was that that error chime corresponded to the message box appearing.

Now since the problem was common to both machines, I naturally assumed that it was due to something I had installed on the Toshiba, and then later moved to the Gateway. But despite some experimentation, I didn't figure out what it might be. I resigned myself to doing a full power down whenever possible. It's a lot slower, but it's safer. But I was still puzzled at what application might be preventing the machine from sleeping.

Little did I suspect that it was the operating system.

Last week, I got fed up with using my machine as a backpack heater, and I got fed up with waiting through power down and power up. So I did a quick Internet search, and I found this Microsoft Knowledge Base article. It explains that this error happens in Microsoft Windows XP SP 2, because of a flaw in the hibernation engine. (And before anyone asks why I used Hibernate rather than the much faster Standby mode: I am using Standby; but I have a battery-saving power mode enabled that switches to Hibernate if it's inactive for half an hour. Or it would if it could; but instead, this error happened. And when it did, the message box would appear, and the error chime would sound. See, it all starts to come together now, eh?)

And the nature of the error has to do with what Hibernate does: it captures the state of your machine, and saves that to your hard drive, and then powers down; but when your machine powers back up, it sees that hibernation state file, and it recreates that state as if your machine had never been sut off. So that means it has to make an exact image of your entire RAM, so that it can reload that exact image when it starts up again. But here's the flaw: sometimes it couldn't get the resources (file handles or something, I don't think I've ever found out) to create the RAM copy; and so rather than lose the contents of your RAM, it would simply refuse to hibernate.

And here's the real kicker: the more memory you had, and the more you used it and fragmented it into a lot of smaller chunks, the more likely it was that the hibernate engine would run out of resources. So if you're somebody like, say, a programmer, who puts a machine through a lot of memory churn... And if you decided when buying a new machine that the best way to deal with memory limits was to just buy lots and lots of memory... Then you were more likely to have this problem!

And as the KB article explains, Microsoft does have a fix. Unfortunately, this problem was found after XP Service Pack 2. And short of utter calamity, Microsoft has no plans for another Service Pack for Windows prior to Vista. And as many of you have probably heard, Vista has been pushed back to the first quarter of next year. So there's no official path to obtain the fix for this problem.

Except for one path: a hotfix. As the KB article explains, Microsoft does offer a hotfix for this problem. For those who haven't run into one before, a hotfix means:

  1. Microsoft hasn't had a chance to test this on nearly as many machines and configurations as they would like.
  2. In particular, Microsoft hasn't had a chance to regression test this. Regression testing is a way of testing that no old bugs have somehow been reintroduced in the process of fixing a new bug.
  3. It may take a little more expertise to install than does a usual set up program.
  4. Microsoft has to be sure that you get the version of the hotfix that's right for your operating system. (XP isn't the only OS where they found this problem.)
  5. Microsoft can't support the hotfix. If you must have it, they strongly encourage you to do a thorough backup before installing it.
  6. Microsoft strongly discourages you from installing the hotfix unless you're actually suffering from the problem it was designed to fix. For instance, most people never hibernate desktops, and not all laptops or Tablets are experiencing this problem, so don't apply the hotfix to those!
In the case of this hotfix, they're extremely cautious to be sure that only people who really need the fix get it, and that they get the right version: they don't offer it as a download, but rather require you to call them on the telephone (how quaint), give them the Knowledge Base article number (that's 909095, for those of you who need it), and request that they email you a URL for the hotfix. And when they send you the URL, it includes a password that expires in a week. They really don't want you to install this unless you absolutely need it.

But I have to tell ya, I installed it Thursday, and already I'm thrilled. Suspend-to-Hibernate transition just works. I know that's no big deal to some of you, but it's a huge deal for me. No more roasted machine!

Now I don't fault Microsoft for having the bug. All code has bugs. I don't fault Microsoft for not releasing another Service Pack with this fix, because I understand that release schedules on a major product like an operating system are very difficult to manage. I won't go into all the reasons, but I'm very sympathetic to how difficult this schedule must be for them. And I'm not even upset about the multiple-step hotfix approach, nor about their caution in releasing it and their reluctance to support it. I think I understand all of their reasoning for these decisions.

But I'm a little annoyed at Microsoft for not publicizing this problem and the hotfix for it more. I have been at two major Tablet PC promotional/educational events at Redmond in the past half year, plus the MVP Summit. Power management came up as an issue at all of them. And the roasting-computer-in-the-backpack problem came up at every one of them. And Microsoft people promised that this was a driving force for some of the advanced power management features coming up in Vista.

But not once did anyone mention that I could have a fix for my immediate problem immediately.

I'm going to assume that the problem is so obscure that most Microsoft people don't even know about it. But at a Tablet PC talk specifically about power management? Where they cite roasting computers as a problem that people are complaining about? I have trouble believing that no one there knew about this problem and the hotfix.

There may be some acceptable explanation for not telling us about this. I'm willing to listen. But there's no reason I can see not to tell the world as loudly as my little blog can. So I'm going to join the chorus of many, many bloggers and others telling the world: "If you're getting to message 'Insufficient system resources exist to complete the API,' read KB article 909095." I can't recommend that you install the hotfix, because only you know how willing you are to risk having to rebuild your machine if something goes wrong; but I can make you aware of the hotfix, and I can let you know that it works on my machine.
Posted on Saturday, November 15, 2008 4:08 PM Support Headaches | Back to top

Related Posts on Geeks With Blogs Matching Categories

Comments on this post: Insufficient system resources exist to complete the API.

# re: Insufficient system resources exist to complete the API.
Requesting Gravatar...
how do you get around this error after i've reformated and during the "installing windows 39mins left then bang it starts restarting over and over agian =(
Left by paul on Nov 17, 2008 10:32 AM

# re: Insufficient system resources exist to complete the API.
Requesting Gravatar...

I wish I had an answer there. It installed fine for me, so I never saw that message. Sorry.
Left by Martin L. Shoemaker on Nov 17, 2008 11:12 AM

# re: Insufficient system resources exist to complete the API.
Requesting Gravatar...
I am having the hibernate problem, but unfortunately the hotfix will not install. After attempting, a box pops up that says "the installation cannot continue because the following packages might no tbe valid". Below, there is a table with SP3_UBER listed in the left column as the offending package and several operating system files in the right column. I have searched an cannot find much on SP3_UBER. I assume that some files have already been updated, and this hotfix has older versions that Windows will not allow.
Left by Pat O on Nov 24, 2008 9:15 PM

# re: Insufficient system resources exist to complete the API.
Requesting Gravatar...
That's a pain, Pat. Your analysis makes sense. I wonder if there's a NEW hotfix.
Left by Martin L. Shoemaker on Nov 24, 2008 9:32 PM

# re: Insufficient system resources exist to complete the API.
Requesting Gravatar...
This made complete sense to me, and worked!
thanks a bunch !
Left by Alien Purlo on Mar 19, 2009 3:45 AM

# re: Insufficient system resources exist to complete the API.
Requesting Gravatar...
iam facing this problem can give a solution.
Left by srinivas.A on Mar 19, 2009 1:04 PM

# re: Insufficient system resources exist to complete the API.
Requesting Gravatar...
Well... it works for sometime... but then you have to install security fixes and it stops working again
Left by Michael on May 07, 2009 3:57 AM

# re: Insufficient system resources exist to complete the API.
Requesting Gravatar...
when I turn on my HP CPU I am getting the message listed above.
what can I do to fix this problem and get it to the start up message again
Left by Pat on Aug 06, 2009 11:01 AM

# re: Insufficient system resources exist to complete the API.
Requesting Gravatar...
I am having the same hibernation problem. If I am not a "put-the-laptop-in-the-backpack-and-take-it-everywhere" kind of person, is this a nessesity or can I just work around it?
Left by Brandon on Sep 07, 2009 7:24 AM

Your comment:
 (will show your gravatar)

Copyright © Martin L. Shoemaker | Powered by: