Community
Participate
Working Groups
with the latest Platform I Build we have tons of NPSs in our tests. they look like Caused by: java.lang.NullPointerException at org.eclipse.ui.part.WorkbenchPart.setTitleImage(WorkbenchPart.java:294) at org.eclipse.ui.texteditor.AbstractTextEditor.initializeTitle(AbstractTextEditor.java:4084) at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4189) at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:260) at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1478) at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor.java:153) at org.eclipse.xtext.ui.editor.XtextEditor.doSetInput(XtextEditor.java:248) at org.eclipse.ui.texteditor.AbstractTextEditor.lambda$1(AbstractTextEditor.java:3154) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:436) do you have pointers to recent changes that could cause this issue?
i see org.eclipse.ui.part.WorkbenchPart.setTitleImage(Image) called but org.eclipse.ui.part.WorkbenchPart.setInitializationData(IConfigurationElement, String, Object) not called
correction: we return early in org.eclipse.ui.part.WorkbenchPart.setInitializationData(IConfigurationElement, String, Object) since there is no icon.
the old version of setTitleImage looks like if (imageDescriptor != null) { JFaceResources.getResources().destroyImage(imageDescriptor); imageDescriptor = null; } and thus guards against this behaviour. i wonder how many editors exist out there with no image specified and if the field should be initialized with optional.empty
seems to be caused by the fix for #548799 in commit ad46c70748d4d89aa16e36f1177f9c4f732735bb
New Gerrit change created: https://git.eclipse.org/r/146766
Gerrit change https://git.eclipse.org/r/146766 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=ff90bca8331c61955def8817085d0937a67dbf96
Added the field initialization with Optional.empty() , thanks for reporting and sorry for this defect.
For the record: commit ad46c70748d4d89aa16e36f1177f9c4f732735bb also caused SDK tests to fail, see https://download.eclipse.org/eclipse/downloads/drops4/I20190729-1800/testresults/html/org.eclipse.team.tests.core_ep413I-unit-cen64-gtk3-java8_linux.gtk.x86_64_8.0.html With the patch above the test is green again.