Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0F3E110B5C for ; Tue, 28 Jan 2014 08:43:40 +0000 (UTC) Received: (qmail 91176 invoked by uid 500); 28 Jan 2014 08:43:39 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 91138 invoked by uid 500); 28 Jan 2014 08:43:38 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 91129 invoked by uid 99); 28 Jan 2014 08:43:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 08:43:38 +0000 Date: Tue, 28 Jan 2014 08:43:38 +0000 (UTC) From: "Andrei Gheorghe (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMQCPP-532) Frequently deleting queue browser causes access violation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQCPP-532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13883909#comment-13883909 ] Andrei Gheorghe commented on AMQCPP-532: ---------------------------------------- Sometimes it doesn't crash and sometimes it takes a while ( sometimes a few minutes ). There are two ways it can crash and I've attached both stacktraces. > 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 > Attachments: crash.cpp, stacktrace.txt > > > The following code should reproduce this issue : > #include > #include > #include > 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.1.5#6160)