-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to save file #1106
Comments
I have the same problem. I am using Protege 5.6.0 on macOS Monterey 12.6.2. |
The problem of the file manager not being opened also occurs when trying to load a file in Protege. (file > open > 'open in current window' message > then nothing happens no matter what option you choose) |
I have the same issue with file management, I cannot open or save files with protege 5.6.1 on macOS Ventura 13.2.1. |
Unfortunately I can’t reproduce the issue, so I don’t have the beginning of an idea what could be the cause… Could any of you affected by the issue run the following tests:
If it is, then:
|
No, nothing at all is imported into Protégé, it shows a completely empty ontology. Does not even recognize the ontology iri, nothing. I just tried it with pizza.owl, the same, nothing is imported. When I create my own ontology and want to save it. |
Just as another data point, no solution or insight into what was happening... I have seen this issue once before, in person, when teaching a class earlier this year. I believe that this was before the 5.6.0 release, so with Protege 5.5.0. There was no error message and nothing obviously wrong except that the file dialog did not appear. Nothing in the logs. In the end the person restarted their machine and the problem went away. |
@gouttegd
Regarding writing the ontologies to file:
In all these cases, the log is empty; no error is shown. |
Even when Protégé is already running? The fact that you cannot open a file by double-clicking on them when Protégé is not running is a known issue (#1102), but if you already have an instance of Protégé running, it should work.
Unlikely. I know that Protégé is working fine on several arm64 Apple computers – including mine. Whatever the issue is, there is no fundamental incompatibilities between Protégé and arm64. |
Of note, there have been several known weird bugs with Java file-choosing dialogs on macOS in the past (e.g. JDK-813613, JDK-822457), so maybe it’s another one of those. |
With Protégé running, opening the file with a double click works; thanks for the tip. The greatest issue is that it is not possible to save the ontology since the file dialog window does not show. I am using Protégé in my course now, and 16 students have problems with saving the files (all Mac users, all using the latest Protégé). I myself have to switch to my old Mac whenever I have to show students something in Protégé. |
Right. Alas, until I or another Protégé developer can reproduce the issue, this is not going to be fixed. :(
On your old Mac, are you using also an older Protégé version (like 5.5.0), or the newer 5.6.1? |
@SepidehAlassi can you confirm that this happens with 5.5.0? |
@matthewhorridge Everything works fine on both my old Macs with Intel chip (one with OS Catalina, the other OS Mojave), both with Protégé 5.6.1 |
@SepidehAlassi Are you willing or can you afford to spend some time helping us debugging the issue? If I provide you with a custom build of Protégé 5.6.1, can you try it on your machine and report some results to me? |
sure |
@SepidehAlassi Great! Can you download the build from here: https://incenp.org/protege-5.6.1-os-x.zip, start it, and try to save something? Then open the log window and paste its contents (at least the 30 or so last lines) here. There’s a small chance saving may already works with that build, but even if it does not, the log will hopefully help me to figure out where exactly the problem is. |
Works with your custom build. Here's the log:
Great work! |
A small comment to let you know that I had the same problem on an Intel-based Mac, and the patch solved it. |
Thanks @yannis1962 . This suggests that the problem lies with the macOS-specificcode path to show a file-choosing dialog window. If other people who reported the problem on M1 macs (@SepidehAlassi ?) could confirm the above build also works for them, that'd be great. |
Yes, it works on my M1. Thanks for the fix! |
Thanks for testing. So here is the problem as I understand it. When Protégé needs to get a filename to save the current ontology, ultimately it calls the org.protege.editor.core.ui.util.UIUtil#saveFile() method. The interesting bit in that method is: if(OSUtils.isOSX() && parentWindow != null) {
return MacUIUtil.saveFile(parentWindow, title, extensions, initialName);
}
JFileChooser fileDialog = new JFileChooser(getCurrentFileDirectory());
... That is, if we’re running on macOS, the call is diverted to the macOS-specific org.protege.editor.core.platform.apple.MacUIUtil#saveFile() method, which is supposed to display a “native” file saving dialog – this is so that macOS users are in familiar territory. Otherwise (on Windows and GNU/Linux), the method proceeds to show an OS-independent file saving dialog. The problem is that sometimes, for whatever reasons, the macOS-specific code path fails. The There is an easy workaround, but it has one drawback. The workaround is simply to fallback to the OS-independent file saving dialog if the macOS-specific one fails. This is what I did in the build above: if(OSUtils.isOSX() && parentWindow != null) {
File f = MacUIUtil.saveFile(parentWindow, title, extensions, initialName);
if (f != null) // Only return if we actually got a file
return f;
// Otherwise allow the method to continue and show the OS-independent dialog
}
JFileChooser fileDialog = new JFileChooser(getCurrentFileDirectory());
... The drawback is that we have no way of distinguishing between the case where I am inclined to think this is only a minor annoyance, and that the workaround is still worth it if it allows users affected by the bug to still save their files as they need. |
+1. Definitely worth it IMO Awesome work @gouttegd |
On macOS, if we don't get a File from the macOS-specific MacUIUtil#saveFile() method, assume this is due to a failure of that method (or of the underlying JRE) to even show the native file-choosing dialog (as was shown to happen, #1106), and fallback to the OS-independent method. This allow users affected by the "never-showing-native-dialog" bug to still save their files, at the price of asking users not affected by that same bug to click "cancel" on two consecutive dialogs if they do want to cancel the save operation at the file-choosing step.
Protégé 5.6.2 has been released with the workaround mentioned above. All users who have reported this bug are invited to upgrade. |
I still cannot save my files / neither can Protégé open a file. |
I have the same issue (version 5.6.3) in an intel Mac with Ventura 13.6... |
I am on Mac M1 Sonoma 14.2 with the 5.6.3 version of Protégé. I had issues with access requests to documents, contacts, camera etc. I managed to sort this out. However, as soon as I save the file, I am unable to reopen it and the app stops working. When trying to open only the file I saved, it stays in the "loading" stage and never opens. I have updated my java, OS and have tried installing multiple versions of Protégé. Can anyone help ? |
I am also having this problem. Using Sonoma 14.4 Mac M1, Protege 5.6.3. I have tried resigning per this issue, uninstalling, installing older versions, allowing Protege to access all my files, not allowing Protege to access all my files - doesn't seem to matter. It continues to ask for access to various folders, then Protege hangs until it must be force quit. Cannot save anything. This is really frustrating and would love to know how it can be fixed!! |
I am a first-time user of protege and working on it. I installed v5.6.0 and when I click on save, it prompts me to select the file type. After that nothing happens and the file is not saved.
I have tried to re-install, and restart my system and everything but I am getting the same error.
protege.log
I am not getting any errors and do not know how to resolve the error.
Attached is the log file and screenshot
The text was updated successfully, but these errors were encountered: