Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 7997 invoked from network); 7 Jul 2008 12:06:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jul 2008 12:06:01 -0000 Received: (qmail 97779 invoked by uid 500); 7 Jul 2008 12:06:01 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 97765 invoked by uid 500); 7 Jul 2008 12:06:01 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 97754 invoked by uid 99); 7 Jul 2008 12:06:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jul 2008 05:06:00 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tabish121@gmail.com designates 64.233.184.227 as permitted sender) Received: from [64.233.184.227] (HELO wr-out-0506.google.com) (64.233.184.227) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jul 2008 12:05:08 +0000 Received: by wr-out-0506.google.com with SMTP id 50so1544834wri.2 for ; Mon, 07 Jul 2008 05:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=rSy32HsH6QuG5Pu5cXYyknoLi9HX4QoboHWJUpmi9N8=; b=By2a+6A6sZSQJLBkvMsXTUY7ZI2Ma1kyTxdahjr3kswVffm1PTV83pg0tHyaKMn1Fc SgAL7ZYZzmSp1Qghrj4NqyvLds9QtpLcVfqtXw1tZcnteGDi0jTg9I95/MEnZCm+gtxe pgxo4jlHBZZKnBLRqjWS2DPLQYBlGfX+UB/Lg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; b=MB51CGus/r5Qh+xN9HCHapeQh7wRrz0B35FrWOuyTsUSMCJXX5ulHycKMvgHK7YGen 1UJcFbkoi1RgFUrUomdj8mrRL6N9Ux+5+waoF/iZKZdOSbfcqXz6pIRiEWrB2qcI/fSz kBrpvJ2jqljGjYtlqDzoK3VeCldnqBcpHh4V4= Received: by 10.100.41.4 with SMTP id o4mr3049325ano.34.1215432329289; Mon, 07 Jul 2008 05:05:29 -0700 (PDT) Received: from ?192.168.2.150? ( [98.218.84.158]) by mx.google.com with ESMTPS id 8sm5254193ywg.6.2008.07.07.05.05.27 (version=SSLv3 cipher=RC4-MD5); Mon, 07 Jul 2008 05:05:28 -0700 (PDT) Subject: Re: ActiveMQ-CPP 2.2 Released From: Timothy Bish To: users@activemq.apache.org In-Reply-To: <18310319.post@talk.nabble.com> References: <1214145833.3335.7.camel@localhost.localdomain> <18310319.post@talk.nabble.com> Content-Type: text/plain; charset=utf-8 Date: Mon, 07 Jul 2008 08:04:15 -0400 Message-Id: <1215432255.29006.6.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 (2.22.2-2.fc9) Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org I've added a note in SVN for APR version, we definitely can't work with the older 0.9 versions of APR, you should stick with something newer than 1.2 since I've only tested with versions greater than that. Go ahead and write up a JIRA issue on the problem you are seeing with the init of APR. I will see what I can do when I have some time and then we can try and get a 2.2.1 release out at some point in the near future. Regards Tim. On Sun, 2008-07-06 at 22:35 -0700, Nick Cooper wrote: > Thanks for the release Tim. A lot of work must have gone into it! > > Just a couple of points on the use of the APR library... > 1. It would be nice if the README.TXT specified which version of the APR > library ActiveMQ-CPP was dependent on. It looks like there are two version > in common use 1.3.2 and 0.9.17. > 2. This may or may not be considered a bug….on Windows XP I was getting > "Unhandled exception. Access violation reading location... " when closing my > application. The source of the access violation was the function > apr_allocator_destroy found in apr_pools.c. > > The issue was the APR library was being initialised late in the process of > connecting to the broker. Thus it was one of the first items to be destroyed > when cleaning up the application *before* any of the producers, consumers, > sessions or connections had been destroyed. > > The below stack trace points to the fist place the APR library was > initialised. As AprPool uses a static instance of AprRuntime, it will only > be destructed when the application is closed *but* it will be done in the > reverse order of being defined. > > app.exe!decaf::internal::AprRuntime::AprRuntime() Line 30 > app.exe!decaf::internal::AprPool::getAprPool() Line 67 + 0x2a > app.exe!decaf::net::TcpSocket::connect() Line 98 + 0xb > app.exe!decaf::net::SocketFactory::createSocket() Line 111 > app.exe!activemq::transport::filters::TcpTransport::TcpTransport() Line > 60 + 0x7b > > app.exe!activemq::transport::filters::TcpTransportFactory::createTransport() > Line 45 + 0x40 > app.exe!activemq::transport::TransportBuilder::createTransport() Line 105 > + 0x17 > app.exe!activemq::transport::TransportBuilder::buildTransport() Line 56 + > 0xa3 > app.exe!activemq::core::ActiveMQConnectionFactory::createConnection() > Line 127 + 0x10 > app.exe!activemq::core::ActiveMQConnectionFactory::createConnection() > Line 67 + 0x65 > app.exe! > > My application uses ActiveMQ-CPP library ONLY as a MOM client library, it > does not use any of the decaf functionality unlike the example provided with > the release. As the HelloWorldConsumer uses a CountDownLatch as a member > variable which is initialised in the constructor, the APR library is > initialised in the correct order. > > So after all that rambling as a quick fix I have added the following lines > into my application, which has resolved the issue. > #include > decaf::internal::AprRuntime gAprRuntime; >