activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Evan Kuhn (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AMQCPP-330) Unable to reinitialize ActiveMQ CMS library and then open a session
Date Fri, 19 Nov 2010 21:01:24 GMT

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

Evan Kuhn updated AMQCPP-330:
-----------------------------

    Attachment: multi_init_test_main.cpp

Test program to recreate the bug

> Unable to reinitialize ActiveMQ CMS library and then open a session
> -------------------------------------------------------------------
>
>                 Key: AMQCPP-330
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-330
>             Project: ActiveMQ C++ Client
>          Issue Type: Bug
>          Components: Decaf
>    Affects Versions: 3.2.3
>         Environment: Windows XP SP2
>            Reporter: Evan Kuhn
>            Assignee: Timothy Bish
>            Priority: Minor
>         Attachments: multi_init_test_main.cpp
>
>
> I'm working on a project that initializes and shuts down the ActiveMQ CMS library multiple
times.  After upgrading from CMS 3.1.3 to 3.2.3, I noticed that my process crashes after these
steps:
> 1) Initialize ActiveMQ CMS library
> 2) Create connection, session, etc and do work
> 3) Shut down ActiveMQ CMS library
> 4) Initialize ActiveMQ CMS library a second time
> 5) Create a connection, then a session... crash
> First off, am I allowed to reinitialize the CMS library after shutting it down?  Is it
recommended not to?
> Either way, the program crashes at:
>     /main/activemq/transport/tcp/TcpTransport.cpp line 163
> I believe the error is in  /main/decaf/net/SocketFactory.cpp.  The static SocketFactory::defaultFactory
pointer (line 30) is set while creating the first session.  Then when shutting down the library,
the Network object destroys the object pointed to by SocketFactory::defaultFactory.  The next
time around, SocketFactory::getDefault() will try to use the pointer, but the factory object
has been destroyed, so the process crashes.
> One possible fix is to modify the SocketFactory destructor to set the defaultFactory
pointer to NULL.  I have no idea if that's a good solution, though.
> I will attach a test program to reproduce the crash.

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


Mime
View raw message