protegeproject / protege

Protege Desktop
http://protege.stanford.edu
Other
971 stars 229 forks source link

MacOS Launcher issue attempting to load ontology documents from Finder #1102

Open phillipross opened 1 year ago

phillipross commented 1 year ago

@gouttegd I see you've been the one doing the work on the MacOS Launcher, and this is wonderful. I wanted to compare notes with you and report an issue.

It seems that when I open an ontology document from the MacOS Finder, protege starts up but doesn't actually load the ontology document, but rather just shows the default anon ontology. HOWEVER, if protege is already open and I attempt to open an ontology document from Finder, the already running protege DOES load the document.

It's a simple workaround pre-start protege and have it running before trying to open a document from the Finder, but I was wondering if you observed similar behavior? Specifically I'm running on MacOS 12.x on Apple Silicon, but I believe I experience the same behavior on an intel machine w/ both 12.x and 13.x

And thanks again for all the efforts in improving this! kudos and much appreciated đź‘Ź

gouttegd commented 1 year ago

I was wondering if you observed similar behavior?

Alas yes.

What’s happening, to the best of my understanding, is that when you open an ontology file from the Finder and no instance of Protégé is already running, macOS will start Protégé and almost immediately send a message to the application to ask it to open the file. Unfortunately, Protégé is just a bit too slow to start, so that by the time the Protégé window is up and running and ready to accept messages from the operating system, it’s already too late – we’ve missed the file opening message.

It sometimes works: sometimes, for some reasons, either Protégé starts a little faster or the operating system sends the message a little bit later, so that Protégé can actually receive the message in time and open the requested file. It’s very unreliable, though. On my machine, this happens approximately 1 out of 3 times.

The only workaround for now is the one you mention: if you have a “pre-started” instance of Protégé already up and running, then macOS will send the file opening message to that instance instead of starting a new one; the already running instance is of course always ready to receive messages, so it will not miss it and will open the file as expected.

Right now I don’t have an easy fix for this bug, so it might be staying for a while.

leroykim commented 1 year ago

I have the same issue with my M2 Mac mini, Ventura 13.2.1. Is there a plan to fix this bug?

gouttegd commented 1 year ago

Not yet, sorry.