To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=97227
                 Issue #|97227
                 Summary|soffice bin 100% CPU in linux in headless mode?
               Component|Word processor
                 Version|OOo 3.0
                Platform|Unknown
                     URL|
              OS/Version|Linux
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P1
            Subcomponent|code
             Assigned to|writerneedsconfirm
             Reported by|prashanth_bhat





------- Additional comments from prashanth_b...@openoffice.org Sat Dec 13 
11:30:53 +0000 2008 -------
if I use xdesktop.terminate() the soffice bin thread is killed and releases the 
CPU
but why does soffice bin take 100% CPU Utilization. it takes all CPU Usage and
causes the the other applications to slowdown/hang.

Am i doing something wrong? I am just opening swriter and writing one document
so does openoffice really workout in a production web environment having
multiple users?

No matter which version of soffice for linux without jre it gives the same
problem. i have tested with 2.4.2 and 3.0 versions of office

I am starting openoffice as a server in headless mode
./program/soffice -headless -invisible -nologo -norestore
-accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &

below is the code

XComponent xEmptyWriterComponent = newDocComponent("swriter");
// query its XTextDocument interface to get the text
mxDoc = (XTextDocument)UnoRuntime.queryInterface(
XTextDocument.class, xEmptyWriterComponent);

// get a reference to the body text of the document
mxDocText = mxDoc.getText();

// Get a reference to the document's property set. This contains document
// information like the current word count
mxDocProps = (XPropertySet) UnoRuntime.queryInterface(
XPropertySet.class, mxDoc );

// Access the text document's multi service factory, which we will need
// for most of the following examples
mxDocFactory = (XMultiServiceFactory) UnoRuntime.queryInterface(
XMultiServiceFactory.class, mxDoc );
mxFactory = (XMultiServiceFactory)UnoRuntime.queryInterface(
XMultiServiceFactory.class, mxRemoteServiceManager);
if ( mxDoc != null ) {
XStorable xStorable = (XStorable)UnoRuntime.queryInterface(
XStorable.class, mxDoc);
PropertyValue[] storeProps = new PropertyValue[3];
storeProps[0] = new PropertyValue();
storeProps[0].Name = "FilterName";
storeProps[0].Value = "MS Word 97";
storeProps[ 1 ] = new PropertyValue();
storeProps[ 1 ].Name = "UpdateDocMode";
storeProps[ 1 ].Value = "1";
storeProps[ 2 ] = new PropertyValue();
storeProps[2].Name = "Overwrite ";
storeProps[2].Value = new Boolean(true);

File sourceFile2 = new java.io.File(sOutputDir);
StringBuffer sStoreFileUrl2 = new StringBuffer();
sStoreFileUrl2.append(sourceFile2.toURL().toString());
sStoreFileUrl2.append("test2.doc");
System.out.println("... stored ");
xStorable.storeAsURL(sStoreFileUrl2.toString(), storeProps);

com.sun.star.util.XCloseable xCloseable = ( com.sun.star.util.XCloseable )
UnoRuntime.queryInterface( com.sun.star.util.XCloseable.class,
xEmptyWriterComponent );
xCloseable.close(true);
// mxDoc.dispose();
mxDoc=null;
mxRemoteServiceManager =null;
mxRemoteContext= null;
xStorable=null;
xEmptyWriterComponent=null;
// xDesktop.terminate(); //kill soffice bin takes 100% CPU if you dont
// printDocComponent(xDoc);
}
protected XComponent newDocComponent(String docType)
throws java.lang.Exception
{
String loadUrl = "private:factory/" + docType;
mxRemoteServiceManager = this.getRemoteServiceManager();
Object desktop = mxRemoteServiceManager.createInstanceWithContext(
"com.sun.star.frame.Desktop", mxRemoteContext);

xDesktop = (XDesktop)UnoRuntime.queryInterface(XDesktop.class, desktop);
XComponentLoader xComponentLoader = (XComponentLoader)
UnoRuntime.queryInterface(XComponentLoader.class, desktop);
// PropertyValue[] loadProps = new PropertyValue[0];
com.sun.star.beans.PropertyValue loadProps[] =
new com.sun.star.beans.PropertyValue[1];
loadProps[0] = new com.sun.star.beans.PropertyValue();
loadProps[0].Name = "Hidden";
loadProps[0].Value = new Boolean(true);
XComponent xComp = xComponentLoader.loadComponentFromURL(loadUrl, "_blank",
0, loadProps);
xComponentLoader =null;
return xComp ;
}

actually it is from one of the samples too
Help Appreciated.
Thanks,

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@sw.openoffice.org
For additional commands, e-mail: issues-h...@sw.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to