https://bugs.documentfoundation.org/show_bug.cgi?id=151766

--- Comment #17 from Simon Muschel <[email protected]> ---
(In reply to Patrick (volunteer) from comment #16)
> (In reply to Patrick (volunteer) from comment #15)
> > Feel free to reopen this bug but I just don't see how a Java application can
> > make synchronous calls in the main thread. With a headless mode like
> > Windows, Linux, and iOS, the LibreOffice main thread can be moved to a
> > secondary thread.
> 
> So the only way I can this working is that the Java code implicitly launches
> LibreOffice as a separate process and uses interprocess communication (i.e.
> a socket connection) to send load document messages.
> 
> If that is the case, take an Activity Monitor sample of the LibreOffice
> process would be the next debugging step. Or, better yet, use a LibreOffice
> nightly build and you can connect lldb to the running LibreOffice to see
> what the stack trace. That might give you a clue why LibreOffice is becoming
> unresponsive.
> 
> My first guess is that LibreOffice is either blocked waiting for the next
> native event (it is a GUI application) or spending all its time in its "idle
> timers" (i.e. drawing updates to a window, spellchecking). I'd imagine that
> if you open a lengthy Writer document and automatic spellchecking is
> enabled, LibreOffice can appear to be stuck until you do some key or mouse
> event in LibreOffice to interrupt that "idle task".

First of all thank you for looking into this. It's been a few years, so my
memory is not very accurate. But as far as I understand my own sample, the call
to Bootstrap.bootstrap is intended to launch a separate Libreoffice process and
communication between our application and LO should happen via a named pipe or
some IPC mechanism.
Here's some code from class Bootstrap:
String sPipeName = "uno" + Long.toString(randomPipeName.nextLong() &
Long.MAX_VALUE);
String[] cmdArray = new String[argArray.length + 2];
cmdArray[0] = fOffice.getPath();
cmdArray[1] = "--accept=pipe,name=" + sPipeName + ";urp;";
System.arraycopy(argArray, 0, cmdArray, 2, argArray.length);
Process p = Runtime.getRuntime().exec(cmdArray);

I'll have to look into this when I find the time, maybe I can provide
additional information

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to