Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 118511 - XSD Validator: Problem->Show Details causing NPEx
Summary: XSD Validator: Problem->Show Details causing NPEx
Status: CLOSED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xsd (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 1.5 RC1   Edit
Assignee: Keith Chong CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-29 15:38 EST by Steve Speicher CLA
Modified: 2006-11-28 15:39 EST (History)
2 users (show)

See Also:


Attachments
possible starter patch for org.eclipse.wst.xsd.ui (11.19 KB, patch)
2005-11-29 22:26 EST, Nitin Dahyabhai CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Speicher CLA 2005-11-29 15:38:13 EST
I have M9 pure (with all the listed prereqs and nothing else).  This didn't occur in M8.

You can reproduce by getting the schemas in this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=113395

Then select the Problem and right-click -> Show Details...
select the frist row (left-click).

You will get this stack dump:

java.lang.NullPointerException
	at org.eclipse.wst.xsd.ui.internal.XSDContentOutlineConfiguration.createMenuContributions(XSDContentOutlineConfiguration.java:241)
	at org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration.getMenuContributions(ContentOutlineConfiguration.java:157)
	at org.eclipse.wst.sse.ui.internal.contentoutline.ConfigurableContentOutlinePage.setConfiguration(ConfigurableContentOutlinePage.java:512)
	at org.eclipse.wst.sse.ui.internal.contentoutline.ConfigurableContentOutlinePage.createControl(ConfigurableContentOutlinePage.java:367)
	at org.eclipse.ui.views.contentoutline.ContentOutline.doCreatePage(ContentOutline.java:133)
	at org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:315)
	at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:613)
	at org.eclipse.ui.internal.PartListenerList$1.run(PartListenerList.java:72)
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
	at org.eclipse.core.runtime.Platform.run(Platform.java:783)
	at org.eclipse.ui.internal.PartListenerList.fireEvent(PartListenerList.java:58)
	at org.eclipse.ui.internal.PartListenerList.firePartActivated(PartListenerList.java:70)
	at org.eclipse.ui.internal.PartService.firePartActivated(PartService.java:73)
	at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:171)
	at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:56)
	at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:117)
	at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:2910)
	at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:552)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2371)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2295)
	at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage.java:2287)
	at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2273)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2268)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2241)
	at org.eclipse.wst.xml.ui.internal.validation.core.errorinfo.ReferencedFileErrorUtility$1.run(ReferencedFileErrorUtility.java:80)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)

Followed by a ton of these WARNINGS:
java.lang.RuntimeException: WARNING: Prevented recursive attempt to activate part org.eclipse.pde.runtime.LogView while still in the middle of activating part org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart
	at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:2859)
	at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:552)
	at org.eclipse.ui.internal.WorkbenchPage.makeActive(WorkbenchPage.java:1097)
	at org.eclipse.ui.internal.WorkbenchPage.bringToTop(WorkbenchPage.java:760)
	at org.eclipse.pde.internal.runtime.logview.LogView$19.run(LogView.java:604)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:809)
	at org.eclipse.jface.window.Window.open(Window.java:787)
	at org.eclipse.jface.dialogs.MessageDialog.openError(MessageDialog.java:319)
	at org.eclipse.jface.util.SafeRunnable.handleException(SafeRunnable.java:59)
	at org.eclipse.core.internal.runtime.InternalPlatform.handleException(InternalPlatform.java:715)
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1046)
	at org.eclipse.core.runtime.Platform.run(Platform.java:783)
	at org.eclipse.ui.internal.PartListenerList.fireEvent(PartListenerList.java:58)
	at org.eclipse.ui.internal.PartListenerList.firePartBroughtToTop(PartListenerList.java:85)
	at org.eclipse.ui.internal.PartService.firePartBroughtToTop(PartService.java:87)
	at org.eclipse.ui.internal.WorkbenchPagePartList.firePartBroughtToTop(WorkbenchPagePartList.java:75)
	at org.eclipse.ui.internal.WorkbenchPagePartList.fireActiveEditorChanged(WorkbenchPagePartList.java:51)
	at org.eclipse.ui.internal.PartList.setActiveEditor(PartList.java:143)
	at org.eclipse.ui.internal.WorkbenchPage.makeActiveEditor(WorkbenchPage.java:1128)
	at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:2903)
	at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:552)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2371)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2295)
	at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage.java:2287)
	at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2273)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2268)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2241)
	at org.eclipse.wst.xml.ui.internal.validation.core.errorinfo.ReferencedFileErrorUtility$1.run(ReferencedFileErrorUtility.java:80)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057)
Comment 1 Nitin Dahyabhai CLA 2005-11-29 22:26:39 EST
Created attachment 30826 [details]
possible starter patch for org.eclipse.wst.xsd.ui

Keith, this is a patch of some work I did in my workspace toward getting around the part activation ordering problem for the XSD Editor.  It might be useful just as a starting point since I only fixed the problems I ran across myself.
Comment 2 Keith Chong CLA 2005-12-07 16:44:00 EST
In ReferencedFileErrorDialog of xml.ui, it's not launching the XML Schema Editor because the default editor file association setting for *.xsd is not set.  It attempts to launch the XML editor instead.   

Once I selected the XML Schema Editor as the Default from the preferences,
the editor came up with no problems.

(It appears to populate the outline using the XSD Editor's content provider for the XML editor...hence the null XSDEditor).

Also, by setting the default editor, it looks like it'll fix bug 110961.
Comment 3 Nitin Dahyabhai CLA 2005-12-08 13:52:38 EST
Ideally, none of the configuration classes would be tied to specific editors.  Could this be related to bug 119931?
Comment 4 Arthur Ryman CLA 2005-12-08 14:51:24 EST
Targetting to 1.0.1
Comment 5 Keith Chong CLA 2006-01-19 13:54:18 EST
Defer to 1.5.  The patch hangs the workbench.
Comment 6 David Williams CLA 2006-04-17 04:06:28 EDT
changing target to be accurate ... well, I hope accurate. 
Comment 7 Craig Salter CLA 2006-04-26 16:00:17 EDT
Lawerence, just wanted to ensure you were copied on this.
Comment 8 Keith Chong CLA 2006-05-18 14:58:35 EDT
We don't use the outlineconfiguration any longer.  This has been fixed.
Comment 9 Steve Speicher CLA 2006-06-20 12:45:20 EDT
don't have this bug with: http://download.eclipse.org/webtools/downloads/drops/S-1.5RC5-200606161055/
Comment 10 John Lanuti CLA 2006-11-28 15:39:17 EST
This is part of a mass update to close out all stale WTP defects already verified by the reporter but awaiting closure by the assignee.  If you feel this defect was closed inappropriately, please reopen.

Thanks, John Lanuti