[Mono-dev] _wapi_handle_unref: what does it mean?

Dick Porter dick at ximian.com
Mon Jan 30 08:51:27 EST 2006


On Sat, 2006-01-28 at 17:26 -0800, Allan Hsu wrote:
> Can anybody tell me what the meaning of this console output is?
> 
> ** (process:12367): WARNING **: _wapi_handle_unref: Attempting to  
> unref unused handle 0xcb7

It means something in the runtime has lost track of its handles and is
attempting to CloseHandle more times than the handle was opened.

>   More specifically, I'd like to know just how bad it is and what  
> sorts of things can cause it.

The warning itself is harmless (the CloseHandle code ignores an unref
attempt in these circumstances) but it is a symptom of a bug - code
somewhere is relying on a handle that has vanished from underneath it.

If you want to try and figure out where the bug is, run mono inside gdb
and put a breakpoint on the g_warning in handles.c then get a backtrace
when the breakpoint is hit.

- Dick





More information about the Mono-devel-list mailing list