Project

General

Profile

Actions

bug #6850

closed

NPE when clearing label of "kind of" term in TermEditor

Added by Patrick Plitzner over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
New
Assignee:
Patrick Plitzner
Category:
taxeditor
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Found in Version:
Tags:

Description

login : admin

editor version : 4.9.0

server : test.e-taxonomy.eu (edit-test) / rem_conf_am

schema version : 4.7.0.0.201710040000

os : Windows Server 2012 R2 6.3 amd64

java : 1.8.0_121

java.lang.NullPointerException

                at org.eclipse.jface.viewers.StyledString.append(StyledString.java:281)

                at org.eclipse.jface.viewers.StyledString.<init>(StyledString.java:132)

                at eu.etaxonomy.taxeditor.editor.definedterm.TermLabelProvider.update(TermLabelProvider.java:65)

                at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:141)

                at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:949)

                at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:118)

                at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

                at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)

                at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)

                at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1029)

                at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:474)

                at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

                at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)

                at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)

                at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2170)

                at org.eclipse.jface.viewers.StructuredViewer.internalUpdate(StructuredViewer.java:2153)

                at org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:2094)

                at org.eclipse.jface.viewers.ColumnViewer.update(ColumnViewer.java:542)

                at eu.etaxonomy.taxeditor.editor.definedterm.DefinedTermEditor.changed(DefinedTermEditor.java:206)

                at eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart.changed(AbstractCdmEditorViewPart.java:167)

                at eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer.markViewPartDirty(AbstractCdmDataViewer.java:83)

                at eu.etaxonomy.taxeditor.view.detail.DetailsViewer.markViewPartDirty(DetailsViewer.java:179)

                at eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer$1.dirtyStateChanged(AbstractCdmDataViewer.java:59)

                at org.eclipse.ui.forms.AbstractFormPart.markDirty(AbstractFormPart.java:93)

                at eu.etaxonomy.taxeditor.view.detail.CdmSectionPart.propertyChange(CdmSectionPart.java:184)

                at eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement.firePropertyChangeEvent(AbstractCdmFormElement.java:235)

                at eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement.firePropertyChangeEvent(AbstractCdmFormElement.java:263)

                at eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement.propertyChange(AbstractCdmDetailElement.java:229)

                at eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement.firePropertyChangeEvent(AbstractCdmFormElement.java:235)

                at eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement.modifyText(TextWithLabelElement.java:188)

                at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:180)

                at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

                at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)

                at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)

                at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103)

                at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084)

                at org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:3122)

                at org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:4947)

                at org.eclipse.swt.widgets.Control.windowProc(Control.java:4802)

                at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110)

                at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)

                at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2446)

                at org.eclipse.swt.widgets.Text.callWindowProc(Text.java:262)

                at org.eclipse.swt.widgets.Control.windowProc(Control.java:4897)

                at org.eclipse.swt.widgets.Text.windowProc(Text.java:2704)

                at org.eclipse.swt.widgets.Display.windowProc(Display.java:5110)

                at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)

                at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2552)

                at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3822)

                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)

                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)

                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)

                at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)

                at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)

                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)

                at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)

                at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)

                at eu.etaxonomy.taxeditor.Application.start(Application.java:24)

                at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)

                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)

                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)

                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:498)

                at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)

                at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)

                at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

Files

picture668-1.png (11.3 KB) picture668-1.png Andreas Müller, 09/05/2018 12:48 PM

Related issues

Copied from EDIT - feature request #7741: Refresh supplemental data view title when editing termsNewKatja Luther

Actions
Actions #1

Updated by Patrick Plitzner over 5 years ago

  • Status changed from New to Feedback
  • Assignee changed from Patrick Plitzner to Andreas Müller

@Andreas: I could not reproduce this behavior. Maybe this was fixed a while ago. Can you please test and close this ticket if it does not happen anymore?

Actions #2

Updated by Andreas Müller over 5 years ago

  • Target version changed from Unassigned CDM tickets to Release 5.3
Actions #3

Updated by Andreas Müller over 5 years ago

Generally this seems to work now. I also could not reproduce.

Only related issue: with empty label the label refresh does not always work as expected. E.g. I managed to create the following situation.

So the label is empty, label of section shows "null", TermEditor shows "untitled" and Supplemental Data shouws Class.

I would expect the later to show up everywhere except for the label field itself.

Probably this is a separate ticket.

Please remove target version when closing this ticket.

Actions #4

Updated by Patrick Plitzner over 5 years ago

  • Assignee changed from Patrick Plitzner to Andreas Müller

So you want the default titleCache (class + UUID) to be shown everywhere except the text field, correct?

Actions #5

Updated by Andreas Müller over 5 years ago

Let's call it different: show the current titleCache, and for a completely empty term the Class+UUID will be generated as titleCache as nothing else is there (by the way, in the term cache strategy we could implement to better use termType + UUID as this is more exact and always available).
It is not your task to implement or duplicate a formatter for this class. Just use the same formatting everywhere and this is currently given by the (freshly generated) titleCache. Only the label field itself should not use titleCache as it does not represent the whole term but only the label in the given language.

Actions #6

Updated by Andreas Müller over 5 years ago

  • Assignee changed from Andreas Müller to Patrick Plitzner
Actions #7

Updated by Patrick Plitzner over 5 years ago

  • Target version changed from Release 5.3 to Release 5.4
Actions #8

Updated by Patrick Plitzner over 5 years ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Patrick Plitzner to Andreas Müller
  • Target version changed from Release 5.4 to Release 5.3
Actions #9

Updated by Andreas Müller over 5 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Patrick Plitzner

Much better now. Only the Supplemental data do not automatically synchronize their label. Don't know if this is a general issue.
When fixing please careful that we do not generate any critical sychronization exception. The remaining issue is not really critical.

Actions #10

Updated by Patrick Plitzner over 5 years ago

Actions #11

Updated by Patrick Plitzner over 5 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

Andreas Müller wrote:

Much better now. Only the Supplemental data do not automatically synchronize their label. Don't know if this is a general issue.
When fixing please careful that we do not generate any critical sychronization exception. The remaining issue is not really critical.

Created a new ticket for that -> #7741

Actions

Also available in: Atom PDF