Return-Path: X-Original-To: apmail-incubator-ooo-users-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 68671773D for ; Thu, 29 Dec 2011 23:10:06 +0000 (UTC) Received: (qmail 8533 invoked by uid 500); 29 Dec 2011 23:10:06 -0000 Delivered-To: apmail-incubator-ooo-users-archive@incubator.apache.org Received: (qmail 8418 invoked by uid 500); 29 Dec 2011 23:10:06 -0000 Mailing-List: contact ooo-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-users@incubator.apache.org Delivered-To: mailing list ooo-users@incubator.apache.org Received: (qmail 8409 invoked by uid 99); 29 Dec 2011 23:10:06 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 23:10:06 +0000 Received: from localhost (HELO localhost) (127.0.0.1) (smtp-auth username arielch, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 23:10:05 +0000 Date: Thu, 29 Dec 2011 20:10:04 -0300 From: Ariel Constenla-Haile To: ooo-users@incubator.apache.org Cc: Jasankumar Changela Subject: Re: How to enable the processing of one way calls in asynchronous manner in Apache OpenOffice 3.4? Message-ID: <20111229231004.GA12880@localhost> References: <4C4D97DAAF18D14D8639F1C91634CD6F0C112837@HJ-MBX2.persistent.co.in> <20111228132922.GA5036@localhost> <4C4D97DAAF18D14D8639F1C91634CD6F0C1128BC@HJ-MBX2.persistent.co.in> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline In-Reply-To: <4C4D97DAAF18D14D8639F1C91634CD6F0C1128BC@HJ-MBX2.persistent.co.in> User-Agent: Mutt/1.5.21 (2010-09-15) --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Kandarpa, On Thu, Dec 29, 2011 at 05:24:15AM +0000, Kandarpa Malipeddi wrote: > Hi, >=20 > Thank you very much for your inputs. >=20 > In our use case we are not using > soffice -accept=3D"uno:socket,host=3D127.0.0.1,port=3D8100,tcpNoDelay=3D1= ;urp,Negotiate=3D0,ForceSynchronous=3D0;TheComponentContext" > Following is the description of our use case in c++ code: >=20 > 1. We have Reference localContext > 2. From this localContext we are retrieving the Reference < XMultiCompone= ntFactory > as follow: > Reference < XMultiComponentFactory > localServiceManager =3D localCon= text->getServiceManager(); > 3. From this localServiceManager we are retriving "com.sun.star.bridge.Un= oUrlResolver" service as follow: > Reference < XInterface > urlResolverXInterface =3D localServiceManage= r->createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", localCon= text); > 4. From urlResolverXInterface we are retriving the Reference < XUnoUrlRes= olver > as follow: > Reference < XUnoUrlResolver >urlResolver(urlResolverXInterface, UNO_Q= UERY ); > 5. Invocation of urlResolver->resolve("uno:socket,host=3D127.0.0.1,port= =3D9999,tcpNoDelay=3D1;urp,Negotiate=3D0,ForceSynchronous=3D0;TheComponentC= ontext"); method results in crash. >=20 > We ensured that all References in the above sequence of steps are valid. = However invocation of > urlResolver->resolve("uno:socket,host=3D127.0.0.1,port=3D9999,tcpNoDelay= =3D1;urp,Negotiate=3D0,ForceSynchronous=3D0;TheComponentContext"); method r= esults in crash. >=20 > 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 i= n "BridgeFactory::createBridge(...)" method of "bridgefactory.cxx" file fol= lowing condition check on line 145 throws exception which causes crash. >=20 > Snippet of "ooo/main/binaryurp/source/bridgefactory.cxx" file from line 1= 45 to 154 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > if (!(sProtocol.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("urp")) && > aConnection.is())) > { > throw css::lang::IllegalArgumentException( > rtl::OUString( > RTL_CONSTASCII_USTRINGPARAM( > "BridgeFactory::createBridge: sProtocol !=3D urp = ||" > " aConnection =3D=3D null")), > static_cast< cppu::OWeakObject * >(this), -1); > } > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > 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 throw. 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, aConnection.is() 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=3D... argument (matching the one you use in XUnoUrlResolver::resolve)?=20 Did you check the office is listening on the specified port? Regards --=20 Ariel Constenla-Haile La Plata, Argentina --y0ulUmNC+osPPQO6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJO/PNMAAoJEMjP1bm45QNWEVYQAIslUfgvJKc/Y7BbwOa45py0 4NlBcsmV8vEEX8EPp65z/4Z1fD09e+NBz+yWfTAq410UzhvFQgNGbZO+kmLOxsiw V3gQ7QiICLdIeOU1gV1kezBFii9dNSzQWuKvPbosutRtxsFQSHtwVq7P5J0LgRja 9NkIe08356KK/xboTXL62eCrwrHJoUG4VNyHNnlXDaJ71bM+OHJAqea4g+CSyaLa 9oV+YRfE0v6LxMM8L6L6jCmXf/7WFEDndaPCcvOG/cimQOqJ09wb3N+DrZPK+NR5 lr75fBWZT7Rz9mQGdf6THH1r6EFDiGb/gAIvieraHSwRCFi4ybf+fVGAC9ZFz48r S551QEcf7XuWRMSsfNefnXSuD4Oav8TO/KwshE1AM46oRwurSv+9iolsk13RU8FU kMohdao+l/e6k29SPzmCcH53bKr9YELK5lqJ/nyCUknEcz78xqcg8NZsDqXPcPzI NntoQfsLs3du0lhlIsLRvlWhtobdenZpJmJcGvAuqgDNcKwMMWfFO3ikGw+ANQNd BVRoPAuHag/mCWE0tc5kAvfjfEy/5ig9o2jFCB91tmS0d10kDXWyGsh1U7F1ZnUC DFRf4XWO4G0A8XWRPu2OHatjc60w9/1J4/KPexMhC1fCqJ2sn9X/M85Kodob3Dg2 uVcEdAALygZjHMvUXgBD =YR9H -----END PGP SIGNATURE----- --y0ulUmNC+osPPQO6--