Windows Mutex / Condition Error

Please post support and help requests here.
Posts: 2
Joined: 15 Nov 2012, 23:46

Windows Mutex / Condition Error

Postby lvicks » 16 Nov 2012, 00:12


I am experiencing an exception on Windows that I am not experiencing on Mac OS.
I am using OpenFrameworks which is built on top of the Poco Framework. I have a threaded class that uses a FastMutex and a Condition. The workflow is very standard, the thread waits for information to process on, and an outside thread will trigger the condition.

On OS X this solution works fine and will continually run no problems. On Windows 7 / Visual Studio 2010 the thread processes for a few seconds and then I get an exception "First-change exception at 0x77d628c5 in Blooms_debug.exe: 0xC0000008: An invalid handle was specified." This occurs in the Poco::MutexImpl::lockImpl() Line 76, which is a Poco Mutex critical section.

I understand that on Windows the FastMutex is a recursive mutex, but I don't think this will make a difference. I don't have a lot to work on since I'm not used to windows dev, but here is what I have so far.

- It works in OS X
- I analyse the Poco::MutexImpl data structure and I see:
LockCount = 1600481632
RecursionCount = 1885431923

My gut is telling me that the recursive feature is causing issues. So my questuons are
1) Do the values of LockCount and RecursionCount mean that I am not locking as I suspect?
2) Are there any Poco native non-recursive locks available?
3) Is there anything else I should be considering?


Posts: 2
Joined: 15 Nov 2012, 23:46

Re: Windows Mutex / Condition Error

Postby lvicks » 16 Nov 2012, 03:17

I did some trace and the error occurs just before the first condition.signal();

I will break this down into a simpler test case tomorrow, but any insight as of now is appreciated.

Return to “Support”

Who is online

Users browsing this forum: No registered users and 4 guests