Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Handles under CE6.0R2

2 views
Skip to first unread message

Rob

unread,
Nov 20, 2009, 9:45:01 AM11/20/09
to
Hi,
one of our applications seems to be running out of handles under CE6.0R2.
From Handle.c (kernel) we get : ">>>>> Completely Out Of Handles <<<<<\r\n"

Questions:
- Is there an API or other way to get the currently used (of total
available) handles for the process ?, I did not find one sofar....

- The same application under XP does NOT consume too much handles (just 100
or so), is this a known issue/difference ?

Kind Regards,
Rob.
www.robtso.nl


Dean Ramsier

unread,
Nov 20, 2009, 4:10:08 PM11/20/09
to
No such API that I'm familiar with; the expectation would be that you don't
run out of handles. How many handles do you expect to be using? 100?

Are you possibly creating transient objects and not closing the handle when
done with them?

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Rob" <__rob_AT_robtso_DOT_nl__> wrote in message
news:B1057385-D3C7-4F86...@microsoft.com...

Rob

unread,
Nov 21, 2009, 2:30:01 PM11/21/09
to
Our software needs about 120 handles normally.
Even that number is quite high i think (threads,fonts,brushes,windows etc...).
We are still searching for the cause of the handles running out.

One thing I tried is to put a retailmsg in handle.c, where the "completely
out of handles" error is given, and run a release version booting it from PB.
The handles seem to be given out in some 2-stage structure which i havent
quite figured out yet, but it looks like there are 127 * 512 handles to be
used, is that right ? (1st stage counter goes from 512 to zero, then back to
512 and the second-stage counter is decreased)

Are there any known HANDLE-API's that require Closehandle under CE, but
Donot require that nunder XP ? (so a difference in handle-behaviour CE/XP)

Kind regards,
Rob.
www.robtso.nl


"Dean Ramsier" wrote:

> .
>

mike

unread,
Dec 2, 2009, 6:38:55 PM12/2/09
to

--------------------------------------------------------------------------------------
Hello Rob,

You are create too many handles, but never release them. So, in your
app, you may call "CreateEvent" "OpenEvent", and open GDI graphic that
requires open handle. When you are done, you need to call CloseHandle
(...) to close it out. You do have handle leakage even you are using
C# and manage codes.

To debug this, you need to sprinkles RETAILMSG or debug inside your
app. Using hypertminal, you can log debug messages. Run your
application over night, then you may see execution patterns. You then
narrow down your bad codes.

Good luck debugging. I done this before and it not fun.

Mike
http://www.itxembedded.com


0 new messages