exception when bytearray is 0
-----------------------------

                 Key: AMQCPP-312
                 URL: https://issues.apache.org/activemq/browse/AMQCPP-312
             Project: ActiveMQ C++ Client
          Issue Type: Bug
    Affects Versions: 3.2.2
         Environment: Windows, VS 2010
            Reporter: Søren Grønbech
            Assignee: Timothy Bish


If I set a bytearray to zero lenght, I get an exception:

vector<unsigned char> blist; 
map->setBytes(name,blist); 

BOOM (since blist is empty, but is blist is at least 1 byte, then everything is 
fine) 

server_debug.exe!std::_Debug_message(const wchar_t * message, const wchar_t * 
file, unsigned int line)  Line 15 C++ 
server_debug.exe!std::vector<unsigned char,std::allocator<unsigned char> 
>::operator[](unsigned int _Pos)  Line 932 + 0x14 bytes C++ 
server_debug.exe!activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::marshalPrimitive(decaf::io::DataOutputStream
 & dataOut, const activemq::util::PrimitiveValueNode & value)  Line 289 + 0x1e 
bytes C++ 
server_debug.exe!activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::marshalPrimitiveMap(decaf::io::DataOutputStream
 & dataOut, const 
decaf::util::Map<std::basic_string<char,std::char_traits<char>,std::allocator<char>
 
>,activemq::util::PrimitiveValueNode,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char>
 > > > & map)  Line 209 + 0x10 bytes C++ 
server_debug.exe!activemq::wireformat::openwire::marshal::PrimitiveTypesMarshaller::marshalMap(const
 activemq::util::PrimitiveMap * map, decaf::io::DataOutputStream & dataOut)  
Line 141 + 0xd bytes C++ 
server_debug.exe!activemq::commands::ActiveMQMapMessage::beforeMarshal(activemq::wireformat::WireFormat
 * wireFormat)  Line 117 + 0x1e bytes C++ 
server_debug.exe!activemq::wireformat::openwire::marshal::v5::ActiveMQMapMessageMarshaller::tightMarshal1(activemq::wireformat::openwire::OpenWireFormat
 * wireFormat, activemq::commands::DataStructure * dataStructure, 
activemq::wireformat::openwire::utils::BooleanStream * bs)  Line 81 C++ 
server_debug.exe!activemq::wireformat::openwire::OpenWireFormat::marshal(const 
decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
 & command, const activemq::transport::Transport * transport, 
decaf::io::DataOutputStream * dataOut)  Line 206 + 0x28 bytes C++ 
server_debug.exe!activemq::transport::IOTransport::oneway(const 
decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
 & command)  Line 131 C++ 
server_debug.exe!activemq::transport::TransportFilter::oneway(const 
decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
 & command)  Line 121 C++ 
server_debug.exe!activemq::transport::inactivity::InactivityMonitor::oneway(const
 
decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
 & command)  Line 337 C++ 
server_debug.exe!activemq::wireformat::openwire::OpenWireFormatNegotiator::oneway(const
 
decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
 & command)  Line 78 C++ 
server_debug.exe!activemq::transport::failover::FailoverTransport::oneway(const 
decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
 & command)  Line 266 C++ 
server_debug.exe!activemq::transport::correlator::ResponseCorrelator::oneway(const
 
decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
 & command)  Line 83 C++ 
server_debug.exe!activemq::core::ActiveMQConnection::oneway(decaf::lang::Pointer<activemq::commands::Command,decaf::util::concurrent::atomic::AtomicRefCounter>
 command)  Line 739 C++ 
server_debug.exe!activemq::core::ActiveMQSession::send(cms::Message * message, 
activemq::core::ActiveMQProducer * producer, activemq::util::Usage * usage)  
Line 745 C++ 
server_debug.exe!activemq::core::ActiveMQProducer::send(const cms::Destination 
* destination, cms::Message * message, int deliveryMode, int priority, __int64 
timeToLive)  Line 220 C++ 
server_debug.exe!activemq::core::ActiveMQProducer::send(const cms::Destination 
* destination, cms::Message * message)  Line 157 C++ 
server_debug.exe!activemq::core::ActiveMQProducer::send(cms::Message * message) 
 Line 125 C++ 
server_debug.exe!FW_JMSQueue::Process()  Line 143 + 0x2d bytes C++ 
server_debug.exe!FW_JMSHandler::Process()  Line 189 + 0x19 bytes C++ 
server_debug.exe!FW_JMSHandler_Thread(void * FWJMSHANDLER)  Line 20 + 0x8 bytes 
C++ 



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to