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

Bug 335273

Summary: NPE when trying to open XSL file
Product: [WebTools] WTP Source Editing Reporter: Paul Wagland <paul>
Component: wst.xslAssignee: David Carver <d_a_carver>
Status: RESOLVED FIXED QA Contact: David Carver <d_a_carver>
Severity: normal    
Priority: P3 CC: thatnitind
Version: unspecified   
Target Milestone: 3.3 M6   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
NPE check for Parameters creation in XSL model.
none
File that causes NPE when being opened none

Description Paul Wagland CLA 2011-01-24 22:25:45 EST
Build Identifier: Build id: 20100917-0705

When trying to open my XSL I got the following error:

Could not open the editor: Editor could not be initialized.


java.lang.NullPointerException
	at org.eclipse.wst.xsl.core.internal.model.XSLModelObjectFactory.notParentStylesheet(XSLModelObjectFactory.java:94)
	at org.eclipse.wst.xsl.core.internal.model.XSLModelObjectFactory.createXSLModelObject(XSLModelObjectFactory.java:70)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetParser.recurse(StylesheetParser.java:41)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetParser.recurse(StylesheetParser.java:48)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetParser.recurse(StylesheetParser.java:48)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetParser.walkDocument(StylesheetParser.java:34)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder.parseModel(StylesheetBuilder.java:111)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder.build(StylesheetBuilder.java:90)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder.getStylesheet(StylesheetBuilder.java:57)
	at org.eclipse.wst.xsl.core.XSLCore.buildStylesheet(XSLCore.java:88)
	at org.eclipse.wst.xsl.core.XSLCore.getStylesheet(XSLCore.java:76)
	at org.eclipse.wst.xsl.core.model.StylesheetModel.isNestedInclude(StylesheetModel.java:248)
	at org.eclipse.wst.xsl.core.model.StylesheetModel.handleInclude(StylesheetModel.java:215)
	at org.eclipse.wst.xsl.core.model.StylesheetModel.fix(StylesheetModel.java:196)
	at org.eclipse.wst.xsl.core.XSLCore.buildStylesheet(XSLCore.java:94)
	at org.eclipse.wst.xsl.core.XSLCore.getStylesheet(XSLCore.java:76)
	at org.eclipse.wst.xsl.ui.internal.editor.OverrideIndicatorManager.updateAnnotations(OverrideIndicatorManager.java:95)
	at org.eclipse.wst.xsl.ui.internal.editor.OverrideIndicatorManager.<init>(OverrideIndicatorManager.java:62)
	at org.eclipse.wst.xsl.ui.internal.editor.XSLEditor.installOverrideIndicator(XSLEditor.java:56)
	at org.eclipse.wst.xsl.ui.internal.editor.XSLEditor.doSetInput(XSLEditor.java:41)
	at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3043)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2600)
	at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3061)
	at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3088)
	at org.eclipse.wst.sse.ui.StructuredTextEditor.init(StructuredTextEditor.java:2495)
	at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
	at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.execute(OpenResourceHandler.java:129)
	at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.run(OpenResourceHandler.java:181)
	at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:289)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1031)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3775)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1404)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1400)
	at org.eclipse.swt.widgets.Tree.sendKeyEvent(Tree.java:2447)
	at org.eclipse.swt.widgets.Control.keyDown(Control.java:2113)
	at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:600)
	at org.eclipse.swt.widgets.Tree.keyDown(Tree.java:1886)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4978)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
	at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:1943)
	at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2025)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5040)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4582)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:4659)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:115)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3274)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	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:369)
	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:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)


Reproducible: Sometimes

Steps to Reproduce:
1. Open the file.
Comment 1 Paul Wagland CLA 2011-01-25 00:23:26 EST
(In reply to comment #0)
> Reproducible: Sometimes
> 
> Steps to Reproduce:
> 1. Open the file.

Actually, this is very reproducible for me. Some files I cannot open at all, and others I can open, but not normally on the first go. Once a file starts to work, that file is normally then reliably openable.
Comment 2 David Carver CLA 2011-01-27 16:28:45 EST
Do you have some sample XSLs that we can use for testing to reproduce the problem.
Comment 3 Paul Wagland CLA 2011-01-27 20:50:52 EST
(In reply to comment #2)
> Do you have some sample XSLs that we can use for testing to reproduce the
> problem.

Unfortunately not, the only XSL files that I have access to are all proprietary. I can install debug jars, and deliver you tracing if that would help?
Comment 4 David Carver CLA 2011-01-27 23:05:26 EST
From the stack trace this appears to be running into an issue trying to pull in nested XSL files.

Are these all relative to the file system or are some trying to be accessed to via the network (i.e. via a URL).
Comment 5 Paul Wagland CLA 2011-01-27 23:14:15 EST
(In reply to comment #4)

These files are local to the filesystem. They are pulled in as:

  <xsl:import href="utils.xsl"/>
  <xsl:import href="functions.xsl"/>

All files are in the same directory on disk.
Comment 6 David Carver CLA 2011-01-27 23:24:05 EST
Created attachment 187800 [details]
NPE check for Parameters creation in XSL model.

Possible fix to address the NPE that seems to be occurring.   Ideally I need to see a set of stylesheets that can reproduce the issue.  However this seems to be happening during PARMeter creation in the model when there is no parent element.  Usually this would indicate a bad stylesheet as Parameters should at least appear under xsl:stylsheet, xsl:transform, xsl:with-param, xsl:templates named.
Comment 7 Paul Wagland CLA 2011-01-27 23:25:14 EST
One additional point. I do have one file that has no <xsl:import /> statements that generates a very similar, but not identical, stacktrace:

java.lang.NullPointerException
at org.eclipse.wst.xsl.core.internal.model.XSLModelObjectFactory.notParentStylesheet(XSLModelObjectFactory.java:94)
at org.eclipse.wst.xsl.core.internal.model.XSLModelObjectFactory.createXSLModelObject(XSLModelObjectFactory.java:70)
at org.eclipse.wst.xsl.core.internal.model.StylesheetParser.recurse(StylesheetParser.java:41)
at org.eclipse.wst.xsl.core.internal.model.StylesheetParser.recurse(StylesheetParser.java:48)
at org.eclipse.wst.xsl.core.internal.model.StylesheetParser.recurse(StylesheetParser.java:48)
at org.eclipse.wst.xsl.core.internal.model.StylesheetParser.walkDocument(StylesheetParser.java:34)
at org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder.parseModel(StylesheetBuilder.java:111)
at org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder.build(StylesheetBuilder.java:90)
at org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder.getStylesheet(StylesheetBuilder.java:57)
at org.eclipse.wst.xsl.core.XSLCore.buildStylesheet(XSLCore.java:88)
at org.eclipse.wst.xsl.core.XSLCore.getStylesheet(XSLCore.java:76)
at org.eclipse.wst.xsl.ui.internal.editor.OverrideIndicatorManager.updateAnnotations(OverrideIndicatorManager.java:95)

Everything below that point is the same as in the first entry after (OverrideIndicatorManager.java:95).

I hope that helps?
Comment 8 David Carver CLA 2011-01-27 23:28:13 EST
I've attached a patch that should at least address the NPE issue,   it is happening when PARAMETERS are being created in the model.



(In reply to comment #7)
> One additional point. I do have one file that has no <xsl:import /> statements
> that generates a very similar, but not identical, stacktrace:
> 
> java.lang.NullPointerException
> at
> org.eclipse.wst.xsl.core.internal.model.XSLModelObjectFactory.notParentStylesheet(XSLModelObjectFactory.java:94)
> at
> org.eclipse.wst.xsl.core.internal.model.XSLModelObjectFactory.createXSLModelObject(XSLModelObjectFactory.java:70)
> at
> org.eclipse.wst.xsl.core.internal.model.StylesheetParser.recurse(StylesheetParser.java:41)
> at
> org.eclipse.wst.xsl.core.internal.model.StylesheetParser.recurse(StylesheetParser.java:48)
> at
> org.eclipse.wst.xsl.core.internal.model.StylesheetParser.recurse(StylesheetParser.java:48)
> at
> org.eclipse.wst.xsl.core.internal.model.StylesheetParser.walkDocument(StylesheetParser.java:34)
> at
> org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder.parseModel(StylesheetBuilder.java:111)
> at
> org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder.build(StylesheetBuilder.java:90)
> at
> org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder.getStylesheet(StylesheetBuilder.java:57)
> at org.eclipse.wst.xsl.core.XSLCore.buildStylesheet(XSLCore.java:88)
> at org.eclipse.wst.xsl.core.XSLCore.getStylesheet(XSLCore.java:76)
> at
> org.eclipse.wst.xsl.ui.internal.editor.OverrideIndicatorManager.updateAnnotations(OverrideIndicatorManager.java:95)
> 
> Everything below that point is the same as in the first entry after
> (OverrideIndicatorManager.java:95).
> 
> I hope that helps?
Comment 9 Paul Wagland CLA 2011-01-27 23:30:47 EST
(In reply to comment #6)
> Possible fix to address the NPE that seems to be occurring.   Ideally I need to
> see a set of stylesheets that can reproduce the issue.  However this seems to
> be happening during PARMeter creation in the model when there is no parent
> element.  Usually this would indicate a bad stylesheet as Parameters should at
> least appear under xsl:stylsheet, xsl:transform, xsl:with-param, xsl:templates
> named.

I am happy to test this change, if you could make a jar available, and let me know where it needs to be placed/replaced.

However, I am not sure that this will solve my problem, since the XSL stylesheets that I have are valid, and are used as part of the build process, so I know that they work. It should be noted that the xsl:param tag for me is appearing under the <func:function> parent. http://exslt.org/functions is mapped to func, and is defined here: http://exslt.org/func/elements/function/index.html

Maybe this is the cause of the problem?
Comment 10 Paul Wagland CLA 2011-01-27 23:40:46 EST
(In reply to comment #9)
> (In reply to comment #6)
> However, I am not sure that this will solve my problem,

Actually, I should state that differently, this patch should solve the problem, however it might be treating a symptom, not the cause. I suspect that my func:function is not being recognised, and so the parentEl is null. In this particular case, that should not matter, since we only seem to care if this is a stylesheet parameter, or not.

Sometimes it does work though, implying that sometimes the func:function does get recognised?
Comment 11 David Carver CLA 2011-01-28 00:48:03 EST
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #6)
> > However, I am not sure that this will solve my problem,
> 
> Actually, I should state that differently, this patch should solve the problem,
> however it might be treating a symptom, not the cause. I suspect that my
> func:function is not being recognised, and so the parentEl is null. In this
> particular case, that should not matter, since we only seem to care if this is
> a stylesheet parameter, or not.
> 
> Sometimes it does work though, implying that sometimes the func:function does
> get recognised?

Alright, so are you using XSLT 1.0, XSLT 2.0, or XSLT 1.0 + EXSLT extensions?

If the later then I know we don't currently have support for exslt functions so that could be the root cause of the problem.
Comment 12 David Carver CLA 2011-01-28 00:50:14 EST
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > (In reply to comment #6)
> > > However, I am not sure that this will solve my problem,
> > 
> > Actually, I should state that differently, this patch should solve the problem,
> > however it might be treating a symptom, not the cause. I suspect that my
> > func:function is not being recognised, and so the parentEl is null. In this
> > particular case, that should not matter, since we only seem to care if this is
> > a stylesheet parameter, or not.
> > 
> > Sometimes it does work though, implying that sometimes the func:function does
> > get recognised?
> 
> Alright, so are you using XSLT 1.0, XSLT 2.0, or XSLT 1.0 + EXSLT extensions?
> 
> If the later then I know we don't currently have support for exslt functions so
> that could be the root cause of the problem.

In fact, this fits the pattern we are seeing:

http://www.exslt.org/func/elements/function/index.html
Comment 13 Paul Wagland CLA 2011-01-28 01:23:24 EST
(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #10)
> > > Sometimes it does work though, implying that sometimes the func:function does
> > > get recognised?
> > 
> > Alright, so are you using XSLT 1.0, XSLT 2.0, or XSLT 1.0 + EXSLT extensions?

XSLT 1.0 + EXSLT extensions

> > If the later then I know we don't currently have support for exslt functions so
> > that could be the root cause of the problem.
> 
> In fact, this fits the pattern we are seeing:
> 
> http://www.exslt.org/func/elements/function/index.html

yup.

However, why does it sometimes work, and sometimes fail? Is it just a timing condition?
Comment 14 David Carver CLA 2011-01-28 09:11:27 EST
> However, why does it sometimes work, and sometimes fail? Is it just a timing
> condition?

Unclear with out some particular test files that can show the particular behavior.  If you can mock some up that don't have any proprietary information in them, I can add them to the existing test suite to make sure they load and don't throw a NPE.

For now, I've added the patch above.  I am planning on reworking the underlying model at some point we use so having the existing examples will help in the future as well.

I'll post back here with a link to an update site you can use to install the patch for testing purposes.
Comment 15 Paul Wagland CLA 2011-01-28 09:46:37 EST
Created attachment 187846 [details]
File that causes NPE when being opened

This is a minimally changed file that always causes an NPE for me when being opened.
Comment 16 Paul Wagland CLA 2011-01-28 09:52:14 EST
(In reply to comment #15)
> This is a minimally changed file that always causes an NPE for me when being
> opened.

One way that I have found to open this file is to remove all of the contents, open it, which works, and then to modify it externally to place all of the contents back in. When the file reloads, it reloads correctly, with everything correctly highlighted.
Comment 17 David Carver CLA 2011-01-28 10:00:46 EST
(In reply to comment #16)
> (In reply to comment #15)
> > This is a minimally changed file that always causes an NPE for me when being
> > opened.
> 
> One way that I have found to open this file is to remove all of the contents,
> open it, which works, and then to modify it externally to place all of the
> contents back in. When the file reloads, it reloads correctly, with everything
> correctly highlighted.

Thanks for the sample, I'll add it to the unit tests.

In addition, you can use the following P2 update site to get the latest build with the patch above.

https://hudson.eclipse.org/hudson/job/cbi-wtp-wst.xsl/lastSuccessfulBuild/artifact/sourceediting/development/org.eclipse.wst.xsl.repository/target/site/
Comment 18 Paul Wagland CLA 2011-01-28 10:03:08 EST
(In reply to comment #16)
> (In reply to comment #15)
> > This is a minimally changed file that always causes an NPE for me when being
> > opened.
> 
> One way that I have found to open this file is to remove all of the contents,
> open it, which works, and then to modify it externally to place all of the
> contents back in. When the file reloads, it reloads correctly, with everything
> correctly highlighted.

Oh, and once the file is opened, I can also re-open it at will, at least until Eclipse is restarted. Once Eclipse is restarted, I need to do the edit trick again, and then I can edit the file until Eclipse is again restarted.
Comment 19 David Carver CLA 2011-01-28 10:24:33 EST
I've added the additional file, and tagged this code for release.  It'll be in the next Integration build for WTP 3.3 M5.  You should also still be able to update and use the CI update site from Hudson to install the change as well.

I'm going to resolve this as fixed.  Please verify that this is working for you.  Both test cases I added are now passing.
Comment 20 Paul Wagland CLA 2011-01-28 10:41:59 EST
(In reply to comment #19)
> I'm going to resolve this as fixed.  Please verify that this is working for
> you.  Both test cases I added are now passing.

I can't load from the link that you mentioned, since I also need osgi.bundle,org.eclipse.wst.xsl,1.2.0.201101280951 

Do you know where I can get that from?

Or is it easier to just test on the nest I build from 3.3?
Comment 21 David Carver CLA 2011-01-28 12:18:45 EST
You should be able to use this:

http://download.eclipse.org/webtools/downloads/drops/R3.3.0/S-3.3.0M4-20101209114749/

And then use the update site link I provided.
Comment 22 Paul Wagland CLA 2011-02-05 04:59:07 EST
(In reply to comment #21)
> You should be able to use this:
> 
> http://download.eclipse.org/webtools/downloads/drops/R3.3.0/S-3.3.0M4-20101209114749/
> 
> And then use the update site link I provided.

I'm sorry for the delay in responding…

I am afraid that this didn't work, the line offsets are different, and it is happening in a different method now, so I am attaching a new stacktrace.



java.lang.NullPointerException
	at org.eclipse.wst.xsl.core.internal.model.XSLElementFactory.createParamater(XSLElementFactory.java:75)
	at org.eclipse.wst.xsl.core.internal.model.XSLModelObjectFactory.createXSLModelObject(XSLModelObjectFactory.java:71)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetParser.recurse(StylesheetParser.java:41)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetParser.recurse(StylesheetParser.java:48)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetParser.recurse(StylesheetParser.java:48)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetParser.walkDocument(StylesheetParser.java:34)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder.parseModel(StylesheetBuilder.java:111)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder.build(StylesheetBuilder.java:90)
	at org.eclipse.wst.xsl.core.internal.model.StylesheetBuilder.getStylesheet(StylesheetBuilder.java:57)
	at org.eclipse.wst.xsl.core.XSLCore.buildStylesheet(XSLCore.java:88)
	at org.eclipse.wst.xsl.core.XSLCore.getStylesheet(XSLCore.java:76)
	at org.eclipse.wst.xsl.core.model.StylesheetModel.isNestedInclude(StylesheetModel.java:248)
	at org.eclipse.wst.xsl.core.model.StylesheetModel.handleInclude(StylesheetModel.java:215)
	at org.eclipse.wst.xsl.core.model.StylesheetModel.fix(StylesheetModel.java:196)
	at org.eclipse.wst.xsl.core.XSLCore.buildStylesheet(XSLCore.java:94)
	at org.eclipse.wst.xsl.core.XSLCore.getStylesheet(XSLCore.java:76)
	at org.eclipse.wst.xsl.ui.internal.editor.OverrideIndicatorManager.updateAnnotations(OverrideIndicatorManager.java:95)
	at org.eclipse.wst.xsl.ui.internal.editor.OverrideIndicatorManager.<init>(OverrideIndicatorManager.java:62)
	at org.eclipse.wst.xsl.ui.internal.editor.XSLEditor.installOverrideIndicator(XSLEditor.java:56)
	at org.eclipse.wst.xsl.ui.internal.editor.XSLEditor.doSetInput(XSLEditor.java:41)
	at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3199)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2642)
	at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3217)
	at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3244)
	at org.eclipse.wst.sse.ui.StructuredTextEditor.init(StructuredTextEditor.java:2586)
	at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
	at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.execute(OpenResourceHandler.java:129)
	at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.run(OpenResourceHandler.java:181)
	at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:289)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1072)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1435)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1443)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1472)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1468)
	at org.eclipse.swt.widgets.Canvas.sendKeyEvent(Canvas.java:462)
	at org.eclipse.swt.widgets.Control.doCommandBySelector(Control.java:1039)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5482)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSResponder.interpretKeyEvents(NSResponder.java:68)
	at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:587)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5392)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
	at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2078)
	at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2207)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5454)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4930)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5057)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3538)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2697)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2661)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2495)
	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:115)
	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)



Versions of the components that I had installed:
org.eclipse.wst.common.fproj (3.3.0.v201008101723-377DF8s73543C674AAA) "Eclipse Faceted Project Framework"
org.eclipse.wst.jsdt.feature (1.3.0.v201101270151-7F78FUHFBBoPbSV-jGYxuY) "Eclipse JavaScript Development Tools"
org.eclipse.wst.web_ui.feature (3.3.0.v201010270400-7O7IFhJEMi9DuyLKBtQnDL7h6CJz) "Eclipse Web Developer Tools"
org.eclipse.wst.xml_ui.feature (3.3.0.v201007311522-7H7EFZ-DxumTlXlBWmRXNCTalsMT) "Eclipse XML Editors and Tools"
org.eclipse.wst.xml.xpath2.processor.feature (1.2.0.v201008230020-67K8ZBgJ9E99gFY9HF9) "Eclipse XPath 2 Developers Tools"
org.eclipse.wst.xsl.feature (1.2.0.201101281322) "Eclipse XSL Developer Tools"

This was all installed on top of Eclipse 3.7.0M5.
Comment 23 Paul Wagland CLA 2011-02-05 05:29:04 EST
Re-opening, since as shown in comment 22, this is still occurring. The original stacktrace shown in the description, with a small line offset, is still obtainable if WTP 3.3.0M5 is installed.

If the XSL tools from comment 17 are installed, then I get the new stacktrace from comment 22.

WTP 3.3.0M5 packages:

org.eclipse.wst.common.fproj (3.3.0.v201008101723-377DF8s73543C674AAA) "Eclipse Faceted Project Framework"
org.eclipse.wst.common.fproj.sdk (3.3.0.v201008101723-787IFBVApOGQPIOLGHYNY785BBB) "Eclipse Faceted Project Framework SDK"
org.eclipse.wst.jsdt.feature (1.3.0.v201101270151-7F78FUHFBBoPbSV-jGYxuY) "Eclipse JavaScript Development Tools"
org.eclipse.wst.web_ui.feature (3.3.0.v201010270400-7O7IFhJEMi9DuyLKBtQnDL7h6CJz) "Eclipse Web Developer Tools"
org.eclipse.wst.xml_ui.feature (3.3.0.v201007311522-7H7EFZ-DxumTlXlBWmRXNCTalsMT) "Eclipse XML Editors and Tools"
org.eclipse.wst.xml.xpath2.processor.feature (1.2.0.v201008230020-67K8ZBgJ9DJBKFQBWIT) "Eclipse XPath 2 Developers Tools"
org.eclipse.wst.xsl.feature (1.2.0.v201009121641-7S7ZFEyFIpS-8EvpOw2BQeGRCXJU) "Eclipse XSL Developer Tools"
Comment 24 David Carver CLA 2011-02-07 11:48:08 EST
(In reply to comment #23)
> Re-opening, since as shown in comment 22, this is still occurring. The original
> stacktrace shown in the description, with a small line offset, is still
> obtainable if WTP 3.3.0M5 is installed.
> 
> If the XSL tools from comment 17 are installed, then I get the new stacktrace
> from comment 22.
> 
> WTP 3.3.0M5 packages:
> 
> org.eclipse.wst.common.fproj (3.3.0.v201008101723-377DF8s73543C674AAA) "Eclipse
> Faceted Project Framework"
> org.eclipse.wst.common.fproj.sdk
> (3.3.0.v201008101723-787IFBVApOGQPIOLGHYNY785BBB) "Eclipse Faceted Project
> Framework SDK"
> org.eclipse.wst.jsdt.feature (1.3.0.v201101270151-7F78FUHFBBoPbSV-jGYxuY)
> "Eclipse JavaScript Development Tools"
> org.eclipse.wst.web_ui.feature
> (3.3.0.v201010270400-7O7IFhJEMi9DuyLKBtQnDL7h6CJz) "Eclipse Web Developer
> Tools"
> org.eclipse.wst.xml_ui.feature
> (3.3.0.v201007311522-7H7EFZ-DxumTlXlBWmRXNCTalsMT) "Eclipse XML Editors and
> Tools"
> org.eclipse.wst.xml.xpath2.processor.feature
> (1.2.0.v201008230020-67K8ZBgJ9DJBKFQBWIT) "Eclipse XPath 2 Developers Tools"
> org.eclipse.wst.xsl.feature (1.2.0.v201009121641-7S7ZFEyFIpS-8EvpOw2BQeGRCXJU)
> "Eclipse XSL Developer Tools"

Thanks.  I'll have to do some more checking on where nulls are being passed (another reason I hate when Nulls are passed around).
Comment 25 David Carver CLA 2011-02-19 11:17:26 EST
I haven't been able to reproduce this by opening the file in the editor.  However I have added a few more safety checks.  

Ultimately I need to revisit the whole model creation aspect.  In the meantime I've added an additional check for NULL and hopefully this addresses your issue.
Comment 26 David Carver CLA 2011-02-19 13:24:04 EST
Released the fix to the build for 3.3M6.