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

Bug 24635

Summary: [About] 2.0.2 regression: NPE opening About Dialog
Product: [Eclipse Project] Platform Reporter: Christophe Elek <celek>
Component: RelengAssignee: Sonia Dimitrov <sonia_dimitrov>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P2 CC: daniel, dejan, gunnar
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Christophe Elek CLA 2002-10-10 10:53:26 EDT
Install 2.0.2 (Windows)
Help->About Eclipse Platform
Click Feature Details
select and Platform feature
CLick more info
Nothing happens, the log is filled with

!MESSAGE Unhandled exception caught in event loop.
!ENTRY org.eclipse.ui 4 0 Oct 10, 2002 11:12:12.897
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
	at
org.eclipse.ui.internal.dialogs.AboutFeaturesDialog.buttonPressed(AboutFeaturesDialog.java:141)
	at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:87)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:827)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1529)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1291)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:562)
	at org.eclipse.jface.window.Window.open(Window.java:542)
	at org.eclipse.ui.internal.dialogs.AboutDialog$2.widgetSelected(AboutDialog.java:255)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:87)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:827)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1529)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1291)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:562)
	at org.eclipse.jface.window.Window.open(Window.java:542)
	at org.eclipse.ui.internal.AboutAction.run(AboutAction.java:40)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:749)
	at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:407)
	at
org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:361)
	at
org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:352)
	at
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:47)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:827)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1529)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1291)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1343)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1326)
	at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:775)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
	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:324)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:247)
	at org.eclipse.core.launcher.Main.run(Main.java:703)
	at org.eclipse.core.launcher.Main.main(Main.java:539)
Comment 1 Andrew Irvine CLA 2002-10-11 14:20:32 EDT
The first two entries work, the other entries do not.  Looking at the 
feature.xml file I noted the following change:

old:
<license url="%licenseURL">
     %license
   </license>


new:
<license>
     %license
   </license>

When I put back the "old" code the URL's openned, no NPE.

Sending back to RELENG to determine why changes were made.
Comment 2 Sonia Dimitrov CLA 2002-10-15 13:06:11 EDT
Have made the changes in all org.eclipse.platform*-feature projects in 2.0.2 
stream.  Have requested fix for org.eclipse.pde-feature/feature.xml from owner.
Comment 3 Sonia Dimitrov CLA 2002-10-15 13:22:56 EDT
also made changes in all org.eclipse.sdk*-feature projects and 
org.eclipse.team.extras-feature
Comment 4 Sonia Dimitrov CLA 2002-10-16 17:09:54 EDT
Fix verified in build M20021016.
Comment 5 Tod Creasey CLA 2003-01-07 14:32:09 EST
*** Bug 29044 has been marked as a duplicate of this bug. ***
Comment 6 Andrew Irvine CLA 2003-01-07 15:58:03 EST
*** Bug 29032 has been marked as a duplicate of this bug. ***
Comment 7 Gunnar Wagenknecht CLA 2003-01-07 16:47:27 EST
Mhm, might it be better to generate a LOG message that says the URL is missing 
instead of throwing a NPE, doesn't it?
Comment 8 Gunnar Wagenknecht CLA 2003-01-07 16:52:57 EST
I know why the ' url="%licenseURL"' was gone in my case because I used the PDE 
feature.xml editor to change the license plain text content.

When the PDE feature.xml editor generates the XML it removes the url attribute 
o the the <license> tag. This occurs using 2.1 M4. 

I suggest to reopen this bug or to create a new one to have it fixed in the PDE 
feature.xml editor and/or to generate at least a nicer log message.

Whats your opinion?
Comment 9 Dejan Glozic CLA 2003-01-07 17:02:46 EST
PDE should not remove the url attribute if it was present in the orinal file. 
If it does, it is a bug. Please open a separate bug report against PDE UI.
Comment 10 Gunnar Wagenknecht CLA 2003-01-07 17:15:37 EST
done. see #29118