Bug 131621 - DocumentRegionProcessor throwing uncaught NPE
Summary: DocumentRegionProcessor throwing uncaught NPE
Status: CLOSED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 1.5 M6   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact:
URL:
Whiteboard:
Keywords: greatbug
Depends on:
Blocks:
 
Reported: 2006-03-13 19:34 EST by Cameron Bateman CLA
Modified: 2006-06-29 14:27 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Bateman CLA 2006-03-13 19:34:23 EST
In org.eclipse.wst.sse.ui.internal.reconcile.DocumentRegionProcessor, the methods beginProcessing and endProcessing both call getValidatorStrategy without checking for null on the return even though the method can return null.  This can (and does) lead to the dreaded "Processing Dirty Region" exploding dialog and error log message.  It also results in region dependent services in the effected StructuredTextEditor (in my case JSP editor) to throw their own nasty and often uncaught exceptions and any event cripples the editor in these dependent areas.

Problem has been noted in several recent builds including WTP 1.5M5.
Comment 1 Nitin Dahyabhai CLA 2006-03-13 19:53:08 EST
Fixed.  Thanks for the keen eye, Cameron.
Comment 2 Cameron Bateman CLA 2006-03-13 20:24:27 EST
The problem seems to be a symptom of a deeper problem related to why getValidationStrategy returns null.  It seems that the system can get into a state where the IDocument attached to the StructuredTextViewer does not match the IDocument registered with with StructuredModelManager.  This causes the system to be unable to resolve the content type of the IDocument even though all the information is there.  This problem is far more serious because not even deleting the underlying IResource (in my case a JSP) seems to correct the problem.

I am still characterizing and will open another bug once I have found the root of the problem.
Comment 3 David Williams CLA 2006-04-13 16:57:48 EDT
I'd like to nominate this one as a "greatbug", since at least one "special case" was discovered by Cameron in his JSF, and he dug right in and found the problem in our code. This was especially important in this case, since this one tiny bug (of not handling 'null' correctly, would "cascade" up the change of dependent components resulting in some bad overall IDE failure (not just a log message). 

Much thanks Cameron. 

Comment 4 Cameron Bateman CLA 2006-06-19 12:55:37 EDT
Verify fixed in 1.5RC4.
Comment 5 Nitin Dahyabhai CLA 2006-06-29 14:27:29 EDT
Closing