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

ViewerRow NPE in ViewerCell.getStyleRanges #177

Closed
jukzi opened this issue Jun 29, 2022 · 2 comments
Closed

ViewerRow NPE in ViewerCell.getStyleRanges #177

jukzi opened this issue Jun 29, 2022 · 2 comments

Comments

@jukzi
Copy link
Contributor

jukzi commented Jun 29, 2022

happend together with eclipse-pde/eclipse.pde#190

java.lang.NullPointerException
	at org.eclipse.jface.viewers.ViewerCell.getStyleRanges(ViewerCell.java:200)
	at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.update(DelegatingStyledCellLabelProvider.java:112)
	at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.update(DecoratingStyledCellLabelProvider.java:134)
	at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:144)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:970)
	at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:126)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1048)
	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:427)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2109)
	at org.eclipse.jface.viewers.StructuredViewer.internalUpdate(StructuredViewer.java:2092)
	at org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:2033)
	at org.eclipse.jface.viewers.ColumnViewer.update(ColumnViewer.java:545)
	at org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:1977)
	at org.eclipse.jface.viewers.StructuredViewer.handleLabelProviderChanged(StructuredViewer.java:1156)
	at org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer.handleLabelProviderChanged(ProblemTreeViewer.java:206)
	at org.eclipse.jface.viewers.ContentViewer$1.labelProviderChanged(ContentViewer.java:95)
	at org.eclipse.jface.viewers.BaseLabelProvider$1.run(BaseLabelProvider.java:75)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.BaseLabelProvider.fireLabelProviderChanged(BaseLabelProvider.java:72)
	at org.eclipse.ui.internal.decorators.DecoratorManager.lambda$0(DecoratorManager.java:351)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.ui.internal.decorators.DecoratorManager.fireListener(DecoratorManager.java:351)
	at org.eclipse.ui.internal.decorators.DecorationScheduler$3.runInUIThread(DecorationScheduler.java:560)
	at org.eclipse.ui.progress.UIJob.lambda$0(UIJob.java:95)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4035)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3635)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

i don't know where that null value can come from.

My first thought was ViewerCell constructor should eager validate null argument to get to the root reason, but ColumnViewer.java:57 explicitly uses null as argument.

jukzi pushed a commit to jukzi/eclipse.platform.ui that referenced this issue Sep 1, 2023
Do not reuse ViewerCell instance - that only caused trouble and was
clearly forbidden by
org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerCell).
Instead let the GC do his job.

Declaring the constants final formally requires API change. But it was
never intended that the constants could be changed.

eclipse-platform#177
jukzi pushed a commit to jukzi/eclipse.platform.ui that referenced this issue Sep 1, 2023
Do not reuse ViewerCell instance - that only caused trouble and was
clearly forbidden by
org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerCell).
Instead let the GC do his job.

Declaring the constants final formally requires API change. But it was
never intended that the constants could be changed.

eclipse-platform#177
jukzi pushed a commit to jukzi/eclipse.platform.ui that referenced this issue Sep 8, 2023
Do not reuse ViewerCell instance - that only caused trouble and was
clearly forbidden by
org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerCell).
Instead let the GC do his job.

Declaring the constants final formally requires API change. But it was
never intended that the constants could be changed.

eclipse-platform#177
jukzi pushed a commit to jukzi/eclipse.platform.ui that referenced this issue Sep 8, 2023
Do not reuse ViewerCell instance - that only caused trouble and was
clearly forbidden by
org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerCell).
Instead let the GC do his job.

Declaring the constants final formally requires API change. But it was
never intended that the constants could be changed.

eclipse-platform#177
jukzi pushed a commit to jukzi/eclipse.platform.ui that referenced this issue Sep 8, 2023
Do not reuse ViewerCell instance - that only caused trouble and was
clearly forbidden by
org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerCell).
Instead let the GC do his job.

Declaring the constants final formally requires API change. But it was
never intended that the constants could be changed.

eclipse-platform#177
jukzi pushed a commit that referenced this issue Sep 8, 2023
Do not reuse ViewerCell instance - that only caused trouble and was
clearly forbidden by
org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerCell).
Instead let the GC do his job.

Declaring the constants final formally requires API change. But it was
never intended that the constants could be changed.

#177
@elsazac
Copy link
Member

elsazac commented Jan 25, 2024

Looks like this covered by #1078 and can be closed?

@jukzi
Copy link
Contributor Author

jukzi commented Jan 25, 2024

@elsazac thanks for the hint. lets hope its fixed. just reopen if not.

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

2 participants