Skip to content
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

Saving ontology produces frozen save progress bar #574

Closed
donpellegrino opened this issue Oct 24, 2016 · 21 comments
Closed

Saving ontology produces frozen save progress bar #574

donpellegrino opened this issue Oct 24, 2016 · 21 comments
Assignees

Comments

@donpellegrino
Copy link

When saving the active ontology, sometime the save progress bar freezes. No information is printed to the terminal after "Saved workspace" to give detail on the error.

@donpellegrino
Copy link
Author

donpellegrino commented Oct 26, 2016

Using the "Window -> Refresh user interface" menu item does not resolve the issue. The stuck progress bar persists.

Test system:
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)
------------------------------------ Protege -----------------------------------
Protege Desktop
Version 5.1.0, Build
----------------------------------- Platform -----------------------------------
Java: JVM 1.8.0_111-b15 Memory: 466M
Language: en, Country: US
Framework: Apache Software Foundation (1.7)
OS: linux (3.10.0-327.36.3.el7.x86_64)
Processor: x86-64

@donpellegrino
Copy link
Author

When exiting a session that had frozen save progress bars a number of errors similar to the following were written to the terminal:

*** WARNING BADLY BEHAVING LISTENER: org.protege.editor.owl.ui.framelist.OWLFrameList$$Lambda$149/292207327 ***
Possible culprit (trace from when listener was added):
org.protege.editor.owl.ui.framelist.OWLFrameList.(OWLFrameList.java:149)
uk.ac.manchester.cs.owl.explanation.JustificationFrameList.(JustificationFrameList.java:48)
uk.ac.manchester.cs.owl.explanation.JustificationFrameExplanationDisplay.(JustificationFrameExplanationDisplay.java:43)
uk.ac.manchester.cs.owl.explanation.WorkbenchPanel.createExplanationDisplay(WorkbenchPanel.java:258)
uk.ac.manchester.cs.owl.explanation.WorkbenchPanel.refill(WorkbenchPanel.java:275)
uk.ac.manchester.cs.owl.explanation.WorkbenchPanel.(WorkbenchPanel.java:108)
uk.ac.manchester.cs.owl.explanation.JustificationBasedExplanationServiceImpl.explain(JustificationBasedExplanationServiceImpl.java:27)
org.protege.editor.owl.ui.explanation.ExplanationDialog.(ExplanationDialog.java:32)
org.protege.editor.owl.ui.explanation.ExplanationManager.handleExplain(ExplanationManager.java:79)
org.protege.editor.owl.ui.framelist.OWLFrameList.invokeExplanationHandler(OWLFrameList.java:496)
org.protege.editor.owl.ui.framelist.OWLFrameList.lambda$new$49(OWLFrameList.java:135)
org.protege.editor.core.ui.list.MList.handleMouseClick(MList.java:206)
org.protege.editor.core.ui.list.MList.access$200(MList.java:21)
org.protege.editor.core.ui.list.MList$3.mouseReleased(MList.java:104)
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
java.awt.Component.processMouseEvent(Component.java:6533)
javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
java.awt.Component.processEvent(Component.java:6298)
java.awt.Container.processEvent(Container.java:2236)
java.awt.Component.dispatchEventImpl(Component.java:4889)
java.awt.Container.dispatchEventImpl(Container.java:2294)
java.awt.Component.dispatchEvent(Component.java:4711)
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
java.awt.Container.dispatchEventImpl(Container.java:2280)
java.awt.Window.dispatchEventImpl(Window.java:2746)
java.awt.Component.dispatchEvent(Component.java:4711)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
java.awt.EventQueue.access$500(EventQueue.java:97)
java.awt.EventQueue$3.run(EventQueue.java:709)
java.awt.EventQueue$3.run(EventQueue.java:703)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
java.awt.EventQueue$4.run(EventQueue.java:731)
java.awt.EventQueue$4.run(EventQueue.java:729)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
(Listeners should be removed in the plugin dispose method!)

@matthewhorridge
Copy link
Contributor

@donpellegrino are you using a multi-display set up by any chance? I've observed this problem when I've been projecting Protege (i.e. with multiple displays) but can't reliably reproduce it.

@donpellegrino
Copy link
Author

I have experienced this behavior with a single display. I was not using a multi-display at the time.

@donpellegrino
Copy link
Author

Just looking at the terminal output from a previous comment, "org.protege.editor.owl.ui.framelist.OWLFrameList.(OWLFrameList.java:149)" perhaps I have a widget open that has an interaction effect with the save progress bar. Which UI element is draw in "OWLFrameList?"

@ykazakov
Copy link
Contributor

ykazakov commented Nov 30, 2016

Had you by chance any explanation windows opened? The bad listener error above is caused by the explanation manager. It should have been fixed in version 5.1. See issue #410. Which version of Protege are you using?

@donpellegrino
Copy link
Author

I am running "Protege Desktop, Version 5.1.0, Build." I did not have an explanation windows open.

@lks128
Copy link
Contributor

lks128 commented Jan 12, 2017

I have the same problem and the saving progress bar freezes every time I'm saving ontology. The saving popup stays open and there is no way to close it, however the file seems to be saved correctly. At least it is possible to minimize that popup so I can continue working.

@donpellegrino Are you running linux? Asking, because the problem might be related to the operating system, as everything is works fine on macOS, and freezes on CentOS 7.3 in my case.

@donpellegrino
Copy link
Author

I have been experiencing this issue on "Red Hat Enterprise Linux Server release 7.3 (Maipo)." The default Java implementation is:

$ java -version
openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-b15)
OpenJDK 64-Bit Server VM (build 25.111-b15, mixed mode)

@lks128
Copy link
Contributor

lks128 commented Jan 13, 2017

I have checked Protege 5.0.0 and it works fine, so it should be possible to find a buggy commit using git bisect, however I need to figure out how to build the app from sources on my machine.

@csnyulas
Copy link
Member

I also get this on Ubuntu. I think the problem was there in 5.0.0 as well, but I am not 100% sure. So don't count on the git bisect to provide you the answer, especially that there the number of changes between the two versions are huge. The problem is that I can't reliably reproduce it (neither with 5.1 or with 5.0).

@lks128
Copy link
Contributor

lks128 commented Jan 14, 2017

@csnyulas Yes, it turned out that 5.0.0 is problematic as well, so no help from git :) It probably could only show the commit when the loader was added there.

I've created a pull request, so it would be good if anyone of who was encountering the problem can check if it fixes problem. Personally I've checked on CentOS and macOS with bundled jre and the loader is not freezing now.

@lks128
Copy link
Contributor

lks128 commented Jan 14, 2017

@csnyulas Probably I'm too lucky, because it was freezing every single time I was just opening protege and saving empty ontology.

@matthewhorridge
Copy link
Contributor

Also reported on Linux Mint 18.

@ykazakov
Copy link
Contributor

Reproduced in Ubuntu 16.04 (fresh install) running in VM (VirtualBox) under MacOS 10.12.2.

screen shot 2017-01-18 at 14 09 58

To reproduce:

  1. Start Protege. A window with new "untitled-ontology-X" will be opened.
  2. File > save as > RDF/XML Syntax > OK > enter file name, e.g., "test.owl" > Save
  3. Repeat from Step 2 (the bug shows up for me after a few saves)
    If there is a prompt saying that ontology has changed and asking to reload the ontology, answer No.

Additional Info:
Protege 5.1 (platform independent, executed through run.sh)

Here is the Protege log up until the stuck window:

$ ./run.sh 
CompilerOracle: exclude javax/swing/text/GlyphView.getBreakSpot
******************************************************************************** 
**                                  Protege                                   ** 
******************************************************************************** 
 
----------------- Initialising and Starting the OSGi Framework ----------------- 
FrameworkFactory Class: org.apache.felix.framework.FrameworkFactory 
 
The OSGi framework has been initialised 
------------------------------- Starting Bundles ------------------------------- 
Starting bundle org.protege.common 
Starting bundle org.eclipse.equinox.common 
Starting bundle org.eclipse.equinox.supplement 
Starting bundle org.protege.editor.core.application 
Starting bundle org.eclipse.equinox.registry 
Not starting bundle com.google.inject.multibindings explicitly because it is a fragment bundle. 
Starting bundle org.protege.common 
Starting bundle org.eclipse.equinox.common 
Starting bundle org.apache.commons.io 
Starting bundle jul.to.slf4j 
Starting bundle org.protege.editor.owl 
Starting bundle org.protege.editor.core.application 
Starting bundle org.apache.servicemix.bundles.aopalliance 
Starting bundle org.eclipse.equinox.registry 
Starting bundle com.google.inject 
Starting bundle com.google.guava 
Not starting bundle com.google.inject.assistedinject explicitly because it is a fragment bundle. 
Starting bundle slf4j.api 
Starting bundle ch.qos.logback.core 
Starting bundle org.apache.servicemix.bundles.javax-inject 
Starting bundle org.eclipse.equinox.supplement 
Starting bundle org.jsr-305 
Starting bundle log4j.over.slf4j 
Starting bundle ch.qos.logback.classic 
Starting bundle org.semanticweb.owl.owlapi 
Starting bundle de.tu-dresden.inf.lat.jcel 
Starting bundle org.coode.dlquery 
Starting bundle org.semanticweb.hermit 
Starting bundle org.coode.owlviz 
Starting bundle org.protege.owl.rdf 
Starting bundle existentialquery 
Starting bundle org.protege.ontograf 
Starting bundle org.coode.browser 
Starting bundle cellfie 
Starting bundle swrltab-plugin 
Starting bundle org.protege.editor.owl.rdf 
Starting bundle uk.ac.manchester.cs.owl.factplusplus 
Starting bundle org.semanticweb.elk 
Starting bundle com.clarkparsia.protege.plugin.pellet 
Starting bundle code-generation 
Starting bundle uk.ac.manchester.cs.owl.explanation 
The OSGi framework has been started 
 
------------------------------------ Protege ----------------------------------- 
Protege Desktop 
Version 5.1.0, Build  
 
 
----------------------------------- Platform ----------------------------------- 
Java: JVM 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14  Memory: 1037M 
Language: en, Country: US 
Framework: Apache Software Foundation (1.7)  
OS: linux (4.4.0-59-generic) 
Processor: x86-64
 
 
------------------------------------ Plugins ----------------------------------- 
Plugin: jcel (0.23.2) 
Plugin: DL Query (4.0.1) 
Plugin: HermiT (1.3.8.413) 
Plugin: OWLViz (5.0.3) 
Plugin: OWLAPI RDF Library (2.0.2) 
Plugin: Existential Query (2.0.0) 
Plugin: OntoGraf (2.0.3) 
Plugin: Browser View (OWLDoc) (3.0.3) 
Plugin: Cellfie Protege 5.0+ Plugin (2.1.0) 
Plugin: SWRLTab Protege 5.0+ Plugin (1.0.3) 
Plugin: Protege SPARQL Plugin (2.0.1) 
Plugin: Factplusplus Plug-in (1.6.5) 
Plugin: ELK Reasoner Protege Plug-in (0.4.3) 
Plugin: Pellet Reasoner Plug-in (2.2.0) 
Plugin: OWL Code Generation Plug-in (2.0.0) 
Plugin: Explanation Workbench (3.0.0) 
 
Creating and setting up empty (default) editor kit 
OWL API Version: 4.2.6.20160910-2108 
Cannot generate ontology catalog for ontology at http://www.semanticweb.org/ecull/ontologies/2017/0/untitled-ontology-15 
------------------------------- Auto-update Check ------------------------------ 
Auto-update is disabled 
 
### Excluding compile: javax.swing.text.GlyphView::getBreakSpot
Saving untitled-ontology-15 
Saving ontology to temp file: /tmp/temp-ontology4727059379454467729 
Copying ontology from temp file (/tmp/temp-ontology4727059379454467729) to actual destination (/home/ecull/Ontologies/test.owl) 
Removing temp file: /tmp/temp-ontology4727059379454467729 
Saved ontology OntologyID(OntologyIRI(<http://www.semanticweb.org/ecull/ontologies/2017/0/untitled-ontology-15>) VersionIRI(<null>)) to file:/home/ecull/Ontologies/test.owl in RDF/XML Syntax format 
Saving untitled-ontology-15 
Saving ontology to temp file: /tmp/temp-ontology3455319210667616113 
Copying ontology from temp file (/tmp/temp-ontology3455319210667616113) to actual destination (/home/ecull/Ontologies/test.owl) 
Removing temp file: /tmp/temp-ontology3455319210667616113 
Saved ontology OntologyID(OntologyIRI(<http://www.semanticweb.org/ecull/ontologies/2017/0/untitled-ontology-15>) VersionIRI(<null>)) to file:/home/ecull/Ontologies/test.owl in RDF/XML Syntax format 
Saving untitled-ontology-15 
Saving ontology to temp file: /tmp/temp-ontology7197181715357831935 
Copying ontology from temp file (/tmp/temp-ontology7197181715357831935) to actual destination (/home/ecull/Ontologies/test.owl) 
Removing temp file: /tmp/temp-ontology7197181715357831935 
Saved ontology OntologyID(OntologyIRI(<http://www.semanticweb.org/ecull/ontologies/2017/0/untitled-ontology-15>) VersionIRI(<null>)) to file:/home/ecull/Ontologies/test.owl in RDF/XML Syntax format 
Saving untitled-ontology-15 
Saving ontology to temp file: /tmp/temp-ontology1862223033674365424 
Copying ontology from temp file (/tmp/temp-ontology1862223033674365424) to actual destination (/home/ecull/Ontologies/test.owl) 
Removing temp file: /tmp/temp-ontology1862223033674365424 
Saved ontology OntologyID(OntologyIRI(<http://www.semanticweb.org/ecull/ontologies/2017/0/untitled-ontology-15>) VersionIRI(<null>)) to file:/home/ecull/Ontologies/test.owl in RDF/XML Syntax format 

@ykazakov
Copy link
Contributor

Looks like it is related to this openjdk bug.
The progress bar is drawn using JDialog (see ProgressDialog). If setVisible(false) is called immediately after setVisible(true), the dialog does not hide.

matthewhorridge added a commit that referenced this issue Feb 2, 2017
matthewhorridge added a commit that referenced this issue Feb 3, 2017
Fix delayed progress dialog due to the fix for #574
@csnyulas
Copy link
Member

Just a note, as I encountered this situation today...
The fix to this issue should be tested also in situations when the save operation fails, for example if one opens a read-only ontology file and tries to overwrite it with modified content. Currently, the error message pops up, informing us that the operation has failed, and the save progress bar hangs in the background.

@matthewhorridge
Copy link
Contributor

Looks like this particular issue can be closed due to the PR from @ykazakov. Will close in a few days unless I hear otherwise.

@matthewhorridge matthewhorridge added this to the Protégé 5.5.0 milestone Jan 15, 2019
@matthewhorridge matthewhorridge self-assigned this Jan 15, 2019
@matthewhorridge matthewhorridge added the Status: Waiting to Close Indicated that we expect that the issue can be closed soon if no further comments are received. label Jan 15, 2019
@matthewhorridge matthewhorridge removed the Status: Waiting to Close Indicated that we expect that the issue can be closed soon if no further comments are received. label Jan 23, 2019
@dersuchendee
Copy link

I still have this problem

@ylan1
Copy link

ylan1 commented Jul 22, 2023

Me too. I still have this problem with both versions (5.6.1 and 5.5.0). Every time I try to save a file, I encounter this issue.

@ylan1
Copy link

ylan1 commented Jul 22, 2023

Also happens when I try to load a saved file.

YinghuaXu2 added a commit to NCIEVS/protege that referenced this issue Aug 15, 2023
bdionne pushed a commit to NCIEVS/protege that referenced this issue Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants