Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353110

Summary: Potential NPE in PresentationDamager#isEventMatchingLastDamage
Product: [Modeling] TMF Reporter: Karsten Thoms <karsten.thoms>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: sebastian.zarnekow
Version: 2.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: SR2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Screenshot: Debugger none

Description Karsten Thoms CLA 2011-07-26 09:49:09 EDT
Created attachment 200358 [details]
Screenshot: Debugger

On starting my runtime test instance I get a NPE in the mentioned method. The parameter 'lastDamage' might be null.
Comment 1 Karsten Thoms CLA 2011-07-26 09:49:29 EDT
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:4282)
	at org.eclipse.swt.SWT.error(SWT.java:4197)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3935)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3612)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: java.lang.NullPointerException
	at org.eclipse.xtext.ui.editor.PresentationDamager.isEventMatchingLastDamage(PresentationDamager.java:83)
	at org.eclipse.xtext.ui.editor.PresentationDamager.getDamageRegion(PresentationDamager.java:44)
	at org.eclipse.jface.text.presentation.PresentationReconciler.getDamage(PresentationReconciler.java:497)
	at org.eclipse.jface.text.presentation.PresentationReconciler.access$9(PresentationReconciler.java:477)
	at org.eclipse.jface.text.presentation.PresentationReconciler$InternalListener.textChanged(PresentationReconciler.java:213)
	at org.eclipse.jface.text.TextViewer.updateTextListeners(TextViewer.java:2824)
	at org.eclipse.jface.text.TextViewer.invalidateTextPresentation(TextViewer.java:3444)
	at org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingPresenter$2.run(HighlightingPresenter.java:381)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
Comment 2 Sebastian Zarnekow CLA 2011-08-16 17:25:11 EDT
Pushed to master.
Comment 3 Karsten Thoms CLA 2017-09-19 17:01:22 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 17:12:45 EDT
Closing all bugs that were set to RESOLVED before Neon.0