Community
Participate
Working Groups
Version: Luna (4.4) Build id: I20140318-0830 - Installed "Eclipse Git Team Provider 3.3.0.201403021825-r" and "API Tools Execution Environment Descriptions 1.0.0.v20131119-1750". - Opened my workspace and tried to launch Eclipse in debug mode (with same debug configuration that used to work in previous Eclipse builds). - The Debug view shows an entry for the launched runtime but I cannot see any open runtime window. - While launching, Console view gets the following stacktraces for multiple similar entries: org.eclipse.core.commands.common.NotDefinedException: Cannot get the parent identifier from an undefined context. org.eclipse.debug.ui.breakpointActionSet at org.eclipse.core.commands.contexts.Context.getParentId(Context.java:201) at org.eclipse.e4.ui.bindings.internal.ContextSet$CComp.getLevel(ContextSet.java:48) at org.eclipse.e4.ui.bindings.internal.ContextSet$CComp.compare(ContextSet.java:38) at org.eclipse.e4.ui.bindings.internal.ContextSet$CComp.compare(ContextSet.java:1) at java.util.TimSort.gallopRight(TimSort.java:601) at java.util.TimSort.mergeAt(TimSort.java:465) at java.util.TimSort.mergeForceCollapse(TimSort.java:426) at java.util.TimSort.sort(TimSort.java:223) at java.util.TimSort.sort(TimSort.java:173) at java.util.Arrays.sort(Arrays.java:659) at java.util.Collections.sort(Collections.java:217) at org.eclipse.e4.ui.bindings.internal.ContextSet.<init>(ContextSet.java:76) at org.eclipse.e4.ui.bindings.internal.BindingTableManager.createContextSet(BindingTableManager.java:90) at org.eclipse.e4.ui.bindings.internal.BindingTableManager.addTable(BindingTableManager.java:50) at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBindingTable(BindingProcessingAddon.java:172) at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBindingTables(BindingProcessingAddon.java:153) at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.init(BindingProcessingAddon.java:102) 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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:888) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:120) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:337) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:271) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:186) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:49) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:280) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:595) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:574) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:133) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:103) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:378) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:232) 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:648) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603) at org.eclipse.equinox.launcher.Main.run(Main.java:1462) at org.eclipse.equinox.launcher.Main.main(Main.java:1438) ... org.eclipse.core.commands.common.NotDefinedException: Cannot get the parent identifier from an undefined context. org.eclipse.jsp.actions.ToggleJspBreakpointAction ... org.eclipse.core.commands.common.NotDefinedException: Cannot get the parent identifier from an undefined context. org.eclipse.egit.ui.gitaction ... org.eclipse.core.commands.common.NotDefinedException: Cannot get the parent identifier from an undefined context. org.eclipse.jdt.debug.ui.actions.ManageBreakpointRulerAction ... org.eclipse.core.commands.common.NotDefinedException: Cannot get the parent identifier from an undefined context. org.eclipse.mylyn.tasks.ui.navigation ... org.eclipse.core.commands.common.NotDefinedException: Cannot get the parent identifier from an undefined context. org.eclipse.jdt.ui.CodingActionSet ... org.eclipse.core.commands.common.NotDefinedException: Cannot get the parent identifier from an undefined context. org.eclipse.jdt.ui.text.java.actionSet.presentation ...
Now this launch configuration is not working with older Eclipse builds also. However, I am able to launch a new configuration in debug mode using the same workspace from any Eclipse build.
What happens if you open the configuration and hit the 'validate plug-ins' button on the 'plug-ins' tab? Are you trying to launch with all workspace and target plug-ins (the default) or something custom (on the plug-ins tab)? Can you attach the bad configuration to the bug?
Created attachment 241336 [details] Screenshot-Validate Plug-ins (In reply to Michael Rennie from comment #2) > What happens if you open the configuration and hit the 'validate plug-ins' > button on the 'plug-ins' tab? I get a validation problem in org.eclipse.jdt.annotation (attached screenshot). I get the same problem in case of a good configuration also. > Are you trying to launch with all workspace and target plug-ins (the > default) or something custom (on the plug-ins tab)? I am using the default configuration (all workspace and enabled target plug-ins).
Created attachment 241337 [details] .metadata of bad configuration (In reply to Michael Rennie from comment #2) > Can you attach the bad configuration to the bug? Attached .metadata folder of the bad configuration.
Do you have any platform UI bundles in your workspace? I don't think this is a bug in PDE, as the commands are missing a context for them to be active in. You could consider deleting the e4 workbench metadata from the *target* workspace.
(In reply to Curtis Windatt from comment #5) > Do you have any platform UI bundles in your workspace? Yes, I have org.eclipse.core.commands and org.eclipse.ui. But that doesn't affect a new launch configuration. > You could consider deleting the e4 workbench metadata from the *target* > workspace. I tried but I still get the issue.
I think this is platform debug issue and not PDE UI issue.
(In reply to Vikas Chandra from comment #7) > I think this is platform debug issue and not PDE UI issue. I don't think it is - it sounds like this is a configuration problem, or the PDE launch delegate is failing on an unexpected state. Noopur, I noticed in the log of your config that there are hundreds of NPEs and IllegalArgumentExceptions, did you set some runtime or VM args for the broken configuration that don't work? For example there is an illegal argument exception for a bad locale that causes the UI bundle to fail. Can you attach the launch configuration? Unless it has been shared it will be found in <path_to_your_workspace>/.metadata/.plugins/org.eclipse.debug.core/.launches You can also export the configuration using File > Export > Run/Debug > Launch Configurations and attach it from there.
Created attachment 241456 [details] bad launch configuration (In reply to Michael Rennie from comment #8) > did you set some runtime or VM args for the > broken configuration that don't work? I haven't changed anything in the launch configuration. > Can you attach the launch configuration? Attached.
My arguments page had no space between en_US and -consoleLog. Once I fixed that I had no problems launching the configuration. Everything in the configuration looks fine as well.
(In reply to Curtis Windatt from comment #10) > My arguments page had no space between en_US and -consoleLog. Once I fixed > that I had no problems launching the configuration. Everything in the > configuration looks fine as well. Adding a space worked. Not sure how the space was removed from the configuration. Thanks!
Moving to Platform UI. While the invalid locale is a real problem in the configuration, it should probably not prevent the workspace from opening (workbench bundle from starting).
So the faulty argument didn't cause an error to the error log either? PW
(In reply to Paul Webster from comment #13) > So the faulty argument didn't cause an error to the error log either? > > PW Nothing was logged in the Error Log view. Just the exceptions (comment #0) in Console view.
What about the beginning of the log? i.e. that includes SESSION: !SESSION 2014-04-02 12:18:52.662 ----------------------------------------------- eclipse.buildId=4.4.0.I20140325-0830 java.version=1.7.0_25 java.vendor=Oracle Corporation BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US Framework arguments: -product org.eclipse.sdk.ide Command-line arguments: -product org.eclipse.sdk.ide -data /opt/pwebster/workspaces/build44x-2/../runtime-e44x-clean -dev file:/opt/pwebster/workspaces/build44x-2/.metadata/.plugins/org.eclipse.pde.core/e44x-clean/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog !ENTRY ... starting entries. PW
When I ran the launch configuration the console does display an message saying the locale was bad.
Created attachment 241518 [details] .log file On launching the attached bad configuration in Debug mode, I see nothing in Error Log view. The Console view shows only exceptions (even after setting the max buffer size for console). Attaching the .log from runtime's workspace location which contains the exceptions related to "Invalid locale format: en_US-CONSOLELOG".
Thanks Noopur.
!SESSION 2014-04-02 22:11:55.982 ----------------------------------------------- eclipse.buildId=4.4.0.I20140318-0830 java.version=1.7.0_21 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US-CONSOLELOG Framework arguments: -product org.eclipse.sdk.ide Command-line arguments: -product org.eclipse.sdk.ide -data C:\Eclipse\I_Build\eclipse-SDK-I20140318-0830-win32-x86_64-Java8\eclipse\ws/../runtime-Runtime -dev file:C:/Eclipse/I_Build/eclipse-SDK-I20140318-0830-win32-x86_64-Java8/eclipse/ws/.metadata/.plugins/org.eclipse.pde.core/Runtime/dev.properties -os win32 -ws win32 -arch x86_64 !ENTRY org.eclipse.e4.ui.workbench 4 0 2014-04-02 22:11:59.542 !MESSAGE Unable to create class 'org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon' from bundle '76' !STACK 0 org.eclipse.e4.core.di.InjectionException: java.lang.IllegalArgumentException: Invalid locale format: en_US-CONSOLELOG at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:888) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:120) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:337) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:271) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:186) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:49) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:280) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:595) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:574) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:133) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:103) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:378) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:232) 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:648) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603) at org.eclipse.equinox.launcher.Main.run(Main.java:1462) at org.eclipse.equinox.launcher.Main.main(Main.java:1438) Caused by: java.lang.IllegalArgumentException: Invalid locale format: en_US-CONSOLELOG at org.eclipse.e4.core.internal.services.ResourceBundleHelper.toLocale(ResourceBundleHelper.java:513) at org.eclipse.e4.core.internal.services.BundleTranslationProvider.translate(BundleTranslationProvider.java:30) at org.eclipse.e4.ui.model.LocalizationHelper.getLocalized(LocalizationHelper.java:134) at org.eclipse.e4.ui.model.LocalizationHelper.getLocalized(LocalizationHelper.java:112) at org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon.localize(CommandProcessingAddon.java:255) at org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon.createCommand(CommandProcessingAddon.java:205) at org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon.createCommands(CommandProcessingAddon.java:198) at org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon.init(CommandProcessingAddon.java:109) 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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56) ... 27 more
Dirk, a broken -nl argument added in kills our startup: Caused by: java.lang.IllegalArgumentException: Invalid locale format: en_US-CONSOLELOG at org.eclipse.e4.core.internal.services.ResourceBundleHelper.toLocale(ResourceBundleHelper.java:513) PW
I will take a closer look tomorrow. Need to find the place where it need to be handled. Any preferences what should happen in such a case? Should there be a default locale used?
pushed a review to https://git.eclipse.org/r/24343 - we are not use as much information as available to construct a locale and will never throw an IAE
The "bad guy" for the issue is the BundleTranslationProvider that didn't handle the IllegalArgumentException. I like the approach Tom showed for never throwing an IAE and always return a Locale, the default Locale or at least a Locale that can be retrieved with parts of the invalid Locale String. I extended Tom's solution for additional logging statements in the ResourceBundleHelper, added some fault tolerance to the BundleTranslationProvider (try-catch Exception if something goes wrong will return the key and log the error) and removed catching the IAE in TranslationObjectSupplier (still keeping catching Exception if something else goes wrong for better fault tolerance) https://git.eclipse.org/r/#/c/24369/ Also modified the LocaleChangeServiceImpl for an improved fault tolerance. So it doesn't catch the IAE anymore, but still always an Exception, which will avoid issues if setting a Locale fails. https://git.eclipse.org/r/#/c/24370/
Tom, if Dirk's proposal sounds good could you go ahead and submit? PW
Released as http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=e4053c58b0272bc2528dc9c7c995dbfa5608fbd2 and http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=5b37dc0c3450f0f821055ba4895f8b59a9e597a0 Thanks Dirk. PW
In 4.4.0.I20140501-0200 PW