Issue 48258 - error connecting to OOo socket without gnome
Summary: error connecting to OOo socket without gnome
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 680m95
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: thorsten.martens
QA Contact: issues@framework
URL:
Keywords: needmoreinfo, oooqa
Depends on:
Blocks:
 
Reported: 2005-04-27 11:45 UTC by mnasato
Modified: 2005-05-23 13:52 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description mnasato 2005-04-27 11:45:38 UTC
I am trying to perform some document conversions using automation. They works
fine fine with OOo 1.1. I start OOo with

  soffice -headless -accept="socket,port=8100;urp;"

and connect to it from Java (but for testing purposes I also wrote a Python
script pasted below)

The problem: from my X session everything was working fine. Then I tried to run
OOo in a Xvfb server, and the connection attempt produced the following error on
the console where OOo was running

  Xlib: unexpected async reply (sequence 0x???)

(where the sequence code varies) and the client program hanged.

Then I discovered that the same error occurs in a regular (not Xvfb) X server as
well if Gnome is not running.

So I tried starting gnome-session inside Xvfb prior to OOo, and it worked.

After some more attempts, it seems that only nautilus is required, not the whole
gnome-session.

So the test results are as follow:

start Xvfb, start OOo, run conversion script: failure
start Xvfb, start nautilus, start OOo, run conversion: success

additionally

start Xvfb, start nautilus, start OOo, stop nautilus (--quit), run conversion:
success

My guess is that nautilus initialises some bonobo component required by OOo, but
I could not find exactly which one.

System: tested on both Fedora Core 3 and CentOS 3.3

OOo is the RPM version downloaded from
http://www.mirror.ac.uk/mirror/sunsite.dk/openoffice/developer/680_m95/OOo_1.9.95_LinuxIntel_install.tar.gz

1.9.93 had the same problem.

Using the OOo GUI works fine without Gnome. But connecting to a OOo connection
fails without Gnome even without the -headless switch.

Below the python script used for testing.

--- file: ooo2pdf.py ---
import uno
from unohelper import absolutize
from os import getcwd
from sys import argv, exit
from com.sun.star.beans import PropertyValue
from com.sun.star.io import IOException, XOutputStream

def prop(name, value):
    return PropertyValue(name, 0, value, 0)

input = absolutize('file://'+ getcwd(), argv[1])
output = absolutize('file://'+ getcwd(), argv[2])

localContext = uno.getComponentContext()
resolver =
localContext.ServiceManager.createInstanceWithContext('com.sun.star.bridge.UnoUrlResolver',
localContext)
context =
resolver.resolve('uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext')
serviceManager = context.ServiceManager
desktop = serviceManager.createInstanceWithContext('com.sun.star.frame.Desktop',
context)
document = desktop.loadComponentFromURL(input, '_blank', 0, (prop('Hidden', True),))
document.storeToURL(output, (prop('FilterName', "writer_pdf_Export"),))
document.dispose()
Comment 1 mnasato 2005-05-06 12:44:18 UTC
Version 1.9.100 works fine! :-)
Comment 2 mci 2005-05-19 16:16:39 UTC
Hi mnasato,

thanks for using and supporting OpenOffice.org...

May you test this using OOom104 to be sure your problem has really gone?
Comment 3 mnasato 2005-05-19 18:31:10 UTC
Yep no problems with 1.9.104 either, thanks
Comment 4 mci 2005-05-23 13:51:40 UTC
Hi mnasato,

thansk for your response... :)

I'm going to close this issue now.
Comment 5 mci 2005-05-23 13:52:04 UTC
closing