5 Replies Latest reply: Jul 8, 2013 4:29 AM by firespot RSS

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

firespot Newbie
Currently Being Moderated

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!

  • Re: VS 2008 breakpoint when linking against both OpenCL and boost x64 libs
    himanshu.gautam Master
    Currently Being Moderated

    Try Bolt.

    Regards

    Himanshu , Bruhaspati

    --------------------------------

    The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied

    • Re: VS 2008 breakpoint when linking against both OpenCL and boost x64 libs
      firespot Newbie
      Currently Being Moderated

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

      • Re: VS 2008 breakpoint when linking against both OpenCL and boost x64 libs
        himanshu.gautam Master
        Currently Being Moderated

        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

        Regards

        Himanshu , Bruhaspati

        --------------------------------

        The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied

        • Re: VS 2008 breakpoint when linking against both OpenCL and boost x64 libs
          firespot Newbie
          Currently Being Moderated

          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.

        • Re: VS 2008 breakpoint when linking against both OpenCL and boost x64 libs
          firespot Newbie
          Currently Being Moderated

          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 !

More Like This

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points