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

NPE caused by null defaultImage in XtextEditorTickUpdater (updateEditorImage) #3339

Closed
mehmet-karaman opened this issue Feb 7, 2025 · 2 comments
Milestone

Comments

@mehmet-karaman
Copy link
Contributor

If the defaultImage is null and the updateEditorImage is triggered in a worker thread, it throws the following NPE.

java.lang.NullPointerException: Cannot invoke "org.eclipse.swt.graphics.Image.getBounds()" because "baseImage" is null
	at org.eclipse.jface.viewers.DecorationOverlayIcon.<init>(DecorationOverlayIcon.java:84)
	at org.eclipse.jface.viewers.DecorationOverlayIcon.<init>(DecorationOverlayIcon.java:98)
	at org.eclipse.xtext.ui.editor.XtextEditorErrorTickUpdater.updateEditorImage(XtextEditorErrorTickUpdater.java:100)
	at org.eclipse.xtext.ui.editor.XtextEditorErrorTickUpdater.modelChanged(XtextEditorErrorTickUpdater.java:195)
	at org.eclipse.jface.text.source.AnnotationModel.fireModelChanged(AnnotationModel.java:594)
	at org.eclipse.jface.text.source.AnnotationModel$InternalModelListener.modelChanged(AnnotationModel.java:256)
	at org.eclipse.ui.internal.texteditor.quickdiff.DocumentLineDiffer.fireModelChanged(DocumentLineDiffer.java:1543)
	at org.eclipse.ui.internal.texteditor.quickdiff.DocumentLineDiffer.fireModelChanged(DocumentLineDiffer.java:1526)
	at org.eclipse.ui.internal.texteditor.quickdiff.DocumentLineDiffer$2.run(DocumentLineDiffer.java:713)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

@mehmet-karaman
Copy link
Contributor Author

I am about to provide the fix for this.

mehmet-karaman added a commit to mehmet-karaman/xtext that referenced this issue Feb 7, 2025
mehmet-karaman added a commit to mehmet-karaman/xtext that referenced this issue Feb 7, 2025
mehmet-karaman added a commit to mehmet-karaman/xtext that referenced this issue Feb 9, 2025
mehmet-karaman added a commit to mehmet-karaman/xtext that referenced this issue Feb 10, 2025
…ckUpdater

(updateEditorImage), fix ECA problem
mehmet-karaman added a commit to mehmet-karaman/xtext that referenced this issue Feb 10, 2025
@LorenzoBettini LorenzoBettini added this to the Release_2.38 milestone Feb 11, 2025
LorenzoBettini added a commit that referenced this issue Feb 11, 2025
…defaultImage_in_XtextEditorTickUpdater

> #3339 NPE caused by null defaultImage in XtextEditorTickUpdater (updateEditorImage)
@LorenzoBettini
Copy link
Contributor

Fixed by #3340

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