activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <>
Subject Re: activemq-cpp Access violation closing consumer session object
Date Mon, 09 Mar 2009 13:18:25 GMT
On Fri, 2009-03-06 at 12:45 -0800, timplusplus wrote:
> Hi everyone,
> I have a working C++ client built off of ActiveMQ-CPP 2.4 (WindowsXP,
> MSVC++, APR 1.3.3) which connects to a standalone ActiveMQ server (5.1.0),
> can publish messages, subscribe to messages and disconnect just fine.  
> I have attempted to construct my own reconnecton mechanism and for the most
> part have it working pretty well.  I have my C++ client publishing messages
> (1 per second) to the server where a Java client subscribes to them.  I also
> have a script that forcefully kills/restarts my ActiveMQ server every 60
> seconds.
> My problem is with the C++ client disconnecting after a forceful kill of the
> ActiveMQ server.  Every once in a while during the delete( consumerSession
> ); call, a Windows exception: "Unhandled Exception!  Access Violation!" will
> occur.  
> It seems that at some point during these disconnections, there is a dangling
> pointer left in my consumerSession object.  During the
> ActiveMQSession::close() method,  cms::Closeable Iterator attempts to
> access:  iter->next()   and the Access Violation exception is thrown.  
> My first question to anyone kind enough to read all this is have any of you
> ever experienced anything similar?  
> One of my biggest problems is that replication of this issue is quite
> difficult.  For the most part, the disconnect/reconnect functionality I have
> works great.  EVery now and then (I am thinking it's bad timing somewhere),
> I get this exception trying to close the consumerSession's closeables.  
> If anyone wants more info (more explanation, snippets, etc...)  please let
> me know.

You are welcome to open a new Jira issue on this and attach any code
snippets or stack traces that you have.  


Tim Bish

View raw message