Opened 7 years ago

Closed 7 years ago

#11318 closed Support Requests (invalid)

boost unique_lock has no mutex

Reported by: shyamps@… Owned by: viboes
Milestone: To Be Determined Component: thread
Version: Boost 1.58.0 Severity: Problem
Keywords: boost unique_lock has no mutex Cc:

Description (last modified by viboes)

This is an issue I am observing in the newly released boost_1_58 library. I suspect the problem may not be boost related, and could be an msvc 12.0 compiler related issue. The symptom I observe is that when a Visual C++ project TURNS ON one of the compiler optimization flags /Og, /O1, /O2 or /Ox Flags, the C++ code that I am using below is throwing an exception:

Below is the sample code I use in the application:

boost::mutex::scoped_lock <Scoped Lock Variable> (<Mutex Object>)

Below is the exception message I am seeing which strangely occurs the second time a scoped lock is called on the same valid Mutex Object within the application:

"boost unique_lock has no mutex"

I am baffled by what causes this problem. When I turn off the optimization flags and execute the program, the application executes flawlessly. Only when I turn on optimization flags, this error consistently occurs. Workaround I am using is to disable optimization Flags for the release version.

Below is my build configuration:

Visual Studio community edition 2013, which uses msvc 12 compiler version; Windows 8.1; boost Library version 1.58

Change History (4)

comment:1 by viboes, 7 years ago

Component: Nonethread
Description: modified (diff)
Owner: set to viboes
Status: newassigned

Please, could you post exactly the code as the following is not valid code

boost::mutex::scoped_lock <Scoped Lock Variable> (<Mutex Object>)

comment:2 by viboes, 7 years ago

Type: BugsSupport Requests

comment:3 by viboes, 7 years ago

PING!!!

comment:4 by viboes, 7 years ago

Resolution: invalid
Status: assignedclosed
Note: See TracTickets for help on using tickets.