Hi everyone,

I've been using activemq-cpp 3.1.x for a while with success now.
But as it is getting more and more difficult to built it on modern platform
due to some old APR/APR-Util version, I thought it could be worth upgrading
my application to use the latest ActiveMQ-CPP 3.4 that use current
distributed APR version of the system (Mac and Linux).

I managed to compiled activemq-cpp 3.4 without any issue (no more complains
about incompatible APR version...).
Then I had to fix of the API to add the "throw()" that was missing to the
signature of the onMessage method and the destructor of the MessageListener.
Once this changed done, everything compiled. Although, as soon as the
application start, it segfault.

So I've tried with the your demo example available here
http://activemq.apache.org/cms/example.html
(I had to do the same "throw()" modifications)
And when I run it, I get the exact same segfault.

I'm running it on Mac OS X Lion
Here is the stack

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xfffffffffffffff8
0x00007fff8fa02220 in std::string::_Rep::_M_grab ()
(gdb) bt
#0  0x00007fff8fa02220 in std::string::_Rep::_M_grab ()
#1  0x00007fff8fa0234d in std::basic_string<char,
std::char_traits&lt;char&gt;, std::allocator<char> >::basic_string ()
#2  0x00000001003070ee in decaf::util::logging::Level::Level () at
/Users/seb/.../activemq-cpp-library-3.4.0/src/main/decaf/util/logging/Level.h:82
#3  0x00000001003070ee in __static_initialization_and_destruction_0
[inlined] () at
/Users/seb/Documents/Work/code/ParaViewWeb/thridpart/activemq-cpp-library-3.4.0/src/main/decaf/util/logging/Handler.cpp:31
#4  0x00000001003070ee in global constructors keyed to
_ZN5decaf4util7logging7Handler13DEFAULT_LEVELE () at Level.h:84
#5  0x00007fff5fc0fd1a in
__dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
()
#6  0x00007fff5fc0fa66 in
__dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
()
#7  0x00007fff5fc0d258 in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
()
#8  0x00007fff5fc0d1f1 in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
()
#9  0x00007fff5fc0e02b in
__dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
()
#10 0x00007fff5fc034ad in __dyld__ZN4dyld24initializeMainExecutableEv ()
#11 0x00007fff5fc07580 in __dyld__ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5_
()
#12 0x00007fff5fc01059 in __dyld__dyld_start ()

Thanks for any help,

Seb

PS: I've attached a source directory that can be used with CMake to build
the code.
http://activemq.2283324.n4.nabble.com/file/n3730337/ActiveMQ-cpp-sample.zip
ActiveMQ-cpp-sample.zip 





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Segfault-with-ActiveMQ-CPP-3-4-0-tp3730337p3730337.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to