Boost logo

Boost Users :

Subject: Re: [Boost-users] Borland c++ 5.8.2 and Boost 1.3.6 - Thread problem???
From: Stephen Kierzewski (sjkninester_at_[hidden])
Date: 2008-09-11 12:15:20


Hello,

With some further troubleshooting, I can now see the issue seems to be an access violation in cc3270MT.dll. Below are the stack trace and the actual Windows error message. It looks like Boost is actually working fine, but when the thread is created, cc3270MT.dll raises an exception.

:7c812aeb kernel32.RaiseException + 0x52
:32758966 CC3270MT.___raiseDebuggerException + 0x1a
:32758a40 CC3270MT.___raiseDebuggerException + 0xf4
:7c9032a8 ntdll.RtlConvertUlongToLargeInteger + 0x6a
:7c90327a ntdll.RtlConvertUlongToLargeInteger + 0x3c
:7c90e46a ntdll.KiUserExceptionDispatcher + 0xe
:32779df2 CC3270MT.__beginthreadex + 0x22
:00341a04 BOOST_THREAD-BCB-MT-1_36._at_boost@thread_at_start_thread$qv + 0x30
:00401769 boost::thread::thread(this=:0013FF74, f=:004012E0)
:004016BC main()
:32778e3e ; C:\WINDOWS\system32\CC3270MT.DLL

First chance exception at $7C812AEB. Exception class EAccessViolation with message 'Access Violation'. Process ThreadTest.exe (3544)

Any thoughts?

Thanks,
Stephen
----------------------------------------------------------------

Original Post:

Hello,

Has anyone successfully compiled the Boost libraries with the Borland / Codegear Turbo C++ Pro, compiler version 5.8.2?

I was able to build the libraries but I got a lot of errors and a simple Hello World program using boost::thread will not work.

Any help on switches or tweaks I can do to get Boost to work would be appreciated.

Here is the program I am compiling and the error I get when running it. I am linking to the debug version of the multi-threaded DLL (boost_thread-bcb-mt-d-1_36.dll)

The sample program compiles fine but when I run it I get an assertion error and the program terminates.

Any feedback is welcome.

Thank you,
Stephen

________________________________

Assertion failed: p_ != 0, file .\boost/intrusive_ptr.hpp, line 149

Abnormal program termination

________________________________

#include <boost/thread/thread.hpp>
#include <iostream>

using namespace std;

void hello_world()
{
cout << "Hello world, I'm a thread!" << endl;
}

int main(int argc, char* argv[])
{
// start a new thread that calls the "hello_world" function
boost::thread my_thread(&hello_world);
// wait for the thread to finish
my_thread.join();

return 0;
}


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net