Bug 371131 - Quick Access causes StackOverflowError when run from 'Breakpoints' view in I20120208-2200
Summary: Quick Access causes StackOverflowError when run from 'Breakpoints' view in I2...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows 7
: P3 critical (vote)
Target Milestone: 4.2 M6   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-09 15:10 EST by Remy Suen CLA
Modified: 2012-02-27 08:49 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2012-02-09 15:10:27 EST
I20120208-2200

1. Alt+Shift+Q, Q > Breakpoints > OK
2. Ctrl+3 > CBI to try to copy the build id. After you hit 'C' it should already die.

java.lang.StackOverflowError
	at java.lang.Class.getName(Unknown Source)
	at org.eclipse.ui.internal.services.ServiceLocator.getService(ServiceLocator.java:147)
	at org.eclipse.ui.internal.Workbench.getService(Workbench.java:3096)
	at org.eclipse.ui.internal.MakeHandlersGo.isHandled(MakeHandlersGo.java:128)
	at org.eclipse.core.commands.Command.isHandled(Command.java:873)
	at org.eclipse.ui.internal.handlers.CommandLegacyActionWrapper.isHandled(CommandLegacyActionWrapper.java:310)
	at org.eclipse.jface.commands.ActionHandler.isHandled(ActionHandler.java:145)
	at org.eclipse.ui.internal.MakeHandlersGo.isHandled(MakeHandlersGo.java:136)
	at org.eclipse.core.commands.Command.isHandled(Command.java:873)
	at org.eclipse.ui.internal.handlers.CommandLegacyActionWrapper.isHandled(CommandLegacyActionWrapper.java:310)
	at org.eclipse.jface.commands.ActionHandler.isHandled(ActionHandler.java:145)
	at org.eclipse.ui.internal.MakeHandlersGo.isHandled(MakeHandlersGo.java:136)
	at org.eclipse.core.commands.Command.isHandled(Command.java:873)
	at org.eclipse.ui.internal.handlers.CommandLegacyActionWrapper.isHandled(CommandLegacyActionWrapper.java:310)
	at org.eclipse.jface.commands.ActionHandler.isHandled(ActionHandler.java:145)
	at org.eclipse.ui.internal.MakeHandlersGo.isHandled(MakeHandlersGo.java:136)
	at org.eclipse.core.commands.Command.isHandled(Command.java:873)
	at org.eclipse.ui.internal.handlers.CommandLegacyActionWrapper.isHandled(CommandLegacyActionWrapper.java:310)
	at org.eclipse.jface.commands.ActionHandler.isHandled(ActionHandler.java:145)
	at org.eclipse.ui.internal.MakeHandlersGo.isHandled(MakeHandlersGo.java:136)
	at org.eclipse.core.commands.Command.isHandled(Command.java:873)
	at org.eclipse.ui.internal.handlers.CommandLegacyActionWrapper.isHandled(CommandLegacyActionWrapper.java:310)
	at org.eclipse.jface.commands.ActionHandler.isHandled(ActionHandler.java:145)
	at org.eclipse.ui.internal.MakeHandlersGo.isHandled(MakeHandlersGo.java:136)
Comment 1 Remy Suen CLA 2012-02-10 09:27:35 EST

*** This bug has been marked as a duplicate of bug 361562 ***
Comment 2 Remy Suen CLA 2012-02-10 09:56:57 EST
This one, like bug 371130, is also reproducible without the ADHP code change.

1. Open the 'Breakpoints' view.
2. Click the 'Collapse All' tool item in the view's tool bar.
3. Ctrl+C > C...
4. Eclipse dies with StackOverflowError.
Comment 3 Remy Suen CLA 2012-02-10 10:10:41 EST
If we get an E4HandlerProxy we're okay, but if it's an ActionHandler then it goes infinite.

org.eclipse.jface.commands.ActionHandler.isHandled(ActionHandler.java:145)
	at org.eclipse.ui.internal.MakeHandlersGo.isHandled(MakeHandlersGo.java:136)
	at org.eclipse.core.commands.Command.isHandled(Command.java:873)
	at org.eclipse.ui.internal.handlers.CommandLegacyActionWrapper.isHandled(CommandLegacyActionWrapper.java:310)
	at org.eclipse.jface.commands.ActionHandler.isHandled(ActionHandler.java:145)
	at org.eclipse.ui.internal.MakeHandlersGo.isHandled(MakeHandlersGo.java:136)
	at org.eclipse.core.commands.Command.isHandled(Command.java:873)
	at org.eclipse.ui.internal.quickaccess.CommandProvider.getElements(CommandProvider.java:67)
	at org.eclipse.ui.internal.quickaccess.QuickAccessProvider.getElementsSorted(QuickAccessProvider.java:56)
	at org.eclipse.ui.internal.quickaccess.QuickAccessContents.computeMatchingEntries(QuickAccessContents.java:229)
	at org.eclipse.ui.internal.quickaccess.QuickAccessContents.refresh(QuickAccessContents.java:108)
	at org.eclipse.ui.internal.quickaccess.QuickAccessContents$2.modifyText(QuickAccessContents.java:373)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179)
Comment 4 Remy Suen CLA 2012-02-10 11:04:42 EST
(In reply to comment #3)
> If we get an E4HandlerProxy we're okay, but if it's an ActionHandler then it
> goes infinite.

This is the code where an ActionHandler wrapping a CommandLegacyActionWrapper is instantiated. This happens when I click on the 'Collapse All' tool item in the 'Breakpoints' view's tool bar.

ActionHandler.<init>(IAction) line: 57	
BreakpointsCollapseAllAction.init(IViewPart) line: 50	
ActionDelegateHandlerProxy$2.run() line: 459	
SafeRunner.run(ISafeRunnable) line: 42	
ActionDelegateHandlerProxy.initDelegate() line: 465	
ActionDelegateHandlerProxy.loadDelegate() line: 580	
ActionDelegateHandlerProxy.execute(ExecutionEvent) line: 262	
E4HandlerProxy.execute(IEclipseContext, Map, Event, IEvaluationContext) line: 68	
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 88	
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 55	
Method.invoke(Object, Object...) line: 613	
MethodRequestor.execute() line: 56	
InjectorImpl.invokeUsingClass(Object, Class<?>, Class<Annotation>, Object, PrimaryObjectSupplier, PrimaryObjectSupplier, boolean) line: 228	
InjectorImpl.invoke(Object, Class<Annotation>, Object, PrimaryObjectSupplier, PrimaryObjectSupplier) line: 209	
ContextInjectionFactory.invoke(Object, Class<Annotation>, IEclipseContext, IEclipseContext, Object) line: 123	
HandlerServiceImpl.executeHandler(ParameterizedCommand, IEclipseContext) line: 161	
HandledContributionItem.executeItem(Event) line: 763	
HandledContributionItem.handleWidgetSelection(Event) line: 656	
HandledContributionItem.access$6(HandledContributionItem, Event) line: 640	
HandledContributionItem$4.handleEvent(Event) line: 591	
EventTable.sendEvent(Event) line: 84	
ToolItem(Widget).sendEvent(Event) line: 1053	
Display.runDeferredEvents() line: 4165	
Display.readAndDispatch() line: 3754
Comment 5 Remy Suen CLA 2012-02-10 11:24:51 EST
Michael, do you know why a handler is activated manually in BreakpointsCollapseAllAction's init(*) method? I would've expected most people that wanted keybindings to work in an action set to just go through it via a definitionId.
Comment 6 Michael Rennie CLA 2012-02-10 11:46:31 EST
(In reply to comment #5)
> Michael, do you know why a handler is activated manually in
> BreakpointsCollapseAllAction's init(*) method? I would've expected most people
> that wanted keybindings to work in an action set to just go through it via a
> definitionId.

Looks like the patch on bug 220613 added it because we wanted to retain using our own action...
Comment 7 Paul Webster CLA 2012-02-10 12:51:44 EST
(In reply to comment #4)
> This is the code where an ActionHandler wrapping a CommandLegacyActionWrapper
> is instantiated. This happens when I click on the 'Collapse All' tool item in
> the 'Breakpoints' view's tool bar.
> 
> ActionHandler.<init>(IAction) line: 57    
> BreakpointsCollapseAllAction.init(IViewPart) line: 50    
> ActionDelegateHandlerProxy$2.run() line: 459    
> SafeRunner.run(ISafeRunnable) line: 42    
> ActionDelegateHandlerProxy.initDelegate() line: 465    
> ActionDelegateHandlerProxy.loadDelegate() line: 580    
> ActionDelegateHandlerProxy.execute(ExecutionEvent) line: 262    

This explains the delete breakpoints one but not the CBI.

PW
Comment 8 Paul Webster CLA 2012-02-10 12:58:54 EST
(In reply to comment #7)
> 
> This explains the delete breakpoints one but not the CBI.

Oh, nevermind, I just got it.

What if we simply added the definitionId to the org.eclipse.debug.ui.breakpointsView.toolbar.collapseAll viewContribution/action definition? and removed the activeHandler from the delegate?  That should work in 3.8 and 4.2.

PW
Comment 9 Michael Rennie CLA 2012-02-10 13:17:06 EST
(In reply to comment #8)
> (In reply to comment #7)
> > 
> > This explains the delete breakpoints one but not the CBI.
> 
> Oh, nevermind, I just got it.
> 
> What if we simply added the definitionId to the
> org.eclipse.debug.ui.breakpointsView.toolbar.collapseAll
> viewContribution/action definition? and removed the activeHandler from the
> delegate?  That should work in 3.8 and 4.2.
> 
> PW

I have no problem with that. Pawel, any objections?
Comment 10 Pawel Piech CLA 2012-02-10 13:28:36 EST
(In reply to comment #9)
> I have no problem with that. Pawel, any objections?
+1 
I don't see any problem with it either.
Comment 12 Remy Suen CLA 2012-02-22 12:55:48 EST
(In reply to comment #11)
> Remy, please verify.

Tried a new I20120221-2200 but it didn't do it. The steps provided in comment 2 still causes Eclipse to crash.
Comment 13 Remy Suen CLA 2012-02-22 13:04:45 EST
(In reply to comment #12)
> Tried a new I20120221-2200 but it didn't do it. The steps provided in comment 2
> still causes Eclipse to crash.

I don't know what's going on with the build process. My jar file in my eclipse-SDK-I20120221-2200-win32-x86_64\eclipse\plugins folder is named org.eclipse.debug.ui_3.8.0.v20120120-1928.jar.
Comment 14 Remy Suen CLA 2012-02-22 13:10:18 EST
(In reply to comment #13)
> (In reply to comment #12)
> > Tried a new I20120221-2200 but it didn't do it. The steps provided in comment 2
> > still causes Eclipse to crash.
> 
> I don't know what's going on with the build process. My jar file in my
> eclipse-SDK-I20120221-2200-win32-x86_64\eclipse\plugins folder is named
> org.eclipse.debug.ui_3.8.0.v20120120-1928.jar.

Paul said the 3.x builds have been bad thus far. Will try again later.
Comment 15 Remy Suen CLA 2012-02-27 08:49:22 EST
Comment 2 is now okay with I20120223-2200.

Thanks Michael.