Coder Social home page Coder Social logo

Comments (6)

jonahgraham avatar jonahgraham commented on July 28, 2024

Also fails with SDK for M2 (I20220428-1800) and with the 4.23 release version.

This is a regression in 4.23 compared to 4.22 and seems to be related to the change that uses this dialog (in 4.23):

image

vs this one in 4.22:

image

Hopefully someone reading this recognizes this change and knows where to direct this bug.

from eclipse.platform.ui.

lshanmug avatar lshanmug commented on July 28, 2024

The dialog was changed via bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=577476.
Adding @BeckerWdf

from eclipse.platform.ui.

BeckerWdf avatar BeckerWdf commented on July 28, 2024

The error happens when the preference dialog is closed:

	@Override
	public boolean close() {
		if (showViewHandler != null) {
			IHandlerService service = PlatformUI.getWorkbench().getService(IHandlerService.class);
			service.deactivateHandler(showViewHandler);
			showViewHandler.getHandler().dispose();
			showViewHandler = null;
		}
...
	}

"service" is null in this case.
The cause seems to be that the restart is triggered while the dialog is open. Before the restart was triggered after the dialog was closed. So how should we fix this?
a) First close the dialog and then trigger the restart
b) Simply fix this NPE?

from eclipse.platform.ui.

laeubi avatar laeubi commented on July 28, 2024

What about asyncExec the restart? This should first close the dialog and then perform the restart...

from eclipse.platform.ui.

laeubi avatar laeubi commented on July 28, 2024

By the way regardless of the fix it might be good to check for null service return and give a better error message then running into NPE if the service is mandatory.

from eclipse.platform.ui.

BeckerWdf avatar BeckerWdf commented on July 28, 2024

By the way regardless of the fix it might be good to check for null service return and give a better error message then running into NPE if the service is mandatory.

But that would be another fix in another issue.

from eclipse.platform.ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.