[jbosstools-issues] [JBoss JIRA] (JBIDE-11859) NPE when press OK on preference page

Viacheslav Kabanovich (JIRA) jira-events at lists.jboss.org
Mon May 14 20:08:17 EDT 2012


    [ https://issues.jboss.org/browse/JBIDE-11859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12692798#comment-12692798 ] 

Viacheslav Kabanovich commented on JBIDE-11859:
-----------------------------------------------

ConfigureProblemSeverityMarkerResolution in constructor calls getPreferenceLabel(), which finds WorkbenchPreferenceNode object, and calls createPage() on it in order to get that label. After that the preference node keeps the reference to the page, but page's UI is not created. When, after that the preference dialog is opened and some other page is edited and OK is pressed, the dialog, looks for page reference in each preference node, and if found, calls performOK() on it. 
So, these steps provide high probability to reproduce the issue:

EXECUTE: Open a file with a CDI error/warning marker.
EXECUTE: Click on the marker to get quick fix list, and make sure that there is 'Configure Problem Severity' option.
EXECUTE: Open Preferences dialog.
EXECUTE: Modify anything on a page that is not relevant to the error marker mentioned.
EXECUTE: Press OK.
FAILURE: Exception listed in the description.

                
> NPE when press OK on preference page
> ------------------------------------
>
>                 Key: JBIDE-11859
>                 URL: https://issues.jboss.org/browse/JBIDE-11859
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: common/jst/core
>    Affects Versions: 3.3.0.Beta2
>            Reporter: Alexey Kazakov
>            Assignee: Viacheslav Kabanovich
>             Fix For: 3.3.0.CR1, 3.4.x
>
>
> I get the following NPE sometimes when press OK on JBT preferences pages:
> {code}
> java.lang.NullPointerException
>         at org.jboss.tools.common.ui.preferences.SeverityPreferencePage.updateEnableBlock(SeverityPreferencePage.java:155)
>         at org.jboss.tools.common.ui.preferences.SeverityPreferencePage.performOk(SeverityPreferencePage.java:138)
>         at org.eclipse.jface.preference.PreferenceDialog$13.run(PreferenceDialog.java:964)
>         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
>         at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
>         at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
>         at org.eclipse.jface.preference.PreferenceDialog.okPressed(PreferenceDialog.java:944)
>         at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.okPressed(FilteredPreferenceDialog.java:447)
>         at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.okPressed(WorkbenchPreferenceDialog.java:171)
>         at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:233)
>         at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
>         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
>         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
>         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
>         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
>         at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
>         at org.eclipse.jface.window.Window.open(Window.java:801)
>         at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:215)
>         at org.eclipse.ui.internal.handlers.ShowPreferencePageHandler.execute(ShowPreferencePageHandler.java:54)
>         at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
>         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.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
>         at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
>         at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
>         at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
>         at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
>         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
>         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
>         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
>         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
>         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
>         at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
>         at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
>         at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
>         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
>         at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
>         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:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         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)
>         at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list