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

Bug 365526

Summary: NPE in CSS Editor when brackets don't match
Product: [WebTools] WTP Source Editing Reporter: Christoph Laeubrich <laeubi>
Component: wst.cssAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nick Sandonato <nsand.dev>
Severity: normal    
Priority: P3 CC: ben, iordachej, private, radu_m_toader, yohanleafheart
Version: unspecified   
Target Milestone: 3.3.2   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Christoph Laeubrich CLA 2011-12-04 12:42:48 EST
Build Identifier: 

eclipse.buildId=M20110909-1335
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.rcp.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.rcp.product

Error
Sun Dec 04 18:35:48 CET 2011
Unhandled event loop exception

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:3563)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
	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.wst.css.ui.internal.text.CSSDocumentRegionEdgeMatcher.match(CSSDocumentRegionEdgeMatcher.java:81)
	at org.eclipse.jface.text.source.MatchingCharacterPainter.paint(MatchingCharacterPainter.java:220)
	at org.eclipse.jface.text.PaintManager.paint(PaintManager.java:298)
	at org.eclipse.jface.text.PaintManager.access$1(PaintManager.java:296)
	at org.eclipse.jface.text.PaintManager$1.run(PaintManager.java:353)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	... 23 more


Reproducible: Always

Steps to Reproduce:
1. Open the css Editor
2. type for example table {
3. delete the automatic inserted }
4. error dialog occurs
(same happens when inserting from clipboard)

Might be related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=359049
Comment 1 Nick Sandonato CLA 2011-12-05 10:09:34 EST
*** Bug 362471 has been marked as a duplicate of this bug. ***
Comment 2 Nick Sandonato CLA 2012-01-06 13:39:20 EST
Changes checked in.
Comment 3 Nick Sandonato CLA 2012-01-30 09:44:23 EST
*** Bug 370035 has been marked as a duplicate of this bug. ***
Comment 4 Nick Sandonato CLA 2012-02-22 17:43:11 EST
*** Bug 370284 has been marked as a duplicate of this bug. ***
Comment 5 Nick Sandonato CLA 2012-06-15 16:42:31 EDT
*** Bug 374465 has been marked as a duplicate of this bug. ***
Comment 6 Nick Sandonato CLA 2012-10-10 10:20:33 EDT
*** Bug 391487 has been marked as a duplicate of this bug. ***