Project

General

Profile

bug #5691

Referencing objects view makes editor inresponsive if an object references many objects

Added by Andreas Müller over 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
04/08/2016
Due date:
% Done:

100%

Estimated time:
8.00 h
Severity:
major
Found in Version:

Description

If the referencing objects view is switched on and an object gets the focus which is referenced very often (e.g. secundum references or Linné/L.) the TaxEditor does not react anymore but shows an hourglass instead.

This should not happen as the referencing objects view should run in a separate thread not influencing the performance of the editor.

For very large sets the Editor may even crash.


Related issues

Precedes Edit - bug #6418: Status line does not update after completing the update of the referencing objects view Worksforme 02/14/2017

Associated revisions

Revision dda1d525 (diff)
Added by Katja Luther almost 2 years ago

ref #5691: fix the problem that ref. objects view does not has its own thread

Revision 61b8e368 (diff)
Added by Katja Luther almost 2 years ago

ref #5691: move description setting to an own thread in referencing objects view

Revision 484f8526 (diff)
Added by Patrick Plitzner almost 2 years ago

ref #5691 Only have on update job at a time for ReferencingObjectsView

Revision f8485a00 (diff)
Added by Katja Luther almost 2 years ago

ref #5691: avoid invalid thread access in referencing object view by calling updateContentDescription in an extra job

Revision cd19940f (diff)
Added by Katja Luther almost 2 years ago

fix details view for authorship cache and referencing objects view

Revision 64f636f0 (diff)
Added by Katja Luther almost 2 years ago

fix problem when description of an element is null in referencing objects view

History

#1 Updated by Andreas Müller over 2 years ago

  • Description updated (diff)
  • Priority changed from New to Highest

#2 Updated by Andreas Müller about 2 years ago

Maybe the problem is the label provider which initializes lazy objects. Which thread does it use?

#3 Updated by Andreas Müller about 2 years ago

  • Target version changed from Unassigned CDM tickets to Release 4.4
  • Estimated time set to 8.00 h

Or even better solution, use DTOs on server side.

#4 Updated by Andreas Müller about 2 years ago

  • Target version changed from Release 4.4 to Release 4.5

#5 Updated by Andreas Müller almost 2 years ago

  • Target version changed from Release 4.5 to Release 4.6

#6 Updated by Katja Luther almost 2 years ago

  • Status changed from New to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

The problem of unresponsible editor is solved but the status line keeps the message "Updating referencing objects view...", this needs to be solved.
@AM could you please review the main topic of this ticket, I will create a new ticket for the status line subject.

#7 Updated by Katja Luther almost 2 years ago

  • Precedes bug #6418: Status line does not update after completing the update of the referencing objects view added

#8 Updated by Andreas Müller almost 2 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

I got an "Invalid thread access" exception when testing it for reference "The International Plant Names Index (2012)..." on edit_test/rem_conf_am (for some reason the log does not show the server information - maybe also a bug?).
Second time it worked.

login : 
editor version : 4.6.0.201702161652
server :  ()
schema version : 
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
org.eclipse.swt.SWTException: Invalid thread access
    at org.eclipse.swt.SWT.error(SWT.java:4282)
    at org.eclipse.swt.SWT.error(SWT.java:4197)
    at org.eclipse.swt.SWT.error(SWT.java:4168)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
    at org.eclipse.swt.widgets.Widget.getData(Widget.java:525)
    at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getTab(DefaultTabFolder.java:186)
    at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getItems(DefaultTabFolder.java:238)
    at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.findItem(AbstractTabFolder.java:171)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.getTab(PresentablePartFolder.java:375)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.childPropertyChanged(PresentablePartFolder.java:304)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.access$2(PresentablePartFolder.java:303)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder$3.propertyChanged(PresentablePartFolder.java:83)
    at org.eclipse.ui.internal.presentations.PresentablePart.firePropertyChange(PresentablePart.java:137)
    at org.eclipse.ui.internal.presentations.PresentablePart$1.propertyChanged(PresentablePart.java:97)
    at org.eclipse.ui.internal.PartPane.firePropertyChange(PartPane.java:620)
    at org.eclipse.ui.internal.PartPane.propertyChanged(PartPane.java:625)
    at org.eclipse.ui.internal.WorkbenchPartReference.immediateFirePropertyChange(WorkbenchPartReference.java:571)
    at org.eclipse.ui.internal.WorkbenchPartReference.firePropertyChange(WorkbenchPartReference.java:564)
    at org.eclipse.ui.internal.WorkbenchPartReference.deferEvents(WorkbenchPartReference.java:219)
    at org.eclipse.ui.internal.WorkbenchPartReference.refreshFromPart(WorkbenchPartReference.java:328)
    at org.eclipse.ui.internal.WorkbenchPartReference.partPropertyChanged(WorkbenchPartReference.java:296)
    at org.eclipse.ui.internal.WorkbenchPartReference$2.propertyChanged(WorkbenchPartReference.java:181)
    at org.eclipse.ui.part.WorkbenchPart.firePropertyChange(WorkbenchPart.java:129)
    at org.eclipse.ui.part.WorkbenchPart.internalSetContentDescription(WorkbenchPart.java:451)
    at org.eclipse.ui.part.WorkbenchPart.setContentDescription(WorkbenchPart.java:437)
    at org.eclipse.ui.part.ViewPart.setContentDescription(ViewPart.java:154)
    at eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView.getReferencingObjects(ReferencingObjectsView.java:336)
    at eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView.access$3(ReferencingObjectsView.java:273)
    at eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView$2.run(ReferencingObjectsView.java:214)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

#9 Updated by Andreas Müller almost 2 years ago

when canceling the job it looks like it sometimes still shows the old records (for an old selection) this may be misleading. We should always empty the view (best before the job starts to make immediately clear that the selection has changed and the view does not represent the selections referencing objects anymore.

Also when the job is canceled we should somehow note that it was canceled and if any records are shown they may not be complete. By the way it would be nice to have a count saying how many records are there in total. Something like "xxx is referenced 3454 times:" (maybe a new ticket? But cdmlib functionality already exists for this I think)

#10 Updated by Andreas Müller almost 2 years ago

The above exceptions appears often though not 100% reproducable.

Also when a new object is selected the dialog does not immediately go away, though the ref objects view response quite fast.

#11 Updated by Katja Luther almost 2 years ago

moved the setting of the description to its own thread to avoid the "Invalid thread access" exception. And clear right after the selection changed.

#12 Updated by Andreas Müller almost 2 years ago

Invalid thread access still exists. Happened when editing specimen data in specimen editor.

login : 
editor version : 4.6.0.201702272351
server :  ()
schema version : 
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
org.eclipse.swt.SWTException: Invalid thread access
    at org.eclipse.swt.SWT.error(SWT.java:4282)
    at org.eclipse.swt.SWT.error(SWT.java:4197)
    at org.eclipse.swt.SWT.error(SWT.java:4168)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
    at org.eclipse.swt.widgets.Widget.getData(Widget.java:525)
    at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getTab(DefaultTabFolder.java:186)
    at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getItems(DefaultTabFolder.java:238)
    at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.findItem(AbstractTabFolder.java:171)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.getTab(PresentablePartFolder.java:375)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.childPropertyChanged(PresentablePartFolder.java:304)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.access$2(PresentablePartFolder.java:303)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder$3.propertyChanged(PresentablePartFolder.java:83)
    at org.eclipse.ui.internal.presentations.PresentablePart.firePropertyChange(PresentablePart.java:137)
    at org.eclipse.ui.internal.presentations.PresentablePart$1.propertyChanged(PresentablePart.java:97)
    at org.eclipse.ui.internal.PartPane.firePropertyChange(PartPane.java:620)
    at org.eclipse.ui.internal.PartPane.propertyChanged(PartPane.java:625)
    at org.eclipse.ui.internal.WorkbenchPartReference.immediateFirePropertyChange(WorkbenchPartReference.java:571)
    at org.eclipse.ui.internal.WorkbenchPartReference.firePropertyChange(WorkbenchPartReference.java:564)
    at org.eclipse.ui.internal.WorkbenchPartReference.deferEvents(WorkbenchPartReference.java:219)
    at org.eclipse.ui.internal.WorkbenchPartReference.refreshFromPart(WorkbenchPartReference.java:328)
    at org.eclipse.ui.internal.WorkbenchPartReference.partPropertyChanged(WorkbenchPartReference.java:296)
    at org.eclipse.ui.internal.WorkbenchPartReference$2.propertyChanged(WorkbenchPartReference.java:181)
    at org.eclipse.ui.part.WorkbenchPart.firePropertyChange(WorkbenchPart.java:129)
    at org.eclipse.ui.part.WorkbenchPart.setTitle(WorkbenchPart.java:311)
    at org.eclipse.ui.part.WorkbenchPart.setDefaultTitle(WorkbenchPart.java:404)
    at org.eclipse.ui.part.WorkbenchPart.setContentDescription(WorkbenchPart.java:439)
    at org.eclipse.ui.part.ViewPart.setContentDescription(ViewPart.java:154)
    at eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView.getReferencingObjects(ReferencingObjectsView.java:336)
    at eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView.access$3(ReferencingObjectsView.java:273)
    at eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView$2.run(ReferencingObjectsView.java:214)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

#13 Updated by Katja Luther almost 2 years ago

  • Status changed from Feedback to Resolved

please check whether the exception occurs again.

#14 Updated by Katja Luther almost 2 years ago

  • Assignee changed from Katja Luther to Andreas Müller

#15 Updated by Andreas Müller almost 2 years ago

Unfortunately it still exists. I opened my test database rem_conf_am on edit_test and opened taxon Abies testus nothosubsp. uppltj V.V.Petrovsky in classification Testklass after opening the view => there it immediately came.

login : 
editor version : 4.6.0.201703071052
server :  ()
schema version : 
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
org.eclipse.swt.SWTException: Invalid thread access
    at org.eclipse.swt.SWT.error(SWT.java:4282)
    at org.eclipse.swt.SWT.error(SWT.java:4197)
    at org.eclipse.swt.SWT.error(SWT.java:4168)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
    at org.eclipse.swt.widgets.Widget.getData(Widget.java:525)
    at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getTab(DefaultTabFolder.java:186)
    at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getItems(DefaultTabFolder.java:238)
    at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.findItem(AbstractTabFolder.java:171)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.getTab(PresentablePartFolder.java:375)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.childPropertyChanged(PresentablePartFolder.java:304)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.access$2(PresentablePartFolder.java:303)
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder$3.propertyChanged(PresentablePartFolder.java:83)
    at org.eclipse.ui.internal.presentations.PresentablePart.firePropertyChange(PresentablePart.java:137)
    at org.eclipse.ui.internal.presentations.PresentablePart$1.propertyChanged(PresentablePart.java:97)
    at org.eclipse.ui.internal.PartPane.firePropertyChange(PartPane.java:620)
    at org.eclipse.ui.internal.PartPane.propertyChanged(PartPane.java:625)
    at org.eclipse.ui.internal.WorkbenchPartReference.immediateFirePropertyChange(WorkbenchPartReference.java:571)
    at org.eclipse.ui.internal.WorkbenchPartReference.firePropertyChange(WorkbenchPartReference.java:564)
    at org.eclipse.ui.internal.WorkbenchPartReference.deferEvents(WorkbenchPartReference.java:219)
    at org.eclipse.ui.internal.WorkbenchPartReference.refreshFromPart(WorkbenchPartReference.java:328)
    at org.eclipse.ui.internal.WorkbenchPartReference.partPropertyChanged(WorkbenchPartReference.java:296)
    at org.eclipse.ui.internal.WorkbenchPartReference$2.propertyChanged(WorkbenchPartReference.java:181)
    at org.eclipse.ui.part.WorkbenchPart.firePropertyChange(WorkbenchPart.java:129)
    at org.eclipse.ui.part.WorkbenchPart.setTitle(WorkbenchPart.java:311)
    at org.eclipse.ui.part.WorkbenchPart.setDefaultTitle(WorkbenchPart.java:404)
    at org.eclipse.ui.part.WorkbenchPart.setContentDescription(WorkbenchPart.java:439)
    at org.eclipse.ui.part.ViewPart.setContentDescription(ViewPart.java:154)
    at eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView.getReferencingObjects(ReferencingObjectsView.java:345)
    at eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView.access$3(ReferencingObjectsView.java:282)
    at eu.etaxonomy.taxeditor.bulkeditor.referencingobjects.ReferencingObjectsView$2.run(ReferencingObjectsView.java:223)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

#16 Updated by Andreas Müller almost 2 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

#17 Updated by Katja Luther almost 2 years ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

with the last commits it should work now

#18 Updated by Andreas Müller almost 2 years ago

  • Status changed from Resolved to Closed
  • Assignee changed from Andreas Müller to Katja Luther

Yes we close this ticket now, the View really works MUCH better now.
Anyway, could you still adapt the label provider to never return null,

#19 Updated by Andreas Müller almost 2 years ago

  • % Done changed from 0 to 100
  • Private changed from Yes to No

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)