cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

firespot
Adept I

VS 2008 breakpoint when linking against both OpenCL and boost x64 libs

Hello,

When using both OpenCL (AMD APP SDK 2.8 for development) and binary boost libraries (here for example the threads library, boost 1.50). in the same program, compiled in x64 mode and run in VS 2008, on program start-up I receive the following VS message:

"Windows has triggered a breakpoint in program.exe. This may be due to a corruption of the heap, which indicates a bug in program.exe or any of the DLLs it has loaded".

I don't receive this error when just linking to either the OpenCL or boost libraries alone (i.e., only if used in combination it appears). I don't receive the error for x86 compilations. The dlls loaded are the same. Besides this VS message the program itself appears to run perfectly fine. If the program is run outside VS, of course no message appears.

Any experience or ideas? Are there some compiler options that the AMD APP enforces on compilation of external libraries due to the ABI? Is that more likely a VS issue, or the hint for something more severe going on under the hood without having shown severe symptoms yet?

Is there an AMD x64 sample project which does use (link against) a boost library component?

Thanks!

0 Likes
6 Replies
himanshu_gautam
Grandmaster

Try Bolt.

0 Likes

I can't, I am using VS 2008. Anyway even if Bolt would work... I need boost.

0 Likes

hmmmm, well Bolt is using boost. That's why i suggested that.

Well I have never tried to integrate the boost and OpenCL together. Probably you can upload a small repro-case here. Other developers may pinpoint any error.


Some links which may be helpful:

c++ - Windows has generated a breakpoint - Stack Overflow

C++ error on Ms Visual Studio: "Windows has triggered a breakpoint in javaw.exe" - Stack Overflow

0 Likes

Does Bolt make use of any library which needs to be linked against (i.e., precompiled usually) or, headers-only?

I will investigate the issue with the new boost 1.54 release and try to post a repro case here. Could be some incompatible options used during compilation of boost causing the troubles.

0 Likes

I have tested the new Boost 1.54 library release, the problem remains. However I have tracked down the issue being related specifically to the boost::threads library (no errors with e.g. boost::regex or boost::chrono, which all depend on compiled libraries).

In order to reproduce the issue (VS 2008, 64-bit compilation) please do as follows:

1) install boost (www.boost.org; I can confirm the problem for 1.52 and 1.54 at a minimum) and build libraries for VS 2008, x64

2) Pick a sample included in the AMD APP samples, e.g. I used the EigenValue sample.

3) #include the boost::threads through adding this line to EigenValue.cpp (I have put it right before the #include "EigenValue.hpp" statement):

#include "boost/thread.hpp"

4) make sure the boost::threads library is used and associated DLLs are loaded through a dummy-usage of it (insert these two lines in main; I have put them right before the "return SDK_SUCCESS;" line:

boost::thread_group ThreadGroup;

ThreadGroup.join_all();

5) run the program - compiled in x64 mode (debug) - from _within_ the VS2008 IDE (of course, include the boost library and link against it in project settings).

6) the error message should pop-up righ on program initialization, i.e. before the main-code gets entered - it must be hit during global initialization of the boost library. The program itself runs fine through.

As mentioned, no error occurs if either only the sample is compiled in x64, or the boost::threads library is used in an x64 application without OpenCL ->  have hit the error only if both OpenCL and boost::threads are used concurrently, and only in x64.

Thanks !

| wanted to follow up on your issue.  Do you see this problem with the latest Boost library version as well?

--Prasad

0 Likes