activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMQCPP-514) ActiveMQBytesMessage destruction may cause unhandle exception
Date Mon, 07 Oct 2013 13:59:43 GMT

     [ https://issues.apache.org/jira/browse/AMQCPP-514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Timothy Bish updated AMQCPP-514:
--------------------------------

    Fix Version/s:     (was: 3.8.1)
                   3.8.2

> ActiveMQBytesMessage destruction may cause unhandle exception
> -------------------------------------------------------------
>
>                 Key: AMQCPP-514
>                 URL: https://issues.apache.org/jira/browse/AMQCPP-514
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>    Affects Versions: 3.8.1
>            Reporter: Christian Mamen
>            Assignee: Timothy Bish
>             Fix For: 3.8.2, 3.9.0
>
>
> While creating a cms::bytesMessage and sending it in a function, i encounter an unhandle
exception
> the application code resemble this
> {code}
> void sendMessage()
> {
>     auto_ptr<cms::BytesMessage> msg( session->createBytesMessage() );
>     // populate message
>     [...]
>     // send the message
>     _producer->send( msg.get() );
> }
> void caller()
> {
>     try
>     {
>         sendMessage()
>     }
>     catch( cms::CMSException & ex )
>     {
>         // exception
>     }
> }
> {code}
> The call stack, when the unhandle exception happens, is the following
> activemq-cpp.dll!activemq::commands::ActiveMQBytesMessage::storeContent() 
> activemq-cpp.dll!activemq::commands::ActiveMQBytesMessage::reset() 
> activemq-cpp.dll!activemq::commands::ActiveMQBytesMessage::~ActiveMQBytesMessage() 
> activemq-cpp.dll!cms::CMSException::setMark(const char * file=0x00000000, const int lineNumber=1974618930)

> activemq-cpp.dll!activemq::commands::ActiveMQBytesMessage::storeContent() 
> The exception from ActiveMQBytesMessage::storeContent() causes a double throw, from the
send, and afterwards from the smart pointer when the message is destroyed
> ////
> Im guessing that 
> {code}
> ActiveMQBytesMessage::~ActiveMQBytesMessage() throw() {
>     this->reset();
> }
> {code}
> should be something like :
> {code}
> ActiveMQBytesMessage::~ActiveMQBytesMessage() {
>     try {    
>         this->reset();
>     }
>     AMQ_CATCHALL_NOTHROW()
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message