Skip to content

OpenWebstart get stuck on certificate selection screen (multi-threading with event dispatch thread hack) #962

@merkisoft

Description

@merkisoft

I was able to reproduce this with a self-issued certificate on localhost.

The problem exists when doing a backend call in a SwingUtilities.invokeLater at the same time as a background thread calls a the backend to the server with a broken certificate.

Result: the certificate dialog and the UI are completely frozen.

Now it's super easy to reproduce, see my comment:
karakun/OpenWebStart#594 (comment)

I suspect that the locking does not work properly in this case, in the following section:

            message.lock = null;    
...

            // background thread
            message.lock = new Semaphore(0);
            ...
            message.lock.acquire();

and most likely both call JNLPRuntime.getSecurityDialogHandler().postMessage(message);

btw this issue was first raised here: karakun/OpenWebStart#594
but the broken code is in this repo (14 year old code ... :-))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions