Bug 61647 - [1.5] NPE in OptionsConfigurationBlock.performOk
Summary: [1.5] NPE in OptionsConfigurationBlock.performOk
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.1 M1   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-10 15:32 EDT by Ines Khelifi CLA
Modified: 2005-01-11 11:02 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ines Khelifi CLA 2004-05-10 15:32:21 EDT
Steps:

- Download Eclipse 200405060200
- Follow these steps to update to "Cheetah":
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-core-home/r3.0/main.html#updates
- Once the update is completed successfully, go to Window->Preferences
- Select Java->Compile on the left pane
- Select the "Compliance and Classfiles" tab
- Change the "Compiler compliance level" to 1.5
- Press the OK button

No error dialog shows up and the OK button stops responding. I tried the
described steps on Mac OS X and Windows XP with the same behavior.

The following can be found in the .log file (for Windows XP):

!SESSION May 10, 2004 15:11:24.177 ---------------------------------------------
java.version=1.4.2_02
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
!ENTRY org.eclipse.ui 4 4 May 10, 2004 15:11:24.177
!MESSAGE Unhandled event loop exception
!ENTRY org.eclipse.ui 4 0 May 10, 2004 15:11:24.187
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
	at
org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock.performOk(OptionsConfigurationBlock.java:392)
	at
org.eclipse.jdt.internal.ui.preferences.CompilerPreferencePage.performOk(CompilerPreferencePage.java:74)
	at
org.eclipse.jface.preference.PreferenceDialog.okPressed(PreferenceDialog.java:741)
	at
org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:198)
	at
org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.buttonPressed(WorkbenchPreferenceDialog.java:75)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:491)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2594)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2272)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:668)
	at org.eclipse.jface.window.Window.open(Window.java:648)
	at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:72)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:881)
	at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:612)
	at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:563)
	at
org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:482)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2594)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2272)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1353)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1324)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:243)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:140)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:90)
	at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:283)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:242)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:119)
	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:269)
	at org.eclipse.core.launcher.Main.run(Main.java:700)
	at org.eclipse.core.launcher.Main.main(Main.java:684)
Comment 1 Tod Creasey CLA 2004-05-11 14:39:13 EDT
Ines what we needed was a bug I could send to the JDT guys.
Comment 2 Dirk Baeumer CLA 2004-05-11 18:04:12 EDT
Martin, can you please investigate. 
Comment 3 Martin Aeschlimann CLA 2004-05-12 04:20:31 EDT
it seems that that the options received from jdt.core are missing some keys.
philippe, could it be that the new options got lost? e.g. in a merge?
(sorry, I couldn't try with the latest cheetah)

added code to OptionsConfigurationBlock to be more stable in such cases

moving to jdt.core
Comment 4 Philipe Mulet CLA 2004-05-12 06:09:23 EDT
Likely an update issue. If you could see both plugins at once for instance.
Comment 5 Philipe Mulet CLA 2004-05-12 06:10:24 EDT
Or could it be a consequence of our new project preference implementation ?
Comment 6 Philipe Mulet CLA 2004-05-13 10:02:25 EDT
Actually, I take my previous comment back, since Cheetah04 (last drop posted) 
did not contain the preference change.

Ines: did you restart an extra time in between updating with Cheetah and 
starting to use it ? It prompts to restart, but as indicated on Cheetah page, 
you must force one more exit/restart of Eclipse to ensure it is correctly 
installed; at least on all builds older than 20040513 where platform/update 
issues seem to be resolved in that area.

Can you please double check in latest, and reopen if able to reproduce ?
Comment 7 Ines Khelifi CLA 2004-05-13 10:22:45 EDT
It seems to work fine now (on I20040512). I was unaware I had to exit eclipse
after it had just restarted. I will read instructions more carefully next time :)
Thanks for the feedback.