qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chuck Rolke (JIRA)" <j...@apache.org>
Subject [jira] [Created] (QPID-5196) hello_world core dumps when connection protocol misspelled
Date Mon, 30 Sep 2013 14:36:24 GMT
Chuck Rolke created QPID-5196:

             Summary: hello_world core dumps when connection protocol misspelled
                 Key: QPID-5196
                 URL: https://issues.apache.org/jira/browse/QPID-5196
             Project: Qpid
          Issue Type: Bug
          Components: C++ Client
    Affects Versions: 0.25
            Reporter: Chuck Rolke

With the advent of AMQP 1.0 users are required to specify a protocol as a connection paramenter.
If the user misspells the protocol name then hello_world core dumps. 

On Linux:
1 chug@FJELD ~/svn/qpid/b64/examples/messaging> ./hello_world localhost:5672 amq.topic
terminate called after throwing an instance of 'qpid::Exception'
  what():  Unsupported protocol: amqp-1.0
Aborted (core dumped)

On Windows:
hello_world localhost:5672 amq.topic "{protocol:ampq-1.0}"
==> Popup hello_world.exe
A problem caused the program to stop working correctly. 
Please close the program. Choices: Close the program, or Debug the program

The Linux version at least prints out the text of the exception to give the user a clue. On
windows there is no hint of what went wrong and one must dive into client library to find
out if the desired protocol is loaded and if so then what is its proper name. 

I suggest that in hello_world.cpp the Connection constructor be moved to within the try block.
This, of course, means that the connection can't be closed in the catch block.

Note that to get AMQP1.0 users actually want to use: {protocol:amqp1.0}

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org

View raw message