incubator-ooo-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <>
Subject Re: How to enable the processing of one way calls in asynchronous manner in Apache OpenOffice 3.4?
Date Thu, 29 Dec 2011 23:10:04 GMT

Hi Kandarpa,

On Thu, Dec 29, 2011 at 05:24:15AM +0000, Kandarpa Malipeddi wrote:
> Hi,
> Thank you very much for your inputs.
> In our use case we are not using
> soffice -accept="uno:socket,host=,port=8100,tcpNoDelay=1;urp,Negotiate=0,ForceSynchronous=0;TheComponentContext"
> Following is the description of our use case in c++ code:
> 1. We have Reference<XComponentContext> localContext
> 2. From this localContext we are retrieving the Reference < XMultiComponentFactory
> as follow:
>     Reference < XMultiComponentFactory > localServiceManager = localContext->getServiceManager();
> 3. From this localServiceManager we are retriving ""
service as follow:
>     Reference < XInterface > urlResolverXInterface = localServiceManager->createInstanceWithContext("",
> 4. From urlResolverXInterface we are retriving the Reference < XUnoUrlResolver >
as follow:
>     Reference < XUnoUrlResolver >urlResolver(urlResolverXInterface, UNO_QUERY );
> 5. Invocation of urlResolver->resolve("uno:socket,host=,port=9999,tcpNoDelay=1;urp,Negotiate=0,ForceSynchronous=0;TheComponentContext");
method results in crash.
> We ensured that all References in the above sequence of steps are valid. However invocation
> urlResolver->resolve("uno:socket,host=,port=9999,tcpNoDelay=1;urp,Negotiate=0,ForceSynchronous=0;TheComponentContext");
method results in crash.
> We debugged the code and found following:
> During the invocation of "urlResolver->resolve" method control reaches to "ooo/main/binaryurp/source/bridgefactory.cxx"
file of binaryurp code and in "BridgeFactory::createBridge(...)" method of "bridgefactory.cxx"
file following condition check on line 145 throws exception which causes crash.
> Snippet of "ooo/main/binaryurp/source/bridgefactory.cxx" file from line 145 to 154
> =============================================================
>         if (!(sProtocol.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("urp")) &&
>         {
>             throw css::lang::IllegalArgumentException(
>                 rtl::OUString(
>                     RTL_CONSTASCII_USTRINGPARAM(
>                         "BridgeFactory::createBridge: sProtocol != urp ||"
>                         " aConnection == null")),
>                 static_cast< cppu::OWeakObject * >(this), -1);
>         }
> =============================================================
> We hope the above explanation would be helpful to understand the cause of crash in our
use case.

an exception only causes a crash if there is no code that catches it.
You should catch the exceptions AOO API interface methods are allowed to
I guess your urlResolver->resolve() is not surrounded with a try-catch,
and com::sun::star::bridge::XUnoUrlResolver::resolve can trhow three
kind of exceptions, among those
a com::sun::star::lang::IllegalArgumentException.
So the underlying problem is not the crash.

Back to the root cause, evaluates to false; that is,
there is no connection; for some reason, a connection cannot be
established with the office listening to a socket on the given port.

Something maybe obvious, but did you start the office with an
-accept=... argument (matching the one you use in
Did you check the office is listening on the specified port?

Ariel Constenla-Haile
La Plata, Argentina

View raw message