Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343989 - NPE When Closing Multi-Page Editor with StructuredTextEditor page
Summary: NPE When Closing Multi-Page Editor with StructuredTextEditor page
Status: CLOSED DUPLICATE of bug 342985
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: wst.sse CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-27 12:29 EDT by Daniel Johnson CLA
Modified: 2011-04-27 12:43 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Johnson CLA 2011-04-27 12:29:21 EDT
I have a class that extends org.eclipse.ui.forms.editor.FormEditor and in the addPages() method I create a StructuredTextEditor page:

source = new StructuredTextEditor();
index = addPage(source, getEditorInput());
setActivePage(index);

When I close the editor I get this exception:

!ENTRY org.eclipse.wst.sse.ui 4 4 2011-04-27 08:55:55.899
!MESSAGE problem with reconciling
!STACK 0
java.lang.NullPointerException
	at org.eclipse.wst.sse.ui.internal.projection.AbstractStructuredFoldingStrategy.markInvalidAnnotationsForDeletion(AbstractStructuredFoldingStrategy.java:294)
	at org.eclipse.wst.sse.ui.internal.projection.AbstractStructuredFoldingStrategy.reconcile(AbstractStructuredFoldingStrategy.java:194)
	at org.eclipse.wst.sse.ui.internal.reconcile.DocumentRegionProcessor.process(DocumentRegionProcessor.java:312)
	at org.eclipse.wst.sse.ui.internal.reconcile.StructuredRegionProcessor.process(StructuredRegionProcessor.java:248)
	at org.eclipse.wst.sse.ui.internal.reconcile.DirtyRegionProcessor.run(DirtyRegionProcessor.java:667)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

I thought maybe I wasn't disposing something correctly, so I put a break point in my dispose() method, but the exception gets thrown between closing the editor and before the dispose() method gets called.

I tried stepping through org.eclipse.ui.internal.WorkbenchPage closeEditors() method, but when I step through it the exception does not get thrown, so my guess is some running jobs are not properly cancelled when the editor is closed. I am using org.eclipse.wst.see.ui 1.2.2.v201008232126
Comment 1 Nick Sandonato CLA 2011-04-27 12:37:18 EDT
Hi, Daniel. This was addressed through Bug 342985. THanks for your report.

*** This bug has been marked as a duplicate of bug 342985 ***
Comment 2 Daniel Johnson CLA 2011-04-27 12:43:48 EDT
Oops my bad. I didn't realize normal search doesn't search comments too. Thanks for the quick response. Cheers!