incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 96152] Java Uno wrapper locks up when connection disappears
Date Wed, 29 Feb 2012 18:57:14 GMT

Jason Powers <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #5 from Jason Powers <> 2012-02-29 18:57:14 UTC ---
I've run into this as well, and our load tester seems to be able to reproduce
it fairly easily. Will update more details on that once I have them.

For my code we're using the 'client' inside of a server process. This makes
restarting the client a bit less desirable.

It seems to happen when attempting to open a new connection or an instance of
OpenOffice that has locked up or is otherwise in a bad state. It seems to just
sit on a wait hoping to be notified by another thread. It just never happens.

I've updated a copy of writeRequest to look like this:
// @see IProtocol#writeRequest
    public boolean writeRequest(
        String oid, TypeDescription type, String function, ThreadId tid,
        Object[] arguments)
        throws IOException
        if (oid.equals(PROPERTIES_OID)) {
            throw new IllegalArgumentException("illegal OID " + oid);
        synchronized (monitor) {
            while (!initialized && state != STATE_TERMINATED) {
                try {
                } catch (InterruptedException e) {
                    throw new RuntimeException(e.toString());
            if (state == STATE_TERMINATED) {
                throw new DisposedException();
            return writeRequest(false, oid, type, function, tid, arguments);

Adding in the state != TERMINATED. This appears to have fixed the problem so
far, but I think it still needs a timeout on the monitor.wait() call so it
doesn't sit there indefinitely waiting.

When I detect a stuck instance my code kills the OpenOffice Instance, and also
calls close on the bridge object associated with this. That code flips the
state to STATE_TERMINATED and notifies on monitor. I'm not sure if that will
work for all users, so a timeout would probably be needed here as well.

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

View raw message