You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/07/29 23:52:04 UTC
[jira] [Commented] (AMQCPP-532) Frequently deleting queue browser
causes access violation
[ https://issues.apache.org/jira/browse/AMQCPP-532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14646809#comment-14646809 ]
ASF subversion and git services commented on AMQCPP-532:
--------------------------------------------------------
Commit d96e76169265269ad2a52041ec5c1a41549d3299 in activemq-cpp's branch refs/heads/master from [~tabish121]
[ https://git-wip-us.apache.org/repos/asf?p=activemq-cpp.git;h=d96e761 ]
https://issues.apache.org/jira/browse/AMQCPP-532
Add some additional safety measures to try and prevent message available
callback while destroying a browser object.
> Frequently deleting queue browser causes access violation
> ---------------------------------------------------------
>
> Key: AMQCPP-532
> URL: https://issues.apache.org/jira/browse/AMQCPP-532
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Affects Versions: 3.8.2
> Environment: Windows
> Reporter: Andrei Gheorghe
> Assignee: Timothy Bish
> Fix For: 3.9.0
>
> Attachments: crash.cpp, stacktrace.txt
>
>
> The following code should reproduce this issue :
> #include <activemq/library/ActiveMQCPP.h>
> #include <activemq/core/ActiveMQConnectionFactory.h>
> #include <activemq/commands/ActiveMQQueue.h>
> using namespace cms;
> int main()
> {
> try
> {
> activemq::library::ActiveMQCPP::initializeLibrary();
> activemq::core::ActiveMQConnectionFactory connectionFactory( "tcp://localhost:61616" );
> auto connection = connectionFactory.createConnection();
> connection->start();
> auto session = connection->createSession( Session::SESSION_TRANSACTED );
> activemq::commands::ActiveMQQueue queue( "testqueue" ); //sometimes it doesn't crash if the queue is empty so it should have atleast a message
> while ( 1 )
> {
> auto queueBrowser = session->createBrowser( &queue, "" );
> auto enumeration = queueBrowser->getEnumeration();
>
> if ( enumeration->hasMoreMessages() )
> auto message = enumeration->nextMessage();
> delete queueBrowser;
> }
> }
> catch ( const std::exception& e )
> {
> std::string what = e.what(); //sometimes it throws an exception like "Monitor is still in use!"
> }
> while ( 1 ) {} //wait, sometimes an activemq thread fails
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)